JBoss 4.2启动会引发NoClassDefFoundError [英] JBoss 4.2 startup throws NoClassDefFoundError

查看:150
本文介绍了JBoss 4.2启动会引发NoClassDefFoundError的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在启动JBoss 4.2.2服务器时遇到问题-它正在产生以下错误消息(来自org.jboss.kernel.plugins.dependency.AbstractKernelController):

I am having trouble starting a JBoss 4.2.2 server - it is producing the following error message (from org.jboss.kernel.plugins.dependency.AbstractKernelController) :

Error installing to Described: name=WSDeployerHook_JAXWS_EJB3 state=Not Installed mode=Manual requiredState=Create
java.lang.NoClassDefFoundError: org/jboss/ejb3/interceptors/direct/IndirectContainer

通过JBoss源代码,我已经为某些类打开了TRACE级别的日志记录,尽管它告诉我的是它找不到IndirectContainer(这些行全部来自org.jboss.mx.loading.LoadMgr3): /p>

Looking through the JBoss source code, I have turned on TRACE level logging for certain classes, though all it is telling me is that it can't find the IndirectContainer (these lines all come from org.jboss.mx.loading.LoadMgr3):

Begin beginLoadTask, task=org.jboss.mx.loading.ClassLoadingTask@c8aeb3{classname: org.jboss.ejb3.interceptors.direct.IndirectContainer, requestingThread: Thread[main,5,jboss], requestingClassLoader: org.jboss.mx.loading.UnifiedClassLoader3@16925b0{ url=null ,addedOrder=2}, loadedClass: nullnull, loadOrder: 2147483647, loadException: null, threadTaskCount: 0, state: 0, #CCE: 0}
End beginLoadTask, ClassNotFoundException
Run failed with exception, loadTask=org.jboss.mx.loading.ClassLoadingTask@10e468f{classname: org.jboss.ejb3.EJBContainer, requestingThread: Thread[main,5,jboss], requestingClassLoader: org.jboss.mx.loading.UnifiedClassLoader3@16925b0{ url=null ,addedOrder=2}, loadedClass: nullnull, loadOrder: 2147483647, loadException: java.lang.NoClassDefFoundError: org/jboss/ejb3/interceptors/direct/IndirectContainer, threadTaskCount: 0, state: 1, #CCE: 1}
Notifying task of thread completion, loadTask:org.jboss.mx.loading.ClassLoadingTask@10e468f{classname: org.jboss.ejb3.EJBContainer, requestingThread: Thread[main,5,jboss], requestingClassLoader: org.jboss.mx.loading.UnifiedClassLoader3@16925b0{ url=null ,addedOrder=2}, loadedClass: nullnull, loadOrder: 2147483647, loadException: java.lang.NoClassDefFoundError: org/jboss/ejb3/interceptors/direct/IndirectContainer, threadTaskCount: 0, state: 1, #CCE: 1}
End nextTask(0), loadTask=org.jboss.mx.loading.ClassLoadingTask@10e468f{classname: org.jboss.ejb3.EJBContainer, requestingThread: Thread[main,5,jboss], requestingClassLoader: org.jboss.mx.loading.UnifiedClassLoader3@16925b0{ url=null ,addedOrder=2}, loadedClass: nullnull, loadOrder: 2147483647, loadException: java.lang.NoClassDefFoundError: org/jboss/ejb3/interceptors/direct/IndirectContainer, threadTaskCount: 0, state: 4, #CCE: 1}
Begin endLoadTask, task=org.jboss.mx.loading.ClassLoadingTask@10e468f{classname: org.jboss.ejb3.EJBContainer, requestingThread: Thread[main,5,jboss], requestingClassLoader: org.jboss.mx.loading.UnifiedClassLoader3@16925b0{ url=null ,addedOrder=2}, loadedClass: nullnull, loadOrder: 2147483647, loadException: java.lang.NoClassDefFoundError: org/jboss/ejb3/interceptors/direct/IndirectContainer, threadTaskCount: 0, state: 4, #CCE: 1}
registerLoaderThread, ucl=org.jboss.mx.loading.UnifiedClassLoader3@56182f{ url=file:/var/data/applications/jboss/server/jbossgpa1/deploy/jboss-bean.deployer/ ,addedOrder=5}, t=Thread[main,5,jboss], prevT=null
Begin beginLoadTask, task=org.jboss.mx.loading.ClassLoadingTask@159d10{classname: org.jboss.util.JBossStringBuilder, requestingThread: Thread[main,5,jboss], requestingClassLoader: org.jboss.mx.loading.UnifiedClassLoader3@56182f{ url=file:/var/data/applications/jboss/server/jbossgpa1/deploy/jboss-bean.deployer/ ,addedOrder=5}, loadedClass: nullnull, loadOrder: 2147483647, loadException: null, threadTaskCount: 0, state: 0, #CCE: 0}
scheduleTask(1), created subtask: {t=Thread[main,5,jboss], ucl=org.jboss.mx.loading.UnifiedClassLoader3@56182f{ url=file:/var/data/applications/jboss/server/jbossgpa1/deploy/jboss-bean.deployer/ ,addedOrder=5}, name=org.jboss.util.JBossStringBuilder, requestingThread=Thread[main,5,jboss], order=5, releaseInNextTask=false}

我已经使用TextPad搜索整个文件夹结构,包括.jars等,并且在日志文件之外没有任何提及IndirectContainer的地方.

I have used TextPad to search the whole folder structure including the .jars etc and there is not a single mention of IndirectContainer outside of the log files.

我猜测没有满足库的依赖关系,但是我不确定下一步应该怎么去诊断这个问题.有任何想法/建议吗?

I'm guessing that a library's dependency is not being satisfied, but I am unsure what the next step should be to diagnose this problem. Any ideas/suggestions?

(在RHEL4上运行)

(running on RHEL4)

我正在运行JBoss (MX MicroKernel) [4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)]

我开始变得有点绝望了,所以我连接了调试器,并在org.jboss.mx.loading.ClassLoadingTask的构造函数上创建了条件断点("org.jboss.ejb3.interceptors.direct.IndirectContainer".equals(classname)).当断点被击中时,我回到堆栈中查找最早提到的IndirectContainer:

I started getting a bit desparate, so I connected the debugger and created a conditional breakpoint ("org.jboss.ejb3.interceptors.direct.IndirectContainer".equals(classname)) on the constructor of org.jboss.mx.loading.ClassLoadingTask. When the breakpoint was hit, I went back down the stack to find the earliest mention of IndirectContainer:

在左侧,您可以看到(我希望-在我的小屏幕上看起来不太清楚),对UnifiedClassloader3.classLoadInternal()的调用下面是一个本地调用(我看不到任何值),并且然后有一个呼叫UnifiedClassloader3.defineClass():

On the left hand side you can see (I hope - it's not looking very clear on my small screen) that below the call to UnifiedClassloader3.classLoadInternal() is a native call (which I can't see any values of), and then there is a call to UnifiedClassloader3.defineClass():

在此呼叫中,您可以看到突出显示的部分(蓝色,右下角)jboss-ejb3-core-client.jar-我与Classloaders的工作不多,但是我假设为IndirectContainer实例化ClassLoadingTask的决定是由于.jar文件的内容.

In this call, you can see highlighted (in blue, bottom right) jboss-ejb3-core-client.jar - I don't work with Classloaders much, but I am assuming that the decision to instantiate a ClassLoadingTask for IndirectContainer was taken because of the contents of this .jar file.

据我所知,此.jar中没有提及IndirectContainer.

As far as I can see there is no mention of IndirectContainer in this .jar.

希望这足以使人们认识到问题.

Hopefully that's enough detail for someone to recognise the problem.

推荐答案

经过大量的调试和源代码检查,我找到了解决方案.

I found the solution after a lot of debugging and checking of source code.

我们的应用服务器的类路径包括JBoss 5.1.0.GA中的jboss-ejb3-core-client.jar,因此它可以与JBoss5.1.0应用服务器上公开的EJB进行通信.在我们的类路径中也有jboss-ejb3-client.jar.两者都包含类org.jboss.ejb3.EJBContainer,但是只有第一个.jar中的类实现了org.jboss.ejb3.interceptors.direct.IndirectContainer,而这在我们的类路径中是没有的.

Our appserver's classpath included jboss-ejb3-core-client.jar from JBoss 5.1.0.GA, so that it could talk to EJBs exposed on JBoss5.1.0 appservers. There is also jboss-ejb3-client.jar in our classpath. Both contain the class org.jboss.ejb3.EJBContainer but only the class in the first .jar implements org.jboss.ejb3.interceptors.direct.IndirectContainer, which we didn't have in our classpath.

在最初的问题中,我写道:

In my original question, I wrote:

据我所知没有 在此提及IndirectContainer .jar.

As far as I can see there is no mention of IndirectContainer in this .jar.

...这显然是错误的.

...which was obviously wrong.

因此,我写了另一个问题,询问是否有任何工具可以更快地识别出这一点.如果没有,我会写一个.

Therefore, I have written another question asking if there are any tools that could have identified this much more quickly. If there aren't, I'll write one.

这篇关于JBoss 4.2启动会引发NoClassDefFoundError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