仅在 JBoss 5.1 中出现的 UnsupportedClassVersionError

发布于 2024-10-16 00:30:06 字数 686 浏览 11 评论 0原文

我的应用程序包含第 3 方 jar (com.springsource.org.aspectj.weaver-1.6.8.RELEASE.jar) 这是用Java6编译的。我设法在运行 Java5 的 Tomcat 5.5 上使用它,但是当我尝试在 JBoss 5.1 上部署相同的应用程序时,出现错误:

[org.jboss.detailed.classloader.ClassLoaderManager] (主要)加载期间出现意外错误 of:testdata.SomeAnnotation java.lang.UnsupportedClassVersionError: .class 文件中的版本号错误

,我意识到这种情况不仅发生在我身上。 如此处所述

我的问题:
1) 为什么可以在 Tomcat 等 Web 服务器中使用这个 jar,但它仍然困扰 Jboss 5.1?
2) 为什么Jboss类加载器加载应用程序的Jweaver实现来加载它的框架,而不使用Jboss的aspectJ实现。也许我应该将其类加载配置为父级优先,这样就可以解决这个问题?

My application contains 3rd party jar (com.springsource.org.aspectj.weaver-1.6.8.RELEASE.jar)
that is compiled in Java6. I managed to use it on Tomcat 5.5 that runs Java5 but when I tried to deploy the same application on JBoss 5.1 - I get the error:

[org.jboss.detailed.classloader.ClassLoaderManager]
(main) Unexpected error during load
of:testdata.SomeAnnotation
java.lang.UnsupportedClassVersionError:
Bad version number in .class file

that I realized that happens not only to me. as described here.

my questions:
1) why is it possible to use this jar in web-servers such as tomcat but it still bothers Jboss 5.1 ?
2) Why does Jboss class loader load the application's implementaiotn of Jweaver to be used for loading it framework and it doesn't use Jboss aspectJ implementation. Perhaps I should configure its class loading to be parent-first and it will solve this problem?

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

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

发布评论

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

评论(2

半葬歌 2024-10-23 00:30:06

Java 向后兼容(Java 5.0 jar 可以在 Java 6 上运行),但不向前兼容(Java 6 jar 不能在 Java 5.0 上使用)

您需要获取为 Java 5.0 编译的第 3 方 Jar 的副本,或者将Java版本升级到版本6或更高版本。

Java is backwardly compatible, (a Java 5.0 jar can run on Java 6) but not forwardly compatible (A Java 6 jar cannot be used on Java 5.0)

You need to get a copy of the 3rd party Jar which is compiled for Java 5.0 or upgrade the version of Java to version 6 or later.

不知在何时 2024-10-23 00:30:06

有时,我们看到学生HSG修改了他们使用的jdk,为此重新配置了他们的环境,但仍然出现此异常继续发生。这可能会导致相当大的混乱,特别是如果他们从 jdk1.6 切换到 jdk1.5。几乎总是,罪魁祸首是一个或多个其他版本的 jboss 正在运行,并且所有传入请求都调用其中一个版本(使用较新的 jar 版本)。我们总是检查哪些应用程序正在运行并杀死/关闭所有其他版本的 jboss。

On occasion, we have seen that students HSG modify the jdk they use, reconfigure their environment to that end and still this exception continues to occur. This can cause a considerable amount of confusion especially if they switched from the jdk1.6 to jdk1.5. Almost always, the culprit is that one or several other versions of jboss are running and all incoming requests call on one of them (with the of the newer jars). We always check to see which apps are running and kill/shutdown all other versions of jboss.

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