开发者

ClassCastException with Weblogic 10.3.3/Pitchfork

开发者 https://www.devze.com 2023-01-14 19:22 出处:网络
We\'re trying to deploy a spring application to Weblogic 10.3.3. We created a war file, which works nicely with tomcat, but, when trying to package it up as an ear to use with weblogic, we\'re getting

We're trying to deploy a spring application to Weblogic 10.3.3. We created a war file, which works nicely with tomcat, but, when trying to package it up as an ear to use with weblogic, we're getting an issue 开发者_如何学JAVAwith Pitchfork:

java.lang.ClassCastException: org.springframework.jee.spi.PitchforkUtilsImpl cannot be cast to com.oracle.pitchfork.interfaces.PitchforkUtils

Why is Weblogic trying to cast this, and what are we doing wrong?

Thanks.


Notice that the error message mentions two different flavours of PitchforkUtils, which appear to be incompatible.

Without being familiar with Pitchfork, could it be an import which has been automatically "fixed" in the porting process - Eclipse can automatically resolve imports - to resolve against the Oracle PitchforkUtils instead of the one you actually want to use?


This says that WebLogic has its own version of the Pitchfork JAR, which the classloader is finding before it gets to the Spring version in your WEB-INF/lib.

Remove the Pitchfork JAR from your web context and see if that fixes the issue.

If your code imports the Spring version, you'll have to alter the code to use Oracle's.

You can also tell the class loader to prefer your app JARs to server level JARs. It's an entry in your weblogic.xml: <prefer-application-packages/>

http://relation.to/Bloggers/Weblogic10SeamAndEJB3

0

精彩评论

暂无评论...
验证码 换一张
取 消