在Jboss上部署seam安全性为7.1.1抛出异常

时间:2012-12-05 05:41:15

标签: java java-ee-6 cdi seam3

我使用以下maven配置启用了我的应用程序以使用seam security 3.1.0.Final                                           org.jboss.seam                缝-BOM                 3.1.0.Final                 POM                 进口                      

</dependencyManagement>
  <dependency>
            <groupId>org.jboss.seam.security</groupId>
            <artifactId>seam-security-api</artifactId>
            <version>3.1.0.Final</version>
        </dependency>

    <dependency>
        <groupId>org.jboss.solder</groupId>
        <artifactId>solder-impl</artifactId>
    </dependency>
    <dependency>
    <groupId>org.jboss.seam.security</groupId>
    <artifactId>seam-security</artifactId>
        <version>3.1.0.Final</version>
            <scope>runtime</scope>
    </dependency>

然而,在部署到服务器时,我得到以下令人讨厌的异常。

06:22:58,597 INFO  [org.jboss.as.jpa] (MSC service thread 1-2) JBAS011401: Read persistence.xml for primary
06:22:59,188 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001:   Failed to start service jboss.deployment.unit."icedrud.war".POST_MODULE:    org.jboss.msc.service.StartException in service j
boss.deployment.unit."icedrud.war".POST_MODULE: Failed to process phase POST_MODULE of     deployment "icedrud.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(Unknown Source) [rt.jar:1.7.0_04]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_04]
        at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_04]
Caused by: java.lang.RuntimeException: Error getting reflective information for class    org.jboss.solder.resourceLoader.servlet.ResourceListener with ClassLoader ModuleClassLoader     for Module "deployment.icedrud.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/jboss/solder/resourceLoader/ResourceLoader
    at java.lang.Class.getDeclaredFields0(Native Method) [rt.jar:1.7.0_04]
    at java.lang.Class.privateGetDeclaredFields(Unknown Source) [rt.jar:1.7.0_04]
    at java.lang.Class.getDeclaredFields(Unknown Source) [rt.jar:1.7.0_04]
    at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:57) [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.jboss.solder.resourceLoader.ResourceLoader from [Module "deployment.icedrud.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

请问我能做错什么。

1 个答案:

答案 0 :(得分:0)

如果您在dependencyManagement部分中使用Seam BoM,那么只需要正确添加所有内容。它看起来像是一个不正确的焊接版本在WAR中。