Fórum

Cannot deploy 6.1.0 portlet

thumbnail
Arthur Grohe, modificado 11 Anos atrás.

Cannot deploy 6.1.0 portlet

Junior Member Postagens: 49 Data de Entrada: 05/11/12 Postagens Recentes
Hello,

when I try to deploy my 6.1.0 faces portlet to my 6.1.0 portal server I get this error:


Jan 14, 2013 10:51:07 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/asdf] startup failed due to previous errors
Jan 14, 2013 10:51:07 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor /Users/arthur.grohe/Downloads/liferay-portal-6.1.0-ce-ga1/tomcat-7.0.23/conf/Catalina/localhost/asdf_theme.xml
Jan 14, 2013 10:51:07 AM org.apache.catalina.startup.HostConfig deployDescriptor
WARNING: A docBase /Users/arthur.grohe/Downloads/liferay-portal-6.1.0-ce-ga1/tomcat-7.0.23/webapps/asdf_theme inside the host appBase has been specified, and will be ignored
Jan 14, 2013 10:51:07 AM org.apache.catalina.startup.SetContextPropertiesRule begin
WARNING: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:asdf_theme' did not find a matching property.
Jan 14, 2013 10:51:07 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor /Users/arthur.grohe/Downloads/liferay-portal-6.1.0-ce-ga1/tomcat-7.0.23/conf/Catalina/localhost/ROOT.xml
Loading jar:file:/Users/arthur.grohe/Downloads/liferay-portal-6.1.0-ce-ga1/tomcat-7.0.23/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
10:51:08,587 INFO [EasyConf:122] Refreshed the configuration of all components
10:51:08,901 INFO [ConfigurationLoader:56] Properties for jar:file:/Users/arthur.grohe/Downloads/liferay-portal-6.1.0-ce-ga1/tomcat-7.0.23/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal loaded from [file:/Users/arthur.grohe/Downloads/liferay-portal-6.1.0-ce-ga1/tomcat-7.0.23/webapps/ROOT/WEB-INF/classes/portal-developer.properties, file:/Users/arthur.grohe/Downloads/liferay-portal-6.1.0-ce-ga1/portal-ide.properties, file:/Users/arthur.grohe/Downloads/liferay-portal-6.1.0-ce-ga1/portal-setup-wizard.properties, jar:file:/Users/arthur.grohe/Downloads/liferay-portal-6.1.0-ce-ga1/tomcat-7.0.23/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties]
Loading jar:file:/Users/arthur.grohe/Downloads/liferay-portal-6.1.0-ce-ga1/tomcat-7.0.23/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
Loading file:/Users/arthur.grohe/Downloads/liferay-portal-6.1.0-ce-ga1/portal-setup-wizard.properties
Loading file:/Users/arthur.grohe/Downloads/liferay-portal-6.1.0-ce-ga1/portal-ide.properties
Loading file:/Users/arthur.grohe/Downloads/liferay-portal-6.1.0-ce-ga1/tomcat-7.0.23/webapps/ROOT/WEB-INF/classes/portal-developer.properties
10:51:14,113 INFO [DialectDetector:80] Determine dialect for HSQL Database Engine 2
10:51:14,114 WARN [DialectDetector:95] Liferay is configured to use Hypersonic as its database. Do NOT use Hypersonic in production. Hypersonic is an embedded database useful for development and demo'ing purposes. The database settings can be changed in portal-ext.properties.
10:51:14,156 INFO [DialectDetector:145] Found dialect org.hibernate.dialect.HSQLDialect
Starting Liferay Portal Community Edition 6.1.0 CE (Paton / Build 6100 / January 6, 2012)
10:51:30,666 INFO [BaseDB:406] Database supports case sensitive queries
10:51:31,098 INFO [PluginPackageUtil:1096] Reading plugin package for the root context
10:51:33,197 INFO [AutoDeployDir:105] Auto deploy scanner started for /Users/arthur.grohe/Downloads/liferay-portal-6.1.0-ce-ga1/deploy
Jan 14, 2013 10:51:34 AM org.apache.catalina.loader.WebappClassLoader findResourceInternal
INFO: Illegal access: this web application instance has been stopped already. Could not load service.properties. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
Jan 14, 2013 10:51:34 AM org.apache.catalina.loader.WebappClassLoader findResourceInternal
INFO: Illegal access: this web application instance has been stopped already. Could not load service.properties. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
Jan 14, 2013 10:51:34 AM org.apache.catalina.loader.WebappClassLoader loadClass
INFO: Illegal access: this web application instance has been stopped already. Could not load com.liferay.util.bean.PortletBeanLocatorUtil. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1574)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1533)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at com.liferay.portal.spring.context.PortletContextLoaderListener.contextInitialized(PortletContextLoaderListener.java:118)
at com.liferay.portal.kernel.servlet.PortalClassLoaderServletContextListener.doPortalInit(PortalClassLoaderServletContextListener.java:91)
at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:42)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.flushInits(PortalLifecycleUtil.java:45)
at com.liferay.portal.servlet.MainServlet.initPlugins(MainServlet.java:813)
at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:347)
at javax.servlet.GenericServlet.init(GenericServlet.java:160)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1266)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1185)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1080)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5001)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5289)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:842)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1581)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
10:51:34,882 ERROR [PortletContextLoaderListener:132] java.lang.ClassNotFoundException: com.liferay.util.bean.PortletBeanLocatorUtil
java.lang.ClassNotFoundException: com.liferay.util.bean.PortletBeanLocatorUtil
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1688)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1533)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at com.liferay.portal.spring.context.PortletContextLoaderListener.contextInitialized(PortletContextLoaderListener.java:118)
at com.liferay.portal.kernel.servlet.PortalClassLoaderServletContextListener.doPortalInit(PortalClassLoaderServletContextListener.java:91)
at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:42)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.flushInits(PortalLifecycleUtil.java:45)
at com.liferay.portal.servlet.MainServlet.initPlugins(MainServlet.java:813)
at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:347)
at javax.servlet.GenericServlet.init(GenericServlet.java:160)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1266)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1185)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1080)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5001)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5289)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:842)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1581)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
10:51:34,884 INFO [PluginPackageUtil:1099] Reading plugin package for asdf-portlet
10:51:34,884 WARN [PluginPackageUtil:1058] Plugin package on context asdf-portlet cannot be tracked because this WAR does not contain a liferay-plugin-package.xml file

