2015-01-20 255 views
0

爲掩蔽類而道歉。JBoss戰爭部署

一個棘手的情況。

這場戰爭部署時確實是一個耳朵的一部分。但是當我嘗試將它部署爲單獨的可部署實體時,它會閃爍此消息。它具有「提供」範圍內所需的所有依賴關係。我不確定JBoss類加載器是否在與加載耳朵時查找的位置不同的位置進行查找。

2015-01-20 17:50:35,485 INFO [org.jboss.weld.ClassLoading] (MSC service thread 1-13) WELD-000119 Not generating any bean definitions from com.xxxx.yyy.services.dddd.zzzz.eeee.LoadedClass because of underlying class loading error 
2015-01-20 17:50:35,485 INFO [org.jboss.weld.ClassLoading] (MSC service thread 1-13) catching: org.jboss.weld.resources.spi.ResourceLoadingException: Error while loading class com.xxxx.yyy.services.dddd.zzzz.eeee.LoadedClass 
     at org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:176) [weld-core-1.1.17.SP3-redhat-1.jar:1.1.17.SP3-redhat-1] 
     at org.jboss.weld.bootstrap.BeanDeployer.loadWeldClass(BeanDeployer.java:116) [weld-core-1.1.17.SP3-redhat-1.jar:1.1.17.SP3-redhat-1] 
     at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:79) [weld-core-1.1.17.SP3-redhat-1.jar:1.1.17.SP3-redhat-1] 
     at org.jboss.weld.bootstrap.BeanDeployer.addClasses(BeanDeployer.java:135) [weld-core-1.1.17.SP3-redhat-1.jar:1.1.17.SP3-redhat-1] 
     at org.jboss.weld.bootstrap.BeanDeployment.createBeans(BeanDeployment.java:184) [weld-core-1.1.17.SP3-redhat-1.jar:1.1.17.SP3-redhat-1] 
     at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:349) [weld-core-1.1.17.SP3-redhat-1.jar:1.1.17.SP3-redhat-1] 
     at org.jboss.as.weld.WeldStartService.start(WeldStartService.java:63) [jboss-as-weld-7.3.4.Final-redhat-1.jar:7.3.4.Final-redhat-1] 
     at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1980) 
     at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1913) 
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_60] 
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_60] 
     at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_60] 
Caused by: java.lang.NoClassDefFoundError: com/xxxx/yyy/services/dddd/zzzz/eeee/MyClass 
     at java.lang.Class.getDeclaredMethods0(Native Method) [rt.jar:1.7.0_60] 
     at java.lang.Class.privateGetDeclaredMethods(Class.java:2570) [rt.jar:1.7.0_60] 
     at java.lang.Class.getDeclaredMethods(Class.java:1855) [rt.jar:1.7.0_60] 
     at org.jboss.weld.util.reflection.SecureReflections$8.work(SecureReflections.java:175) [weld-core-1.1.17.SP3-redhat-1.jar:1.1.17.SP3-redhat-1] 
     at org.jboss.weld.util.reflection.SecureReflections$8.work(SecureReflections.java:172) [weld-core-1.1.17.SP3-redhat-1.jar:1.1.17.SP3-redhat-1] 
     at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52) [weld-core-1.1.17.SP3-redhat-1.jar:1.1.17.SP3-redhat-1] 
     at org.jboss.weld.util.reflection.SecureReflectionAccess.runAndWrap(SecureReflectionAccess.java:63) [weld-core-1.1.17.SP3-redhat-1.jar:1.1.17.SP3-redhat-1] 
     at org.jboss.weld.util.reflection.SecureReflections.getDeclaredMethods(SecureReflections.java:172) [weld-core-1.1.17.SP3-redhat-1.jar:1.1.17.SP3-redhat-1] 
     at org.jboss.weld.introspector.jlr.WeldClassImpl.<init>(WeldClassImpl.java:240) [weld-core-1.1.17.SP3-redhat-1.jar:1.1.17.SP3-redhat-1] 
     at org.jboss.weld.introspector.jlr.WeldClassImpl.of(WeldClassImpl.java:126) [weld-core-1.1.17.SP3-redhat-1.jar:1.1.17.SP3-redhat-1] 
     at org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.load(ClassTransformer.java:60) [weld-core-1.1.17.SP3-redhat-1.jar:1.1.17.SP3-redhat-1] 
     at org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.load(ClassTransformer.java:51) [weld-core-1.1.17.SP3-redhat-1.jar:1.1.17.SP3-redhat-1] 
     at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3589) 
     at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2374) 
     at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2337) 
     at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2252) 
     at com.google.common.cache.LocalCache.get(LocalCache.java:3990) 
     at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3994) 
     at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4878) 
     at org.jboss.weld.util.cache.LoadingCacheUtils.getCacheValue(LoadingCacheUtils.java:71) [weld-core-1.1.17.SP3-redhat-1.jar:1.1.17.SP3-redhat-1] 
     at org.jboss.weld.util.cache.LoadingCacheUtils.getCastCacheValue(LoadingCacheUtils.java:112) [weld-core-1.1.17.SP3-redhat-1.jar:1.1.17.SP3-redhat-1] 
     at org.jboss.weld.util.cache.LoadingCacheUtils.getCastCacheValue(LoadingCacheUtils.java:93) [weld-core-1.1.17.SP3-redhat-1.jar:1.1.17.SP3-redhat-1] 
     at org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:164) [weld-core-1.1.17.SP3-redhat-1.jar:1.1.17.SP3-redhat-1] 
     ... 11 more 
Caused by: java.lang.ClassNotFoundException: com.xxxx.yyy.services.dddd.zzzz.eeee.MyClassfrom [Module "deployment.blah-server-war-1.0.23-SNAPSHOT.war:main" from Service Module Loader] 
     at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.3.Final-redhat-1] 
     at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.3.Final-redhat-1] 
     at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.3.Final-redhat-1] 
     at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.3.Final-redhat-1] 
     at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.3.Final-redhat-1] 
     ... 34 more 

任何幫助表示讚賞。

戰爭內容如下所示。

Blahblah.War
|
--- META-INF
|
--- WEB-INF ----
|                                             |
--- index.htm的        | _____類
                                                | _____ LIB
                                                | _____的beans.xml
                                                | _____面臨-配置。XML
                                                | _____的web.xml

回答

0

如果在部署它的耳朵裏面的錯誤不會發生,那麼你的耳朵的lib文件夾可能會提供缺失的類。

我建議比較你耳朵的lib文件夾中包含的罐子與戰爭庫中的罐子。

也許你有另一個應用程序捆綁在使用缺少的jar的耳朵,所以它被複制到你的耳朵的lib文件夾中,並使你的戰爭部署。