Web应用程序中的随机NoClassDefFound错误 [英] Random NoClassDefFound error in Web Application

查看:181
本文介绍了Web应用程序中的随机NoClassDefFound错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

想知道是否有任何大师可以了解以下随机发生的原因。

Wondering if any guru out there could shed an idea on why the following randomly happens.

我们在Jetty 6.1.26中部署了一个Web应用程序使用JRE进行Linux安装1.7_03

We have a web application we deploy in Jetty 6.1.26 running on a Linux installation with JRE 1.7_03

并非每次都有,但是当Jetty启动时 - 似乎是一个随机类(来自我们的项目)似乎是NoClassDefFound错误的来源。如果我们重启Jetty,他们的问题就会消失。

Not every time, but every now and then, when Jetty starts up - what appears to be a random class (from our project) seems to be the source of a NoClassDefFound error. If we restart Jetty they problem disappears.

唯一出现的模式似乎是错误根目录中的类是通过JAXB注释填充的。

The only pattern that occurs seems to be the classes at the root of the error are populated via JAXB annotations.

为了更多地了解频率,感觉这发生了1/50倍,如果是这样的话。

To give more of an idea of the frequency it feels this happens 1/50 times, if that.

我很想知道这个错误的原因和原因。

I would be interested to know the how and the why for this error.

推荐答案

不确定这会有所帮助,但我们遇到了Jetty 8和java 6的注释问题。
总而言之,该版本中的注释处理似乎依赖于libasm,例如字节码检查。因此我们必须小心

Not sure this can help but we ran into annotations problems with Jetty 8 and java 6. To make a long story short, annotations processing in that version seem to rely on libasm e.g. bytecode inspection. So we have to be careful with


  • 我们编写类的内容(例如; JDK版本等等)

  • 我们不通过依赖项拉多个asm / javassist库,最终加载错误的

我不熟悉Jetty 6和Jaxb处理注释的方式,但我真的很惊讶你可以在Java 7上运行。你能尝试用Java 6运行你的代码吗?

I am not familiar with with the way Jetty 6 and Jaxb process annotations but I am actually surprised you can get both running on Java 7. Can you try running you code with Java 6 ?

这篇关于Web应用程序中的随机NoClassDefFound错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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