Foros de discusión
Vaadin Portlet: Bundle ... is unable to load filter
Andreas Claus, modificado hace 7 años.
Vaadin Portlet: Bundle ... is unable to load filter
New Member Mensajes: 7 Fecha de incorporación: 13/10/16 Mensajes recientes
Hello,
I'm working on a project with Liferay 7 (GA 2) and a Vaadin 7 Portlet, which uses ServiceBuilder - modules via OSGI.
When I deploy the portlet within the Liferay IDE, I see the following error message (for four times) in the console:
08:33:26,524 ERROR [pool-8-thread-3][com_liferay_portal_osgi_web_servlet_context_helper:97] Bundle ch.test.config_1.0.0.201610131029 [689] is unable to load filter com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter
I found out that the message is created by the following class:
portal-src/modules/apps/static/portal-osgi-web/portal-osgi-web-servlet-context-helper/src/main/java/com/liferay/portal/osgi/web/servlet/context/helper/internal/definition/WebXMLDefinitionLoader.java
in the method _getFilterInstance()
But still failed to get it working.
Can someone help me with this error? I did not find any usable answer using Google.
Thank you very much.
Kind regards,
Andreas Claus
My Vaadin Portlet looks like this:
@Component(
immediate = true,
property = {
"com.liferay.portlet.display-category=sample",
"com.liferay.portlet.instanceable=true",
"javax.portlet.display-name=Test portlet",
"javax.portlet.init-param.UI=ch.test.ConfigUI",
"javax.portlet.security-role-ref=power-user,user"
},
service = Portlet.class
)
public class TestPortlet extends VaadinPortlet {
}
I'm working on a project with Liferay 7 (GA 2) and a Vaadin 7 Portlet, which uses ServiceBuilder - modules via OSGI.
When I deploy the portlet within the Liferay IDE, I see the following error message (for four times) in the console:
08:33:26,524 ERROR [pool-8-thread-3][com_liferay_portal_osgi_web_servlet_context_helper:97] Bundle ch.test.config_1.0.0.201610131029 [689] is unable to load filter com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter
I found out that the message is created by the following class:
portal-src/modules/apps/static/portal-osgi-web/portal-osgi-web-servlet-context-helper/src/main/java/com/liferay/portal/osgi/web/servlet/context/helper/internal/definition/WebXMLDefinitionLoader.java
in the method _getFilterInstance()
But still failed to get it working.
Can someone help me with this error? I did not find any usable answer using Google.
Thank you very much.
Kind regards,
Andreas Claus
My Vaadin Portlet looks like this:
@Component(
immediate = true,
property = {
"com.liferay.portlet.display-category=sample",
"com.liferay.portlet.instanceable=true",
"javax.portlet.display-name=Test portlet",
"javax.portlet.init-param.UI=ch.test.ConfigUI",
"javax.portlet.security-role-ref=power-user,user"
},
service = Portlet.class
)
public class TestPortlet extends VaadinPortlet {
}
David H Nebinger, modificado hace 7 años.
RE: Vaadin Portlet: Bundle ... is unable to load filter
Liferay Legend Mensajes: 14919 Fecha de incorporación: 2/09/06 Mensajes recientes
The issue would not appear to be in your portlet class, it points at a corresponding web.xml file in your bundle, likely some servlet/filter stuff for Vaadin that may not have available dependencies to satisfy...
Andreas Claus, modificado hace 7 años.
RE: Vaadin Portlet: Bundle ... is unable to load filter
New Member Mensajes: 7 Fecha de incorporación: 13/10/16 Mensajes recientes
Hi David,
thank you very much for your fast reply.
I managed to debug the position where the failure appears.
You are right - it happens while parsing the web.xml-file.
But the contents of my web.xml-file is very simple and has no configuration to any "filter":
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>Test Configuration</display-name>
<context-param>
<description>Vaadin production mode</description>
<param-name>productionMode</param-name>
<param-value>true</param-value>
</context-param>
<servlet>
<servlet-name>Test</servlet-name>
<servlet-class>ch.test.TestServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Test</servlet-name>
<url-pattern>/VAADIN/*</url-pattern>
</servlet-mapping>
</web-app>
So I see no point where it would go wrong.
When I grep the liferay Sources for Invokerfilter I see, that the portal-impl/src/com/liferay/portal/tools/deploy/BaseDeployer.java has a hard link to the InvokerFilter. Maybe it somehow added, when the portlet is deployed.
But I do not see, how I could correct this problem. Can you give me a hint?
Kind regards,
Andreas
thank you very much for your fast reply.
I managed to debug the position where the failure appears.
You are right - it happens while parsing the web.xml-file.
But the contents of my web.xml-file is very simple and has no configuration to any "filter":
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>Test Configuration</display-name>
<context-param>
<description>Vaadin production mode</description>
<param-name>productionMode</param-name>
<param-value>true</param-value>
</context-param>
<servlet>
<servlet-name>Test</servlet-name>
<servlet-class>ch.test.TestServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Test</servlet-name>
<url-pattern>/VAADIN/*</url-pattern>
</servlet-mapping>
</web-app>
So I see no point where it would go wrong.
When I grep the liferay Sources for Invokerfilter I see, that the portal-impl/src/com/liferay/portal/tools/deploy/BaseDeployer.java has a hard link to the InvokerFilter. Maybe it somehow added, when the portlet is deployed.
But I do not see, how I could correct this problem. Can you give me a hint?
Kind regards,
Andreas
David H Nebinger, modificado hace 7 años.
RE: Vaadin Portlet: Bundle ... is unable to load filter
Liferay Legend Mensajes: 14919 Fecha de incorporación: 2/09/06 Mensajes recientes
Unfortunately I haven't had a lot of time to focus on V7 on L7; Sampsa has been doing some blogging on this and I think you may find some hints there...
Dave
Dave
Andreas Claus, modificado hace 7 años.
RE: Vaadin Portlet: Bundle ... is unable to load filter (Respuesta)
New Member Mensajes: 7 Fecha de incorporación: 13/10/16 Mensajes recientes
Hello Dave,
thank you very much for the tip.
I managed to get it working now on a different way using Sampsa's com.vaadin.liferay project at github (https://github.com/sammso/com.vaadin.liferay).
I installed the Vaadin dependencies as OSGI modules on my Liferay server.
In this project there is also an example-portlet with different Annotation than mine. I adapted that:
@Component(
scope = ServiceScope.PROTOTYPE,
property = {
"com.liferay.portlet.display-category=category.sample",
"javax.portlet.display-name=My test portlet"
},
service = UI.class
)
public class MyTestUI extends UI {
So now it works like a charm.
Kind regards,
Andreas
thank you very much for the tip.
I managed to get it working now on a different way using Sampsa's com.vaadin.liferay project at github (https://github.com/sammso/com.vaadin.liferay).
I installed the Vaadin dependencies as OSGI modules on my Liferay server.
In this project there is also an example-portlet with different Annotation than mine. I adapted that:
@Component(
scope = ServiceScope.PROTOTYPE,
property = {
"com.liferay.portlet.display-category=category.sample",
"javax.portlet.display-name=My test portlet"
},
service = UI.class
)
public class MyTestUI extends UI {
So now it works like a charm.
Kind regards,
Andreas
Matthew K., modificado hace 4 años.
RE: Vaadin Portlet: Bundle ... is unable to load filter
Junior Member Mensajes: 74 Fecha de incorporación: 31/08/15 Mensajes recientes
I have the same problem. Basically I have two vaadin portlets, the first one works correctly, the second one is broken. I get the already mentioned error message that the InvokerFilter cannot be loaded. Plus, I am getting the same error message for "com.liferay.portal.webserver.DynamicResourceServlet". The problem is that there is no import statement for both filters in the osgi metadata. I am not sure why this is happening and why another vaadin portlet has those import statements. So to solve the issue I had to add the following line to "liferay-plugin-package.properties":
Import-Package=com.liferay.portal.kernel.servlet.filters.invoker,com.liferay.portal.webserver
Import-Package=com.liferay.portal.kernel.servlet.filters.invoker,com.liferay.portal.webserver