Weblogic - 说它需要 Java 1.5 或更高版本,尽管使用的是 1.8

Weblogic - Says it requires Java 1.5 or higher, despite using 1.8

我有一个在 Tomcat 中运行良好的程序。但是,我们希望将其转换为 Weblogic。然而,当我尝试部署它时,我收到以下错误消息:

java.lang.IllegalStateException: AnnotationTransactionAttributeSource is only available on Java 1.5 and higher

问题是,我是 运行 Java 1.8。我读到类似的问题可能是由 Spring 2.5 引起的(它显然无法识别 1.7 以上的任何东西),但我使用的是 3.2.13,我尝试降级到 Java 1.7,只是为了安全点,但我收到了同样的错误信息

编辑:我是 运行 WebLogic Server 10.3.6

有没有其他人遇到过这个?

你不用写你用的是哪个weblogic版本

注意 Weblogic 12.1.3+ does not support Spring 3.2.x

The WebLogic Server/Spring integration features in WebLogic Server 12.1.3 support Spring Framework versions 3.0.x, 3.1.x, and 4.0.x. (Note that Spring Framework version 3.2.x is not supported.)

因此请确保您没有使用 Weblogic 提供的 Spring 实现。 您必须 override the Weblogic libraries 在您的部署中,因为提供的库通常是首选,并且在类路径中排在第一位。

有关 Spring 支持的更多详细信息,请参阅 Weblogic documentation