0

尝试访问我的应用程序的登录页面时,它显示以下错误。一些细节:

  1. 应用程序使用 Scala Lift 框架。
  2. JBOSS 6.2.0 EAP。
  3. 部署的上下文根是 /cpt

可能的原因是什么?谢谢。!

 Message: java.lang.LinkageError: Failed to link 
de/o2/bic/cpt/web/lift/snippet/Loginform 
(Module "deployment.cpt.war:main" from Service Module Loader)
    org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:428)
    org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261)
    org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76)
    org.jboss.modules.Module.loadModuleClass(Module.java:548)
    org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:189)
    org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443)
    org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431)
    org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373)
    org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118)
    java.lang.Class.forName0(Native Method)
    java.lang.Class.forName(Class.java:186)
    net.liftweb.util.ClassHelpers$$anonfun$findClass$1$$anonfun$apply$3$$anonfun$apply$4.apply(ClassHelpers.scala:58)
    net.liftweb.util.ClassHelpers$$anonfun$findClass$1$$anonfun$apply$3$$anonfun$apply$4.apply(ClassHelpers.scala:58)
    net.liftweb.util.ControlHelpers$class.tryo(ControlHelpers.scala:46)
    net.liftweb.util.Helpers$.tryo(Helpers.scala:34)
    net.liftweb.util.ControlHelpers$class.tryo(ControlHelpers.scala:109)
    net.liftweb.util.Helpers$.tryo(Helpers.scala:34)
    net.liftweb.util.ClassHelpers$$anonfun$findClass$1$$anonfun$apply$3.apply(ClassHelpers.scala:58)
    net.liftweb.util.ClassHelpers$$anonfun$findClass$1$$anonfun$apply$3.apply(ClassHelpers.scala:55)
    scala.collection.Iterator$$anon$21.hasNext(Iterator.scala:371)
    scala.collection.Iterator$class.toStream(Iterator.scala:1024)
    scala.collection.Iterator$$anon$21.toStream(Iterator.scala:368)
    scala.collection.IterableLike$class.toStream(IterableLike.scala:284)
    scala.collection.SeqViewLike$$anon$4.toStream(SeqViewLike.scala:78)
    scala.collection.TraversableLike$class.toIterator(TraversableLike.scala:570)
    scala.collection.SeqViewLike$$anon$4.toIterator(SeqViewLike.scala:78)
    scala.collection.Iterator$$anon$21.hasNext(Iterator.scala:371)
    scala.collection.Iterator$class.foreach(Iterator.scala:660)
    scala.collection.Iterator$$anon$21.foreach(Iterator.scala:368)
    scala.collection.IterableViewLike$Transformed$class.foreach(IterableViewLike.scala:41)
    scala.collection.SeqViewLike$$anon$4.foreach(SeqViewLike.scala:78)
    scala.collection.TraversableViewLike$Transformed$class.headOption(TraversableViewLike.scala:89)
    scala.collection.SeqViewLike$$anon$4.headOption(SeqViewLike.scala:78)
    net.liftweb.util.ClassHelpers$class.findClass(ClassHelpers.scala:59)
    net.liftweb.util.Helpers$.findClass(Helpers.scala:34)
    net.liftweb.util.ClassHelpers$class.findType(ClassHelpers.scala:74)
    net.liftweb.util.Helpers$.findType(Helpers.scala:34)
    net.liftweb.util.ClassHelpers$class.findClass(ClassHelpers.scala:88)
    net.liftweb.util.Helpers$.findClass(Helpers.scala:34)
    net.liftweb.util.ClassHelpers$class.findClass(ClassHelpers.scala:126)
    net.liftweb.util.Helpers$.findClass(Helpers.scala:34)
    net.liftweb.http.LiftSession.net$liftweb$http$LiftSession$$findSnippetClass(LiftSession.scala:1253)
    net.liftweb.http.LiftSession$$anonfun$net$liftweb$http$LiftSession$$findSnippetInstance$1$$anonfun$apply$64.apply(LiftSession.scala:1390)
    net.liftweb.http.LiftSession$$anonfun$net$liftweb$http$LiftSession$$findSnippetInstance$1$$anonfun$apply$64.apply(LiftSession.scala:1390)
    net.liftweb.common.EmptyBox.or(Box.scala:576)
    net.liftweb.http.LiftSession$$anonfun$net$liftweb$http$LiftSession$$findSnippetInstance$1.apply(LiftSession.scala:1389)
    net.liftweb.http.LiftSession$$anonfun$net$liftweb$http$LiftSession$$findSnippetInstance$1.apply(LiftSession.scala:1389)
    net.liftweb.common.EmptyBox.or(Box.scala:576)
    net.liftweb.http.LiftSession.net$liftweb$http$LiftSession$$findSnippetInstance(LiftSession.scala:1388)
    net.liftweb.http.LiftSession$$anonfun$locateAndCacheSnippet$1$1$$anonfun$apply$78.apply(LiftSession.scala:1543)
    ...      
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149)
    org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169)
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145)
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97)
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102)
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336)
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653)
    org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920)
    java.lang.Thread.run(Thread.java:722)

Caught and thrown by:
Message: java.lang.NoClassDefFoundError: de/o2/bic/cpt/web/lift/snippet/Loginform (wrong name: de/o2/bic/cpt/web/lift/snippet/loginform)
    java.lang.ClassLoader.defineClass1(Native Method)
    java.lang.ClassLoader.defineClass(ClassLoader.java:791)
    org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:345)
    org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:423)
    org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261)
    org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76)
    org.jboss.modules.Module.loadModuleClass(Module.java:548)
    org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:189)
    org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443)
    org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431)
    org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373)
    org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118)
    java.lang.Class.forName0(Native Method)
    java.lang.Class.forName(Class.java:186)
    net.liftweb.util.ClassHelpers$$anonfun$findClass$1$$anonfun$apply$3$$anonfun$apply$4.apply(ClassHelpers.scala:58)
    net.liftweb.util.ClassHelpers$$anonfun$findClass$1$$anonfun$apply$3$$anonfun$apply$4.apply(ClassHelpers.scala:58)
    net.liftweb.util.ControlHelpers$class.tryo(ControlHelpers.scala:46)
    net.liftweb.util.Helpers$.tryo(Helpers.scala:34)
    net.liftweb.util.ControlHelpers$class.tryo(ControlHelpers.scala:109)
    net.liftweb.util.Helpers$.tryo(Helpers.scala:34)
    net.liftweb.util.ClassHelpers$$anonfun$findClass$1$$anonfun$apply$3.apply(ClassHelpers.scala:58)
    ...
    org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169)
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145)
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97)
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102)
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336)
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653)
    org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920)
    java.lang.Thread.run(Thread.java:722)
4

2 回答 2

0

TL;DR - 尝试一次重建一个不依赖项的项目 - 特别是 log4j。

答案在于 JBOSS 如何加载库。如果它遇到它已经作为服务器库的项目库,则类加载器会中断。通常是由于 logger log4j lib。因此,请尝试删除此依赖项并使用替代记录器。当然,这也需要您更改代码。

至少,这是我们的情况。

于 2014-06-17T09:29:09.623 回答
0

还没有答案。我们在 JBoss EAP 6.2 中遇到了类似的错误(LinkageError、NoClassDefFoundError、ClassNotFoundError),但还没有找到解决方案。我们怀疑“新”模块化类加载器中存在错误。

于 2014-06-16T13:48:32.880 回答