JBoss 4.2 启动抛出 NoClassDefFoundError

发布于 2024-11-07 15:33:48 字数 4778 浏览 8 评论 0原文

我在启动 JBoss 4.2.2 服务器时遇到问题 - 它产生以下错误消息(来自 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):

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日志文件的数量。

我猜测库的依赖关系没有得到满足,但我不确定下一步应该做什么来诊断这个问题。有什么想法/建议吗?

(在 RHEL4 上运行)

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

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

earliest提到 IndirectContainer

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

jboss-ejb3-core-client.jar

在此调用中,您可以看到突出显示的(右下蓝色)jboss-ejb3-core-client.jar - I不太适合使用类加载器,但我假设由于此 .jar 文件的内容而做出了为 IndirectContainer 实例化 ClassLoadingTask 的决定。

据我所知,这个 .jar 中没有提到 IndirectContainer

希望这些细节足以让人们认识到这个问题。

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

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}

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?

(running on RHEL4)

I'm running JBoss (MX MicroKernel) [4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)]

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:

earliest mention of IndirectContainer

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

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.

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一笔一画续写前缘 2024-11-14 15:33:48

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

我们的应用程序服务器的类路径包含 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 ,而我们没有实现我们的类路径中没有。

在我原来的问题中,我写道:

据我所知,没有
在此提到 IndirectContainer
.jar。

……这显然是错误的。

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

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

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:

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文