2

I develop a portlet using Liferay, JSF and JBoss and everything is running perfect. After a time my team decided to change the container to Tomcat and my problem began. My portlet doesn't deploy anymore, but just shows me this message during deploy:

12:07:35,599 INFO  [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][AutoDeployDir:204] Processing my-portlet-1.0.war
12:07:35,602 INFO  [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][PortletAutoDeployListener:79] Copying portlets for /portal/liferay-sdk/liferay-portal-6.2-ce-ga2/deploy/my-portlet-1.0.war
12:07:35,624 INFO  [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][BaseDeployer:859] Deploying my-portlet-1.0.war
  Expanding: /portal/liferay-sdk/liferay-portal-6.2-ce-ga2/deploy/my-portlet-1.0.war into /portal/liferay-sdk/liferay-portal-6.2-ce-ga2/tomcat-7.0.42/temp/20150925120735727
  Copying 1 file to /portal/liferay-sdk/liferay-portal-6.2-ce-ga2/tomcat-7.0.42/temp/20150925120735727/WEB-INF/classes
  Copying 1 file to /portal/liferay-sdk/liferay-portal-6.2-ce-ga2/tomcat-7.0.42/temp/20150925120735727/WEB-INF/classes
  Copying 1 file to /portal/liferay-sdk/liferay-portal-6.2-ce-ga2/tomcat-7.0.42/temp/20150925120735727/WEB-INF/jsp
12:07:36,144 INFO  [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][BaseDeployer:2383] Modifying Servlet 2.5 /portal/liferay-sdk/liferay-portal-6.2-ce-ga2/tomcat-7.0.42/temp/20150925120735727/WEB-INF/web.xml
  Copying 32 files to /portal/liferay-sdk/liferay-portal-6.2-ce-ga2/tomcat-7.0.42/webapps/my-portlet-1.0
  Copying 1 file to /portal/liferay-sdk/liferay-portal-6.2-ce-ga2/tomcat-7.0.42/webapps/my-portlet-1.0
  Deleting directory /portal/liferay-sdk/liferay-portal-6.2-ce-ga2/tomcat-7.0.42/temp/20150925120735727
12:07:36,242 INFO  [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][PortletAutoDeployListener:91] Portlets for /portal/liferay-sdk/liferay-portal-6.2-ce-ga2/deploy/my-portlet-1.0.war copied successfully. Deployment will start in a few seconds.
Set 25, 2015 12:07:42 PM org.apache.catalina.startup.HostConfig deleteRedeployResources
INFORMAÇÕES: Undeploying context [/my-portlet-1.0]
Set 25, 2015 12:07:42 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
GRAVE: The web application [/my-portlet-1.0] created a ThreadLocal with key of type [com.liferay.portal.kernel.util.CentralizedThreadLocal.ThreadLocalMapThreadLocal] (value [com.liferay.portal.kernel.util.CentralizedThreadLocal$ThreadLocalMapThreadLocal@1848e169]) and a value of type [com.liferay.portal.kernel.util.CentralizedThreadLocal.ThreadLocalMap] (value [com.liferay.portal.kernel.util.CentralizedThreadLocal$ThreadLocalMap@58c6c0f3]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
Set 25, 2015 12:07:42 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
GRAVE: The web application [/my-portlet-1.0] created a ThreadLocal with key of type [com.liferay.portal.kernel.util.CentralizedThreadLocal.ThreadLocalMapThreadLocal] (value [com.liferay.portal.kernel.util.CentralizedThreadLocal$ThreadLocalMapThreadLocal@60a5bf0d]) and a value of type [com.liferay.portal.kernel.util.CentralizedThreadLocal.ThreadLocalMap] (value [com.liferay.portal.kernel.util.CentralizedThreadLocal$ThreadLocalMap@21a2200d]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
Set 25, 2015 12:07:43 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMAÇÕES: Deploying web application directory /portal/liferay-core/environment 6.2-ga2/liferay-portal-6.2-ce-ga2/tomcat-7.0.42/webapps/my-portlet-1.0
Set 25, 2015 12:07:43 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFORMAÇÕES: validateJarFile(/portal/liferay-sdk/liferay-portal-6.2-ce-ga2/tomcat-7.0.42/temp/2-my-portlet-1.0/WEB-INF/lib/servlet-api-2.4.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
12:07:45,237 INFO  [StartupListener:50] Context initialized for contextPath=[/my-portlet-1.0]
12:07:45,247 INFO  [StartupListener:77] Copied input-editor.jsp from LiferayFaces JAR to context path file=[/portal/liferay-sdk/liferay-portal-6.2-ce-ga2/tomcat-7.0.42/temp/2-my-portlet-1.0/resources/liferay-ui/jsp/input-editor.jsp]
12:07:45,247 INFO  [BridgeSessionListener:96] Context initialized for contextPath=[/my-portlet-1.0]

I tried to resolve the problem like this already:

  • Downgrading tomcat to version 7
  • Downgrading liferay to 6.2 GA3 and GA2
  • Removing any managed bean calls
  • Removing all JBOSS configuration from portlet (pom libs and web.xml)
  • Removing tomcat listeners for
  • MemoryLeak prevention

Tobias Liefke
  • 8,637
  • 2
  • 41
  • 58
  • From the stack trace it looks like the last message mentions that the deployment will start but nothing happens after that. I had a similar issue with a non JSF portlet and was able to resolve based on the question http://stackoverflow.com/questions/12908643/portlet-not-getting-deployed – VC1 Sep 25 '15 at 15:33
  • Would you prefer the discussion here, on https://www.liferay.com/community/forums/-/message_boards/message/59830009, or elsewhere? – Olaf Kock Sep 25 '15 at 16:51
  • This issue was solved [in the thread that Olaf mentioned](https://www.liferay.com/community/forums/-/message_boards/message/59830009#aui_3_4_0_1_3245). – stiemannkj1 Oct 02 '15 at 11:12

1 Answers1

0

This kind of issue is probably due to the fact that JBoss provides certain jars to the global classpath and Tomcat does not. Since you are migrating from JBoss to Tomcat, it is likely that you need to include some more jars in your war's WEB-INF/lib. Make sure that you have the JSF API and Impl, and you may need a CDI implementation such as Weld as well. Check that the appropriate dependencies are included in your war's WEB-INF/lib, and then undeploy and redeploy your portlet.

stiemannkj1
  • 4,418
  • 3
  • 25
  • 45