JaxWS ClassCastException on JBoss

前端 未结 3 955
野趣味
野趣味 2021-01-22 23:08

I\'m using JBoss 5.1.0.GA (for JDK6), and jaxws 2.2.6. When I invoke the webservice, I get the following exception:

java.util.ServiceConfigurationError: j

3条回答
  •  执笔经年
    2021-01-22 23:42

    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:

    
        
            com.example:archive=unique-archive-name
            java2ParentDelegation=false
        
    
    

    ...

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

提交回复
热议问题