JaxWS ClassCastException on JBoss

允我心安 提交于 2019-12-01 23:27:34

Finally, I've managed to solve my problem: I put jaxws-rt.jar in $JBOSS_HOME/lib/endorsed.

EDIT
I had the same problem on JBoss 5.1 EAP, and to solve it, the steps are a little different: in $JBOSS_HOME/lib/endorsed I removed the old jaxb-api.jar, then copied

  • jaxb-api.jar
  • jaxb-impl.jar
  • jaxws-api.jar
  • jaxws-rt.jar

from the latest jaxws-ri package, and eventually it worked.

boyd4715

I faced the same issue. I am running JBoss 5.1 EAP along with JDK 1.6_22.

I did things slightly different. I combined the solution by Carlo plus this solution.

I created an endorsed folder under $JBOSS_HOME/server//lib/endorsed. I then copied over streambuffer.jar, stax-ex.jar, policy.jar, jaxws-rt.jar, jaxws-api.jar, jaxb-impl.jar, jaxb-api.jar and gmbal-api-only.jar.

I left the $JBOSS_HOME/lib/endorsed alone.

Doing this, I was able to get it to work it all to work

I had the same problem on JBoss 5.1 EAP Instead of putting jar files into JBOSS application server it is more robust when you alter class loading logic by isolating WAR with Overriding Server Classes (http://www.jboss.org/community/wiki/classloadingconfiguration) In my case I have 3 environments. With this solution I can move war file from one JBOSS instance to another and it will still work.

I resolved this problem by: Adding this to jboss-web.xml:

<class-loading java2ClassLoadingCompliance="false">
    <loader-repository>
        com.example:archive=unique-archive-name
        <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
    </loader-repository>
</class-loading>

...

and by adding requierd jars into war (jaxb-api.jar, jaxb-impl.jar, jaxws-api.jar, jaxws-rt.jar)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!