0 Replies Latest reply on Jun 6, 2012 11:57 AM by daniele ippoliti

    ClassCastException sending a javax.xml.soap.SOAPMessage

    daniele ippoliti Newbie

      Hello,

       

      I received today this exception

      I'm using JBOSS 5.1 GA and JDK 6 and when I try to send a SOAPMessage using the javax.xml.soap.* classes to build the request message; in the server side when I try to do the connection.call(soapMessage,URL); I receive this exception:

       

      java.lang.ClassCastException: com.sun.xml.internal.messaging.saaj.soap.ver1_1.Message1_1Impl cannot be cast to org.jboss.ws.core.soap.SOAPMessageImpl

      08:53:56,830 ERROR [com.amadeus.acm.webservice.webscript.ImportCompetitorContentFromDistribWebScript] ImportCompetitorContentFromDistribWebScript::execute() error

      java.lang.Exception: ImportCompetitorContentFromDistribWebScript::Failed to retrieve property TVPARAVD from Content server

              at com.amadeus.acm.webservice.webscript.ImportCompetitorContentFromDistribWebScript.execute(ImportCompetitorContentFromDistribWebScript.java:53)

              at org.alfresco.repo.web.scripts.RepositoryContainer$2.execute(RepositoryContainer.java:400)

              at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:381)

              at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:453)

              at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:491)

              at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:316)

              at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:352)

              at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:189)

              at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:118)

              at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

              at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:58)

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

              at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)

              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183)

              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)

              at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)

              at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)

              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

              at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)

              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)

              at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:905)

              at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:592)

              at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:2036)

              at java.lang.Thread.run(Thread.java:662)

       

      so my request is not sent by the server.

      I googled a little bit and apparently is a problem well known, but I was not able to figure out it. My endorsed folder contains the following jar:

       

      -rw-r--r-- 1 jboss-hoc tsladm   74809 2011-07-29 17:38 activation.jar

      -rw-r--r-- 1 jboss-hoc tsladm  113899 2011-07-29 17:38 jaxb-api.jar

      -rw-r--r-- 1 jboss-hoc tsladm   25165 2011-07-29 17:38 jbossws-native-jaxws-ext.jar

      -rw-r--r-- 1 jboss-hoc tsladm   55717 2011-07-29 17:38 jbossws-native-jaxws.jar

      -rw-r--r-- 1 jboss-hoc tsladm   32456 2011-07-29 17:38 jbossws-native-saaj.jar

      -rw-r--r-- 1 jboss-hoc tsladm   67798 2011-07-29 17:38 resolver.jar

      -rw-r--r-- 1 jboss-hoc tsladm  286972 2011-07-29 17:38 serializer.jar

      -rw-r--r-- 1 jboss-hoc tsladm   31325 2011-07-29 17:38 stax-api.jar

      -rw-r--r-- 1 jboss-hoc tsladm 1806314 2011-07-29 17:38 xalan.jar

      -rw-r--r-- 1 jboss-hoc tsladm 1367173 2011-07-29 17:38 xercesImpl.jar

       

      it seems to be a conflict between the soap java standard library and the jboss one. Do you have some workaround? I cannot migrate the jdk version and the jboss for other constraints in my application....

       

      thank you

      regards

      Daniele