无法在 Jboss EAP6 上部署 jar,出现错误 java.lang.NoClassDefFoundError
Can't deploy a jar on Jboss EAP6 with error java.lang.NoClassDefFoundError
我尝试在 Jboss EAP6 上部署一个 maven projet (jar),但每次它都会给我以下错误:
`17:55:58,212 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.subunit."services-1.0.0.ear"."services-trans-1.0.1.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."services-1.0.0.ear"."services-tran-1.0.1.jar".POST_MODULE: JBAS018733: N'a pas pu traiter la phase POST_MODULE de subdeployment "services-tran-1.0.1.jar" of deployment "services-1.0.0.ear"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [jboss-as-server-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1980) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1913) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]`
`Caused by: java.lang.RuntimeException: JBAS018757: Erreur d'obtention d'informations réflectives pour class services.tran.impl.BrTranFactory pour le ClassLoader (Chargeur de classe) ModuleClassLoader for Module "deployment.services-1.0.0.ear.services-tran-1.0.1.jar:main" from Service Module Loader
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:72) [jboss-as-server-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:58)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:107)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:92)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:77)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [jboss-as-server-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]`
`Caused by: java.lang.NoClassDefFoundError: Linterfaces/br/locals/IBrFactoryLocal;
at java.lang.Class.getDeclaredFields0(Native Method) [rt.jar:1.7.0_51]
at java.lang.Class.privateGetDeclaredFields(Class.java:2397) [rt.jar:1.7.0_51]
at java.lang.Class.getDeclaredFields(Class.java:1806) [rt.jar:1.7.0_51]
at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:57) [jboss-as-server-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:68) [jboss-as-server-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]`
我有 3 个项目 .jar 包含在一个 ear 项目中,因此我发现其中一个项目没有单独部署在服务器上 Jboss 并且其他项目依赖于那里,它是对于给出此错误消息的那个。
我尝试在 Jboss EAP6 上部署一个 maven projet (jar),但每次它都会给我以下错误:
`17:55:58,212 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.subunit."services-1.0.0.ear"."services-trans-1.0.1.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."services-1.0.0.ear"."services-tran-1.0.1.jar".POST_MODULE: JBAS018733: N'a pas pu traiter la phase POST_MODULE de subdeployment "services-tran-1.0.1.jar" of deployment "services-1.0.0.ear"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [jboss-as-server-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1980) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1913) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]`
`Caused by: java.lang.RuntimeException: JBAS018757: Erreur d'obtention d'informations réflectives pour class services.tran.impl.BrTranFactory pour le ClassLoader (Chargeur de classe) ModuleClassLoader for Module "deployment.services-1.0.0.ear.services-tran-1.0.1.jar:main" from Service Module Loader
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:72) [jboss-as-server-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:58)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:107)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:92)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:77)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [jboss-as-server-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]`
`Caused by: java.lang.NoClassDefFoundError: Linterfaces/br/locals/IBrFactoryLocal;
at java.lang.Class.getDeclaredFields0(Native Method) [rt.jar:1.7.0_51]
at java.lang.Class.privateGetDeclaredFields(Class.java:2397) [rt.jar:1.7.0_51]
at java.lang.Class.getDeclaredFields(Class.java:1806) [rt.jar:1.7.0_51]
at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:57) [jboss-as-server-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:68) [jboss-as-server-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]`
我有 3 个项目 .jar 包含在一个 ear 项目中,因此我发现其中一个项目没有单独部署在服务器上 Jboss 并且其他项目依赖于那里,它是对于给出此错误消息的那个。