留言板

Portlet Developed in liferay 6.2+ tomcat, war deploy on jboss fails

Mahesh Yaddanapudi,修改在8 年前。

Portlet Developed in liferay 6.2+ tomcat, war deploy on jboss fails

New Member 帖子: 6 加入日期: 15-8-26 最近的帖子
Hi,

I have developed a Liferay Portlet using SDK 6.2 and Tomcat. The application gets deployed successfully and works as expected on tomcat.
However if I export the application into war file and try to deploy to JBoss in our prod environment, I am getting below exception. Please note all the jars are already in the LIB folder.

04:43:40,810 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.unit."MaxisReportsMVC-portlet.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."MaxisReportsMVC-portlet.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "MaxisReportsMVC-portlet.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_79]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_79]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_79]
Caused by: java.lang.RuntimeException: Error getting reflective information for class org.springframework.web.servlet.tags.EvalTag with ClassLoader ModuleClassLoader for Module "deployment.MaxisReportsMVC-portlet.war:main" from Service Module Loader
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:58)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:85)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:70)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:55)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 5 more
Caused by: java.lang.NoClassDefFoundError: org/springframework/core/convert/ConversionService
at java.lang.Class.getDeclaredMethods0(Native Method) [rt.jar:1.7.0_79]
at java.lang.Class.privateGetDeclaredMethods(Class.java:2615) [rt.jar:1.7.0_79]
at java.lang.Class.getDeclaredMethods(Class.java:1860) [rt.jar:1.7.0_79]
at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:65) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:66) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 10 more
Caused by: java.lang.ClassNotFoundException: org.springframework.core.convert.ConversionService from [Module "deployment.MaxisReportsMVC-portlet.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
... 15 more

04:43:40,849 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS015870: Deploy of deployment "MaxisReportsMVC-portlet.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"MaxisReportsMVC-portlet.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"MaxisReportsMVC-portlet.war\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"MaxisReportsMVC-portlet.war\""}}
04:43:40,850 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 1) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.deployment.unit."MaxisReportsMVC-portlet.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."MaxisReportsMVC-portlet.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "MaxisReportsMVC-portlet.war"

04:43:40,861 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 2) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"MaxisReportsMVC-portlet.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"MaxisReportsMVC-portlet.war\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"MaxisReportsMVC-portlet.war\""}}}}
04:43:40,930 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment MaxisReportsMVC-portlet.war in 79ms


Can anyone help me please as I am stuck here from 2 days and tried all sorts of things I know but no use.

Thanks,
Mahesh
thumbnail
David H Nebinger,修改在8 年前。

RE: Portlet Developed in liferay 6.2+ tomcat, war deploy on jboss fails

Liferay Legend 帖子: 14919 加入日期: 06-9-2 最近的帖子
Do you have the spring jars declared as dependencies in liferay-plugin-package.properties?
Mahesh Yaddanapudi,修改在8 年前。

RE: Portlet Developed in liferay 6.2+ tomcat, war deploy on jboss fails

New Member 帖子: 6 加入日期: 15-8-26 最近的帖子
Hi David,

No, the jars were not in the liferay-plugin-package.xml

Now I am getting a different error I guess.

05:22:11,013 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.deployment.unit."MaxisReportsMVC-portlet.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."MaxisReportsMVC-portlet.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "MaxisReportsMVC-portlet.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_79]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_79]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_79]
Caused by: java.lang.RuntimeException: Error getting reflective information for class org.apache.openejb.mgmt.MEJBBean with ClassLoader ModuleClassLoader for Module "deployment.MaxisReportsMVC-portlet.war:main" from Service Module Loader
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:58)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:85)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:70)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:55)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 5 more
Caused by: java.lang.NoClassDefFoundError: javax/management/j2ee/ListenerRegistration
at java.lang.Class.getDeclaredMethods0(Native Method) [rt.jar:1.7.0_79]
at java.lang.Class.privateGetDeclaredMethods(Class.java:2615) [rt.jar:1.7.0_79]
at java.lang.Class.getDeclaredMethods(Class.java:1860) [rt.jar:1.7.0_79]
at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:65) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:66) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 10 more
Caused by: java.lang.ClassNotFoundException: javax.management.j2ee.ListenerRegistration from [Module "deployment.MaxisReportsMVC-portlet.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
... 15 more

05:22:11,052 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "MaxisReportsMVC-portlet.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"MaxisReportsMVC-portlet.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"MaxisReportsMVC-portlet.war\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"MaxisReportsMVC-portlet.war\""}}
05:22:11,053 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.deployment.unit."MaxisReportsMVC-portlet.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."MaxisReportsMVC-portlet.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "MaxisReportsMVC-portlet.war"

