Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Florencia Gadea
OpenSessionInViewFilter is an unknown filter name in version 6.1.1
October 10, 2012 7:32 AM
Answer

Florencia Gadea

Rank: Regular Member

Posts: 146

Join Date: March 27, 2012

Recent Posts

Hi Everyone,

I developed a portlet with the Liferay IDE for LR 6.1.0 CE GA1. I now try to deploy it with LR 6.1.1 CE GA2 and I get the following exception:

 1
 2Oct 10, 2012 1:50:39 PM org.apache.catalina.core.ContainerBase addChildInternal
 3SEVERE: ContainerBase.addChild: start:
 4org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/VideoChat-portlet]]
 5        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
 6        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
 7        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
 8        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
 9        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1099)
10        at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1621)
11        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
12        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
13        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
14        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
15        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
16        at java.lang.Thread.run(Thread.java:679)
17Caused by: java.lang.IllegalArgumentException: Filter mapping specifies an unknown filter name OpenSessionInViewFilter
18        at org.apache.catalina.core.StandardContext.validateFilterMap(StandardContext.java:3003)
19        at org.apache.catalina.core.StandardContext.addFilterMap(StandardContext.java:2968)
20        at org.apache.catalina.deploy.WebXml.configureContext(WebXml.java:1207)
21        at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1357)
22        at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:855)
23        at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:345)
24        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
25        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
26        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5161)
27        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
28        ... 11 more
29Oct 10, 2012 1:50:39 PM org.apache.catalina.startup.HostConfig deployDirectory
30SEVERE: Error deploying web application directory /opt/liferay/test-611/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/webapps/VideoChat-portlet
31java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/VideoChat-portlet]]
32        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:898)
33        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
34        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
35        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1099)
36        at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1621)
37        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
38        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
39        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
40        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
41        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
42        at java.lang.Thread.run(Thread.java:679)


Here is my web.xml:

 1
 2<?xml version="1.0" encoding="UTF-8"?>
 3<web-app 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">
 4   
 5    <!-- load the spring context -->
 6    <listener>
 7        <description>Spring framework global application context.</description>
 8        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
 9    </listener>
10   
11    <!-- listener to let spring know about the web scopes -->
12    <listener>
13        <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
14    </listener>
15
16    <filter-mapping>
17        <filter-name>OpenSessionInViewFilter</filter-name>
18        <url-pattern>/*</url-pattern>
19    </filter-mapping>
20
21    <servlet>
22        <servlet-name>ViewRendererServlet</servlet-name>
23        <servlet-class>org.springframework.web.servlet.ViewRendererServlet</servlet-class>
24        <load-on-startup>1</load-on-startup>
25    </servlet>
26    <servlet-mapping>
27        <servlet-name>ViewRendererServlet</servlet-name>
28        <url-pattern>/WEB-INF/servlet/view</url-pattern>
29    </servlet-mapping>
30</web-app>


Why is OpenSessionInViewFilter an unknown filter name?

How do I fix this?

TIA,

Flor.
Juan Gonzalez
RE: OpenSessionInViewFilter is an unknown filter name in version 6.1.1
October 10, 2012 8:29 AM
Answer

Juan Gonzalez

Rank: Liferay Legend

Posts: 3060

Join Date: October 28, 2008

Recent Posts

It is a good practice to recompile your portlet to use it in newer versions.

So rebuild your portlet again using 6.1.1 SDK and retry.
Mika Koivisto
RE: OpenSessionInViewFilter is an unknown filter name in version 6.1.1
October 11, 2012 4:41 PM
Answer

Mika Koivisto

Rank: Liferay Legend

Posts: 1518

Join Date: August 7, 2006

Recent Posts

Your web.xml is missing filter declaration for OpenSessionInView that's why it's unknown.
Florencia Gadea
RE: OpenSessionInViewFilter is an unknown filter name in version 6.1.1
October 15, 2012 6:11 AM
Answer

Florencia Gadea

Rank: Regular Member

Posts: 146

Join Date: March 27, 2012

Recent Posts

Hi Mika,

Thanks for the answer. That fixed the issue. But after fixing that I get a huge amount of different exceptions. So I'd better redevelop everything for Liferay 6.1.1.

Regards,

Flor.

Participate in the State of Liferay Community 2017. Help the community and even win some prizes!