0 Replies Latest reply on Apr 17, 2006 5:53 PM by tet tet

    WSS4j Integration with JBoss

    tet tet Newbie

      I am trying to use the WSS4j handlers in JBoss and getting class cast exception and class not found error on org.apache.ws.axis.security.WSDoAllReceiver. Infact this class implements the org.apache.axis.Handler and in the webservices.xml expects the javax.xml.rpc.Handler. I tried to overwrite the org.apache.axis.Handler without much luck.

      These are the steps, I followed to do the configuration.
      1.Modified the webservices to add the handler

      <handler-name>WS4jReceiver</handler-name>
      <handler-class>org.apache.ws.axis.security.WSDoAllReceiver</handler-class>
      <init-param>


      </init-param>

      </port-component>
      2. I tried to add the wss4j.jar, xmlsec and opensaml jar in my war file in WEB-INF/lib and deployed.
      I end up geeting the classnot found error - org.apache.ws.axis.security.WSDoAllReceiver.
      3. Then I added those jar files into JBOSS lib directory after taking out from the WEBINF/lib. After that i end up getting the following error.

      org.jboss.webservice.server.ServiceException: Cannot initialize webservice; nested exception is:
      javax.xml.rpc.JAXRPCException: Cannot initialize handler chain
      at org.jboss.webservice.server.InvokerProvider.initServiceDesc(InvokerProvider.java:117)
      at org.jboss.axis.handlers.soap.SOAPService.getInitializedServiceDesc(SOAPService.java:388)
      at org.jboss.axis.deployment.wsdd.WSDDService.makeNewInstance(WSDDService.java:560)
      at org.jboss.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:322)
      at org.jboss.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:307)
      at org.jboss.axis.deployment.wsdd.WSDDDeployment.getService(WSDDDeployment.java:526)
      at org.jboss.axis.configuration.FileProvider.getService(FileProvider.java:288)
      at org.jboss.axis.AxisEngine.getService(AxisEngine.java:253)
      at org.jboss.axis.transport.http.AxisServlet.doPost(AxisServlet.java:837)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.jboss.axis.transport.http.AxisServletBase.service(AxisServletBase.java:370)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at com.bluecanopy.commons.web.TransactionFilter.doHttpFilter(TransactionFilter.java:105)
      at com.bluecanopy.commons.web.BaseHttpServletFilter.doFilter(BaseHttpServletFilter.java:62)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:54)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:174)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      at java.lang.Thread.run(Thread.java:595)
      Caused by: javax.xml.rpc.JAXRPCException: Cannot initialize handler chain
      at org.jboss.webservice.handler.HandlerChainBaseImpl.addHandlersToChain(HandlerChainBaseImpl.java:114)
      at org.jboss.webservice.handler.HandlerChainBaseImpl.(HandlerChainBaseImpl.java:86)
      at org.jboss.webservice.handler.ServerHandlerChain.(ServerHandlerChain.java:49)
      at org.jboss.webservice.server.InvokerProvider.initHandlerChain(InvokerProvider.java:158)
      at org.jboss.webservice.server.InvokerProvider.initServiceDesc(InvokerProvider.java:113)
      ... 34 more
      Caused by: java.lang.ClassCastException: org.apache.ws.axis.security.WSDoAllReceiver
      at org.jboss.webservice.handler.HandlerChainBaseImpl.addHandlersToChain(HandlerChainBaseImpl.java:103)
      ... 38 more

      at org.jboss.axis.deployment.wsdd.WSDDService.makeNewInstance(WSDDService.java:564)
      at org.jboss.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:322)
      at org.jboss.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:307)
      at org.jboss.axis.deployment.wsdd.WSDDDeployment.getService(WSDDDeployment.java:526)
      at org.jboss.axis.configuration.FileProvider.getService(FileProvider.java:288)
      at org.jboss.axis.AxisEngine.getService(AxisEngine.java:253)
      at org.jboss.axis.transport.http.AxisServlet.doPost(AxisServlet.java:837)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.jboss.axis.transport.http.AxisServletBase.service(AxisServletBase.java:370)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at com.bluecanopy.commons.web.TransactionFilter.doHttpFilter(TransactionFilter.java:105)
      at com.bluecanopy.commons.web.BaseHttpServletFilter.doFilter(BaseHttpServletFilter.java:62)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:54)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:174)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      at java.lang.Thread.run(Thread.java:595)