0

I have a program that's working perfectly fine in Tomcat. However, we want to transition it to Weblogic. Yet, when I try to deploy it, I get the following error message:

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

The problem is, I'm running Java 1.8. I read that similar problems could be caused by Spring 2.5 (it apparently doesn't recognize anything above 1.7), but I'm using 3.2.13, and I tried downgrading to Java 1.7, just to be safe, but I got the same error message

Edit: I'm running WebLogic Server 10.3.6

Has anyone else encountered this?

Beacon80
  • 349
  • 1
  • 4
  • 14
  • Check your server configuration, you have java 8 installed does not mean that your server will using it – TuyenNTA Aug 16 '17 at 22:23
  • The server's "Monitoring -> General" tab confirms the JVM is using Java version 1.8.0_141. Vendor is Oracle Corporation. – Beacon80 Aug 16 '17 at 22:30
  • Did you try to check your [project's java version](https://stackoverflow.com/questions/23813369/spring-java-error-namespace-element-annotation-config-on-jdk-1-5-and-high)? – TuyenNTA Aug 16 '17 at 22:31
  • I did. I even ran it through Tomcat so I could have the program print out what version it was using during runtime. It confirmed that it's running 1.8.0_141 – Beacon80 Aug 16 '17 at 22:36

1 Answers1

0

You do not write which weblogic verison you use.

Note that 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.)

So make sure that you do not use the Weblogic provided Spring Implementation. You have to override the Weblogic libraries in your deployment, since provided libs are usually prefered and come first in the classpath.

See the Weblogic documentation for Spring Support for more details.

Arigion
  • 3,267
  • 31
  • 41
  • I'm running WebLogic Server 10.3.6. It looks like that might cut off at 3.0.5, so I'm dropping back to that to see if that helps. – Beacon80 Aug 17 '17 at 16:22
  • I assume that your dependencies are not ok. I would check the stacktrace which class triggers the Exception and in which package that class is located and then check if that jar has the right version. Weblogic loads own libraries first and then the provided ones if you don't overwrite that behavior in the deployment descriptor. – Arigion Aug 18 '17 at 06:31
  • I think you're right, and Weblogic is running its own Spring 2.5. I've been looking up tips on telling my program to use its own version of Spring, but when I modify the weblogic.xml function, I end up getting a NullPointerException. – Beacon80 Aug 21 '17 at 16:14
  • There are several methods and pitfalls when you want to use your own spring library depending on the WLS configuration and deployment style. see https://stackoverflow.com/a/33741222/1838233. Maybe it helps. Perhaps you missed a dependency in weblogic.xml? About your NPE: check the logfiles what happened or use remote debugging. Maybe a Bean can not be resolved during the deployment process. eg. if you try to resolve a bean from the ApplicationContext which does not exist during deployment. (eg. WLS tries to preinitalize Servlets). It might be a good idea to deploy a sample application first – Arigion Aug 21 '17 at 19:32