我正在使用具有Tomcat 7& Java 1.7的Elastic Beanstalk实例在AWS上配置Liferay 6.2 GA1我遵循以下Liferay论坛中提到的步骤
https://www.liferay.com/web/james.falkner/blog/-/blogs/liferay-on-amazon-elastic-beanstalk-and-ec2
按照詹姆斯的说法,所有Jar都需要放在Liferay-x.war&具有liferay-home属性的portal-ext.properties遵循这些步骤我能够调出Liferay实例
我在这里面临的问题是在部署portlet时我遇到ClassNotFoundException,这似乎是类加载器问题。所有必要的罐子都添加在ROOT / WEB-INF / lib /
中我可以通过修改tomcat配置来关注在Tomcat 7上安装Liferay的指南来解决这个问题但是我不想这样做,因为AWS Scaling在这种情况下不会工作,因为新的实例不会采用这个tomcat配置它会失败。
所以我需要配置一个liferay.war&独立工作而不修改tomcat配置。根据詹姆斯在上述论坛中提到的,可以使用适当的JVM设置来处理类加载器问题。
INFO: Deploying web application directory /var/lib/tomcat7/webapps/marketplace-portlet
19 Dec, 2013 8:37:34 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Error configuring application listener of class com.liferay.portal.kernel.servlet.PluginContextListener
java.lang.ClassNotFoundException: com.liferay.portal.kernel.servlet.PluginContextListener
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1701)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1546)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:525)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:507)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:124)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4715)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5273)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1095)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1617)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:701)
19 Dec, 2013 8:37:34 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Error configuring application listener of class com.liferay.portal.kernel.servlet.SerializableSessionAttributeListener
java.lang.ClassNotFoundException: com.liferay.portal.kernel.servlet.SerializableSessionAttributeListener
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1701)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1546)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:525)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:507)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:124)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4715)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5273)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1095)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1617)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:701)
19 Dec, 2013 8:37:34 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Skipped installing application listeners due to previous error(s)
19 Dec, 2013 8:37:34 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
19 Dec, 2013 8:37:34 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/marketplace-portlet] startup failed due to previous errors