Weblogic 10.3.3/Pitchfork的Cla​​ssCastException [英] ClassCastException with Weblogic 10.3.3/Pitchfork

查看:141
本文介绍了Weblogic 10.3.3/Pitchfork的Cla​​ssCastException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在尝试将Spring应用程序部署到Weblogic 10.3.3.我们创建了一个war文件,该文件可与tomcat很好地配合使用,但是,当尝试将其打包为与weblogic一起使用时,我们遇到了Pitchfork的问题:

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 with Pitchfork:

java.lang.ClassCastException:org.springframework.jee.spi.PitchforkUtilsImpl无法转换为com.oracle.pitchfork.interfaces.PitchforkUtils

为什么Weblogic试图强制执行此操作,而我们在做什么错呢?

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

谢谢.

推荐答案

这表示WebLogic拥有自己的Pitchfork JAR版本,在您的WEB-INF/lib中,类加载器在找到Spring版本之前会找到它.

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.

从您的网络上下文中删除Pitchfork JAR,看看是否可以解决问题.

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

如果您的代码导入了Spring版本,则必须更改代码才能使用Oracle的代码.

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

您还可以告诉类加载器,将您的应用JAR优先于服务器级JAR.这是您的weblogic.xml中的条目:<prefer-application-packages/>

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

这篇关于Weblogic 10.3.3/Pitchfork的Cla​​ssCastException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