05:22:11,071 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"MaxisReportsMVC-portlet.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"MaxisReportsMVC-portlet.war\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"MaxisReportsMVC-portlet.war\""}}}}
05:22:11,143 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment MaxisReportsMVC-portlet.war in 87ms


I really dont know why Tomcat doesnt have this issue but Jboss has.

And I am on verge of prod deployment timelines and the deployment is not working.

Thanks,
Mahesh.
Mahesh Yaddanapudi,修改在8 年前。

RE: Portlet Developed in liferay 6.2+ tomcat, war deploy on jboss fails

New Member 帖子: 6 加入日期: 15-8-26 最近的帖子
Hi David,

Below is my life-plugin-package.xml

name=MaxisReportsMVC
module-group-id=liferay
module-incremental-version=1
tags=
short-description=
long-description=
change-log=
page-url=http://www.liferay.com
author=Liferay, Inc.
licenses=LGPL
liferay-versions=6.2.0+
portal-dependency-jars=\
spring-aop.jar,\
spring-asm.jar,\
spring-aspects.jar,\
spring-beans.jar,\
spring-context-support.jar,\
spring-context.jar,\
spring-core.jar,\
spring-expression.jar,\
spring-jdbc.jar,\
spring-jms.jar,\
spring-orm.jar,\
spring-oxm.jar,\
spring-transaction.jar,\
spring-web-portlet.jar,\
spring-web-servlet.jar,\
spring-web-struts.jar,\
spring-web.jar


Thanks,
Mahesh.
thumbnail
Meera Prince,修改在8 年前。

RE: Portlet Developed in liferay 6.2+ tomcat, war deploy on jboss fails

Liferay Legend 帖子: 1111 加入日期: 11-2-8 最近的帖子
Hi
it seems some of classes are not available . portlet deployment is differ from one environment to other and also server environment and class loaders also different .however when we place war file in deploy folder then it will add some of configuration based on server environment. look at what classes are not available and please go through jboss module.xml and also check all liferay dependencies properly configured.
my suggestion download liferay jboss bundle and look at server directory structure and what jars available same check in production jboss server.

Regards,
Meera Prince
thumbnail
David H Nebinger,修改在8 年前。

RE: Portlet Developed in liferay 6.2+ tomcat, war deploy on jboss fails

Liferay Legend 帖子: 14919 加入日期: 06-9-2 最近的帖子
Mahesh Yaddanapudi:
ClassNotFoundException: javax.management.j2ee.ListenerRegistration


This is another missing class. I don't think it's provided in the Liferay jars, I think the dependency must either be included in your war (in the WEB-INF/lib) or it must come from jBoss global dir (which I believe should be the case).

You are using the standalone mode of jboss, right?
Mahesh Yaddanapudi,修改在8 年前。

RE: Portlet Developed in liferay 6.2+ tomcat, war deploy on jboss fails

New Member 帖子: 6 加入日期: 15-8-26 最近的帖子
Hi Meera,

Thank you for your response. It helped me to identify and add the missing jars.

Hi David,

I am using Liferay bundle + JBoss. After adding the necessary Jars, I am facing the below exception. I never knew it was so different for deploying war file though the JARs that I included are not utilized by my application directly at least.

06:10:39,959 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.unit."MaxisReportsMVC-portlet.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."MaxisReportsMVC-portlet.war".INSTALL: Failed to process phase INSTALL of deployment "MaxisReportsMVC-portlet.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_79]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_79]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_79]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011030: Could not configure component MEJB
at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:92)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 5 more
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS014522: Could not find method public abstract boolean javax.ejb.EJBObject.isIdentical(javax.ejb.EJBObject) throws java.rmi.RemoteException from view javax.management.j2ee.Management on EJB class MEJB
at org.jboss.as.ejb3.component.session.SessionBeanObjectViewConfigurator.configure(SessionBeanObjectViewConfigurator.java:108)
at org.jboss.as.ee.component.ComponentDescription$DefaultComponentConfigurator.configure(ComponentDescription.java:921)
at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:81)
... 6 more