I highlighted the parts that I think might be the problem. I struggled with this for 3 days now... Please help!
Thanks.
thumbnail
Neil Griffin, modificado 11 Anos atrás.

RE: Cannot deploy 6.1.0 portlet

Liferay Legend Postagens: 2655 Data de Entrada: 27/07/05 Postagens Recentes
Does your deployed portlet in tomcat/webapps/your-portlet-name/WEB-INF/lib/util-java.jar?

That might explain the ClassNotFoundException. The util-java.jar dependency should be automatically copied to your WEB-INF/lib folder when you drop your portlet WAR into the Liferay /deploy folder.
thumbnail
Arthur Grohe, modificado 11 Anos atrás.

RE: Cannot deploy 6.1.0 portlet (Resposta)

Junior Member Postagens: 49 Data de Entrada: 05/11/12 Postagens Recentes
Hi Neil,

thanks for the answer(the jar is there), but sorry, I resolved this issue and forgot to update this post.
The solution was to delete all service-builder-generated files manually and run it again. I found out that the service-builder does NOT replace existing auto-generated files. I highly recommend to change this. (of course not the files that the developer has changed).

And another general improvement idea by me: Let service builder also generate all finder-methods in the XxxLocalServiceUtil / XxxLocalServiceUtilImpl classes.
As they are local, this is no security risk, right? I found myself often writing all the wrapper methods that just call the underlying FinderMethods. This could be done by service-builder.

Would be nice if you have a look at my current, more blocking error I have: http://www.liferay.com/community/forums/-/message_boards/message/15873181

Have a nice day!
thumbnail
Anil T, modificado 8 Anos atrás.

RE: Cannot deploy 6.1.0 portlet

Expert Postagens: 313 Data de Entrada: 14/01/12 Postagens Recentes
Thanks Arthur. It helped me to resolve same issue.