5

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

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

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.

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

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.

4

1 回答 1

1

不确定这是否有帮助,但我们遇到了 Jetty 8 和 java 6 的注释问题。长话短说,该版本中的注释处理似乎依赖于 libasm,例如字节码检查。所以我们必须小心

  • 我们用什么来编译我们的类(例如,JDK 版本等...)
  • 我们不会通过依赖项提取多个 asm/javassist 库并最终加载错误的库

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

于 2012-10-17T12:57:47.847 回答