06:10:40,015 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS015870: Deploy of deployment "MaxisReportsMVC-portlet.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"MaxisReportsMVC-portlet.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"MaxisReportsMVC-portlet.war\".INSTALL: Failed to process phase INSTALL of deployment \"MaxisReportsMVC-portlet.war\""}}
06:10:40,017 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 1) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.deployment.unit."MaxisReportsMVC-portlet.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."MaxisReportsMVC-portlet.war".INSTALL: Failed to process phase INSTALL of deployment "MaxisReportsMVC-portlet.war"

06:10:40,019 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 2) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"MaxisReportsMVC-portlet.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"MaxisReportsMVC-portlet.war\".INSTALL: Failed to process phase INSTALL of deployment \"MaxisReportsMVC-portlet.war\""}}}}
06:10:40,052 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment MaxisReportsMVC-portlet.war in 36ms


I hope this is the last of errors I get and hope to get resolution.

Thanks,
Mahesh.
thumbnail
Meera Prince,修改在8 年前。

RE: Portlet Developed in liferay 6.2+ tomcat, war deploy on jboss fails

Liferay Legend 帖子: 1111 加入日期: 11-2-8 最近的帖子
HI

Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS014522: Could not find method public abstract boolean javax.ejb.EJBObject.isIdentical(javax.ejb.EJBObject) throws java.rmi.RemoteException from view javax.management.j2ee.Management on EJB class MEJB
at org.jboss.as.ejb3.component.session.SessionBeanObjectViewConfigurator.configure(SessionBeanObjectViewConfigurator.java:108)


it tells us some method not available . i thinks some class in jar file method not available.. make sure jboss server version because each new version they add some new modules and same make sure jar file versions. older jar version may not have that method so try to figure it and add latest jar files.


Regards,
Meera Prince
thumbnail
David H Nebinger,修改在8 年前。

RE: Portlet Developed in liferay 6.2+ tomcat, war deploy on jboss fails

Liferay Legend 帖子: 14919 加入日期: 06-9-2 最近的帖子
Mahesh Yaddanapudi:
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS014522: Could not find method public abstract boolean javax.ejb.EJBObject.isIdentical(javax.ejb.EJBObject) throws java.rmi.RemoteException from view javax.management.j2ee.Management on EJB class MEJB


I think you have a version mismatch, an older version of the management jar. Try to use the one from jboss.
Mahesh Yaddanapudi,修改在8 年前。

RE: Portlet Developed in liferay 6.2+ tomcat, war deploy on jboss fails

New Member 帖子: 6 加入日期: 15-8-26 最近的帖子
Hi David,

I have tried Jboss-javaee-6:3.0.3-Final and JBoss-Javaee-7 jars as well.
I am unable to determine which version is compatible.

The JDK in server is JDK 7 and Liferay SDK 6.2 GA2. I have the same in my local as well.

Even then seems to have mismatch of some management jar.

I am not sure where to post this as this issue probably seems to be for JBoss jars.

Thanks,
Mahesh.
Mahesh Yaddanapudi,修改在8 年前。

RE: Portlet Developed in liferay 6.2+ tomcat, war deploy on jboss fails

New Member 帖子: 6 加入日期: 15-8-26 最近的帖子
Hi David and Meera,

Thank you so much for your help.

I have resolved the issue. It was basically not incompatible jar, it was extra open-ejb jar in the build which caused the issue. Once it was removed, the portlet got deployed smoothly.

The only trivial question is, why didnt Tomcat throw the same error. Any way my issue is resolved.

Thanks and Regards,
Mahesh.
thumbnail
Juan Gonzalez,修改在8 年前。

RE: Portlet Developed in liferay 6.2+ tomcat, war deploy on jboss fails

Liferay Legend 帖子: 3089 加入日期: 08-10-28 最近的帖子
Mahesh Yaddanapudi:

The only trivial question is, why didnt Tomcat throw the same error. Any way my issue is resolved.


That is due to the fact Tomcat doesn't have any Java EE bundled libraries, and JBoss is a Java EE server, so it has already some Java EE features on it (like EJB ) that can collide with you EJB implementation.