3 Replies Latest reply on Apr 11, 2009 4:46 AM by sun-certified

    JAXBException: class com.sun.xml.ws.security.opt.crypto.dsig

    sun-certified

      hi again forum,

      my system: jboss as 5.0.1.GA-jdk6, sun jdk 6.0.12, metro 3.1.0, eclipse ganymede, neatbeans 6.5.1, windows xp

      i built a jbossws webservice from a pojo.

      i followed a combination of the jbossws instructions for configuring jbossws' metro wsit implementation, plus the more comprehensive instructions provided by sun for their original implementation of metro. i've been able to successfully configure jbossws for the ws-policy symmetric binding (server cert authn) authn mechanism. but that was done just as a proof of concept. my real requirement is to configure my web service for mutual certificate authentication.

      using neatbeans 6.5.1 and glassfish v2.1, i am able to successfully configure mutual cert authn on glassfish by following the instructions in the glassfish docs. that took 15 minutes, max. i wish i could say the same for jboss.

      for some reason, i'm getting: "com.sun.xml.ws.security.opt.crypto.dsig.SignedInfo nor any of its super class is known to this context" errors. i've upgraded my jdk from j2se 5 to jdk 6. i've copied jaxb-api.jar, jaxws-api.jar and saaj-api.jar from the jboss 5.0.1.GA-jdk6installation to $JAVA_HOME/jre/lib/endorsed; i tried rolling back to jboss 4.2.3 - and then back to jboss 5.0.1 again; at one point, i also added @XmlSeeAlso(com.sun.xml.ws.security.opt.crypto.dsig.SignedInfo.class) to my SEI. but i still get this error!

      one of my colleagues suggested that it might be worth turning off jboss' implementation of metro, and dropping in sun's metro implementation jars instead. my first thought was, "there's no way that would work!" am i right? surely, jboss's own implementation of metro will work best with jboss' other components. right? or maybe i am missing something fundamental, and the two implementations really are interchangeable. it would be great if it were the case. but that can't be right. can it? it seems to me it would cause even more problems that i'd hope to solve.

      please, can anybody help a guy out?

      thanks in advance for your help.

      ==========================

      package net.javafreelancer.tutorials.jboss;
      
      import javax.servlet.http.HttpServlet;
      
      import java.io.IOException;
      import java.io.PrintWriter;
      import java.net.URL;
      
      import javax.servlet.ServletException;
      import javax.servlet.http.*;
      import javax.xml.ws.WebServiceRef;
      
      public class MutualCertTestClientServlet extends HttpServlet {
      
       /**
       *
       */
       private static final long serialVersionUID = -8952375438224208530L;
      
       @WebServiceRef(wsdlLocation = "http://localhost:6060/MutualCertTestApp/MutualCertTestService?wsdl")
       private MutualCertTestServiceService service;
      
      
      
       public MutualCertTestClientServlet() {
       }
      
       protected void processRequest(HttpServletRequest request,
       HttpServletResponse response) throws ServletException, IOException {
       service = new MutualCertTestServiceService();
       PrintWriter out;
       response.setContentType("text/html;charset=UTF-8");
       out = response.getWriter();
       try {
       out.println("<html>");
       out.println("<head>");
       out.println("<title>Servlet MutualCertTestClientServlet</title>");
       out.println("</head>");
       out.println("<body>");
       out.println((new StringBuilder()).append(
       "<h1>Servlet MutualCertTestClientServlet at ").append(
       request.getContextPath()).append("</h1>").toString());
       try {
       MutualCertTestService port = service.getMutualCertTestPort();
       String result = port.testGetUserPrincipal();
       out.println((new StringBuilder())
       .append("<p>User Principal = ").append(result)
       .toString());
      
       } catch (Exception ex) {
       out.println((new StringBuilder()).append("<p>Exception = ")
       .append(ex).toString());
       }
       out.println("</body>");
       out.println("</html>");
       out.close();
       } finally {
       out.close();
       }
       }
      
       protected void doGet(HttpServletRequest request,
       HttpServletResponse response) throws ServletException, IOException {
       processRequest(request, response);
       }
      
       protected void doPost(HttpServletRequest request,
       HttpServletResponse response) throws ServletException, IOException {
       processRequest(request, response);
       }
      
       public String getServletInfo() {
       return "Short description";
       }
      
      }
      


      ==========================

      package net.javafreelancer.tutorials.jboss;
      
      import java.security.Principal;
      
      import javax.annotation.Resource;
      import javax.jws.WebMethod;
      import javax.jws.WebParam;
      import javax.jws.WebService;
      import javax.xml.bind.annotation.XmlSeeAlso;
      import javax.xml.ws.WebServiceContext;
      
      
      //@XmlSeeAlso(com.sun.xml.ws.security.opt.crypto.dsig.SignedInfo.class)
      @WebService(
       name="MutualCertTestService",
       portName = "MutualCertTestPort"
       )
      public class MutualCertTestService {
      
       @Resource
       WebServiceContext wsCtx;
      
       @WebMethod(operationName="testGetUserPrincipal",action="testGetUserPrincipal")
       public String testGetUserPrincipal()
       {
       Principal principal = wsCtx.getUserPrincipal();
       String name = null;
       if(principal != null)
       name = principal.getName();
       return name;
       }
       @WebMethod(operationName="testIsUserInRole",action="testIsUserInRole")
       public boolean testIsUserInRole(@WebParam(name="role") String role)
       {
       return wsCtx.isUserInRole(role);
       }
      
      }
      

      ==========================

      ...
      2009-04-09 01:11:03,515 DEBUG [com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory] (http-127.0.0.1-8080-1) Using optimized Accessor for protected java.lang.String com.sun.xml.security.core.dsig.SignaturePropertyType.target
      2009-04-09 01:11:03,515 DEBUG [com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory] (http-127.0.0.1-8080-1) Using optimized Accessor for protected com.sun.xml.ws.security.opt.crypto.dsig.CanonicalizationMethod com.sun.xml.security.core.dsig.SignedInfoType.canonicalizationMethod
      2009-04-09 01:11:03,531 DEBUG [com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory] (http-127.0.0.1-8080-1) Using optimized Accessor for protected java.util.List com.sun.xml.security.core.dsig.CanonicalizationMethodType.content
      2009-04-09 01:11:03,531 DEBUG [com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory] (http-127.0.0.1-8080-1) Using optimized Accessor for protected java.lang.String com.sun.xml.security.core.dsig.CanonicalizationMethodType.algorithm
      2009-04-09 01:11:03,531 DEBUG [com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory] (http-127.0.0.1-8080-1) Using optimized Accessor for protected com.sun.xml.ws.security.opt.crypto.dsig.SignatureMethod com.sun.xml.security.core.dsig.SignedInfoType.signatureMethod
      2009-04-09 01:11:03,531 DEBUG [com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory] (http-127.0.0.1-8080-1) Using optimized Accessor for protected java.util.List com.sun.xml.security.core.dsig.SignatureMethodType.content
      ...
      2009-04-09 01:11:03,531 DEBUG [com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory] (http-127.0.0.1-8080-1) Using optimized Accessor for protected java.util.List com.sun.xml.security.core.dsig.SignedInfoType.reference
      2009-04-09 01:11:03,531 DEBUG [com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory] (http-127.0.0.1-8080-1) Using optimized Accessor for protected com.sun.xml.ws.security.opt.crypto.dsig.SignedInfo com.sun.xml.security.core.dsig.SignatureType.signedInfo
      2009-04-09 01:11:03,531 DEBUG [com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory] (http-127.0.0.1-8080-1) Using optimized Accessor for protected com.sun.xml.ws.security.opt.crypto.dsig.SignatureValue com.sun.xml.security.core.dsig.SignatureType.signatureValue
      2009-04-09 01:11:03,531 DEBUG [com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory] (http-127.0.0.1-8080-1) Using optimized Accessor for protected byte[] com.sun.xml.security.core.dsig.SignatureValueType.value
      ...
      2009-04-09 01:11:03,671 DEBUG [com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory] (http-127.0.0.1-8080-1) Using optimized Accessor for protected java.lang.String com.sun.xml.ws.security.secconv.impl.wssx.bindings.DerivedKeyTokenType.algorithm
      2009-04-09 01:11:03,687 ERROR [com.sun.xml.wss.logging.impl.opt.signature] (http-127.0.0.1-8080-1) WSS1701: Sign operation failed.
      com.sun.xml.wss.impl.XWSSecurityRuntimeException: javax.xml.bind.JAXBException: class com.sun.xml.ws.security.opt.crypto.dsig.SignedInfo nor any of its super class is known to this context.
       at com.sun.xml.ws.security.opt.crypto.dsig.SignatureProcessor.performRSASign(SignatureProcessor.java:147)
       at com.sun.xml.ws.security.opt.crypto.dsig.Signature.sign(Signature.java:249)
       at com.sun.xml.ws.security.opt.impl.dsig.SignatureProcessor.sign(SignatureProcessor.java:122)
       at com.sun.xml.wss.impl.filter.SignatureFilter.sign(SignatureFilter.java:544)
       at com.sun.xml.wss.impl.filter.SignatureFilter.process(SignatureFilter.java:506)
       at com.sun.xml.wss.impl.HarnessUtil.processWSSPolicy(HarnessUtil.java:93)
       at com.sun.xml.wss.impl.HarnessUtil.processDeep(HarnessUtil.java:268)
       at com.sun.xml.wss.impl.SecurityAnnotator.processMessagePolicy(SecurityAnnotator.java:186)
       at com.sun.xml.wss.impl.SecurityAnnotator.secureMessage(SecurityAnnotator.java:147)
       at com.sun.xml.wss.jaxws.impl.SecurityTubeBase.secureOutboundMessage(SecurityTubeBase.java:378)
       at com.sun.xml.wss.jaxws.impl.SecurityClientTube.processClientRequestPacket(SecurityClientTube.java:239)
       at com.sun.xml.wss.jaxws.impl.SecurityClientTube.processRequest(SecurityClientTube.java:167)
       at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:598)
       at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:557)
       at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:542)
       at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:439)
       at com.sun.xml.ws.client.Stub.process(Stub.java:222)
       at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:135)
       at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:109)
       at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)
       at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:118)
       at $Proxy335.testGetUserPrincipal(Unknown Source)
       at net.javafreelancer.tutorials.jboss.MutualCertTestClientServlet.processRequest(MutualCertTestClientServlet.java:46)
       at net.javafreelancer.tutorials.jboss.MutualCertTestClientServlet.doGet(MutualCertTestClientServlet.java:65)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
       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.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:190)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
       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.Http11Processor.process(Http11Processor.java:829)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
       at java.lang.Thread.run(Thread.java:619)
      Caused by: javax.xml.bind.JAXBException: class com.sun.xml.ws.security.opt.crypto.dsig.SignedInfo nor any of its super class is known to this context.
       at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextImpl.java:566)
       at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java:478)
       at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:325)
       at com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:172)
       at com.sun.xml.ws.security.opt.crypto.dsig.SignatureProcessor.performRSASign(SignatureProcessor.java:138)
       ... 45 more
      2009-04-09 01:11:03,703 ERROR [com.sun.xml.wss.jaxws.impl] (http-127.0.0.1-8080-1) WSSTUBE0024: Error in Securing Outbound Message.
      com.sun.xml.wss.XWSSecurityException: com.sun.xml.wss.impl.XWSSecurityRuntimeException: javax.xml.bind.JAXBException: class com.sun.xml.ws.security.opt.crypto.dsig.SignedInfo nor any of its super class is known to this context.
       at com.sun.xml.ws.security.opt.impl.dsig.SignatureProcessor.sign(SignatureProcessor.java:140)
       at com.sun.xml.wss.impl.filter.SignatureFilter.sign(SignatureFilter.java:544)
       at com.sun.xml.wss.impl.filter.SignatureFilter.process(SignatureFilter.java:506)
       at com.sun.xml.wss.impl.HarnessUtil.processWSSPolicy(HarnessUtil.java:93)
       at com.sun.xml.wss.impl.HarnessUtil.processDeep(HarnessUtil.java:268)
       at com.sun.xml.wss.impl.SecurityAnnotator.processMessagePolicy(SecurityAnnotator.java:186)
       at com.sun.xml.wss.impl.SecurityAnnotator.secureMessage(SecurityAnnotator.java:147)
       at com.sun.xml.wss.jaxws.impl.SecurityTubeBase.secureOutboundMessage(SecurityTubeBase.java:378)
       at com.sun.xml.wss.jaxws.impl.SecurityClientTube.processClientRequestPacket(SecurityClientTube.java:239)
       at com.sun.xml.wss.jaxws.impl.SecurityClientTube.processRequest(SecurityClientTube.java:167)
       at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:598)
       at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:557)
       at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:542)
       at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:439)
       at com.sun.xml.ws.client.Stub.process(Stub.java:222)
       at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:135)
       at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:109)
       at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)
       at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:118)
       at $Proxy335.testGetUserPrincipal(Unknown Source)
       at net.javafreelancer.tutorials.jboss.MutualCertTestClientServlet.processRequest(MutualCertTestClientServlet.java:46)
       at net.javafreelancer.tutorials.jboss.MutualCertTestClientServlet.doGet(MutualCertTestClientServlet.java:65)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
       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.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:190)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
       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.Http11Processor.process(Http11Processor.java:829)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
       at java.lang.Thread.run(Thread.java:619)
      Caused by: com.sun.xml.wss.impl.XWSSecurityRuntimeException: javax.xml.bind.JAXBException: class com.sun.xml.ws.security.opt.crypto.dsig.SignedInfo nor any of its super class is known to this context.
       at com.sun.xml.ws.security.opt.crypto.dsig.SignatureProcessor.performRSASign(SignatureProcessor.java:147)
       at com.sun.xml.ws.security.opt.crypto.dsig.Signature.sign(Signature.java:249)
       at com.sun.xml.ws.security.opt.impl.dsig.SignatureProcessor.sign(SignatureProcessor.java:122)
       ... 43 more
      Caused by: javax.xml.bind.JAXBException: class com.sun.xml.ws.security.opt.crypto.dsig.SignedInfo nor any of its super class is known to this context.
       at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextImpl.java:566)
       at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java:478)
       at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:325)
       at com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:172)
       at com.sun.xml.ws.security.opt.crypto.dsig.SignatureProcessor.performRSASign(SignatureProcessor.java:138)
       ... 45 more
      2009-04-09 01:11:03,718 ERROR [com.sun.xml.wss.jaxws.impl] (http-127.0.0.1-8080-1) WSSTUBE0024: Error in Securing Outbound Message.
      com.sun.xml.wss.impl.WssSoapFaultException: com.sun.xml.wss.impl.XWSSecurityRuntimeException: javax.xml.bind.JAXBException: class com.sun.xml.ws.security.opt.crypto.dsig.SignedInfo nor any of its super class is known to this context.
       at com.sun.xml.wss.impl.SecurableSoapMessage.newSOAPFaultException(SecurableSoapMessage.java:336)
       at com.sun.xml.wss.jaxws.impl.SecurityTubeBase.secureOutboundMessage(SecurityTubeBase.java:383)
       at com.sun.xml.wss.jaxws.impl.SecurityClientTube.processClientRequestPacket(SecurityClientTube.java:239)
       at com.sun.xml.wss.jaxws.impl.SecurityClientTube.processRequest(SecurityClientTube.java:167)
       at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:598)
       at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:557)
       at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:542)
       at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:439)
       at com.sun.xml.ws.client.Stub.process(Stub.java:222)
       at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:135)
       at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:109)
       at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)
       at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:118)
       at $Proxy335.testGetUserPrincipal(Unknown Source)
       at net.javafreelancer.tutorials.jboss.MutualCertTestClientServlet.processRequest(MutualCertTestClientServlet.java:46)
       at net.javafreelancer.tutorials.jboss.MutualCertTestClientServlet.doGet(MutualCertTestClientServlet.java:65)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
       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.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:190)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
       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.Http11Processor.process(Http11Processor.java:829)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
       at java.lang.Thread.run(Thread.java:619)
      Caused by: com.sun.xml.wss.XWSSecurityException: com.sun.xml.wss.impl.XWSSecurityRuntimeException: javax.xml.bind.JAXBException: class com.sun.xml.ws.security.opt.crypto.dsig.SignedInfo nor any of its super class is known to this context.
       at com.sun.xml.ws.security.opt.impl.dsig.SignatureProcessor.sign(SignatureProcessor.java:140)
       at com.sun.xml.wss.impl.filter.SignatureFilter.sign(SignatureFilter.java:544)
       at com.sun.xml.wss.impl.filter.SignatureFilter.process(SignatureFilter.java:506)
       at com.sun.xml.wss.impl.HarnessUtil.processWSSPolicy(HarnessUtil.java:93)
       at com.sun.xml.wss.impl.HarnessUtil.processDeep(HarnessUtil.java:268)
       at com.sun.xml.wss.impl.SecurityAnnotator.processMessagePolicy(SecurityAnnotator.java:186)
       at com.sun.xml.wss.impl.SecurityAnnotator.secureMessage(SecurityAnnotator.java:147)
       at com.sun.xml.wss.jaxws.impl.SecurityTubeBase.secureOutboundMessage(SecurityTubeBase.java:378)
       ... 36 more
      Caused by: com.sun.xml.wss.impl.XWSSecurityRuntimeException: javax.xml.bind.JAXBException: class com.sun.xml.ws.security.opt.crypto.dsig.SignedInfo nor any of its super class is known to this context.
       at com.sun.xml.ws.security.opt.crypto.dsig.SignatureProcessor.performRSASign(SignatureProcessor.java:147)
       at com.sun.xml.ws.security.opt.crypto.dsig.Signature.sign(Signature.java:249)
       at com.sun.xml.ws.security.opt.impl.dsig.SignatureProcessor.sign(SignatureProcessor.java:122)
       ... 43 more
      Caused by: javax.xml.bind.JAXBException: class com.sun.xml.ws.security.opt.crypto.dsig.SignedInfo nor any of its super class is known to this context.
       at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextImpl.java:566)
       at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java:478)
       at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:325)
       at com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:172)
       at com.sun.xml.ws.security.opt.crypto.dsig.SignatureProcessor.performRSASign(SignatureProcessor.java:138)
       ... 45 more
      2009-04-09 01:11:03,812 DEBUG [com.sun.xml.ws.api.pipe.Fiber] (http-127.0.0.1-8080-1) engine-JAX-WS RI 2.1.4-b01-: Stub for http://localhost:6060/MutualCertTestApp/MutualCertTestServicefiber-1 completed
      2009-04-09 01:12:49,609 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] (Thread-12) Periodic recovery - first pass <Thu, 9 Apr 2009 01:12:49>
      2009-04-09 01:12:49,609 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] (Thread-12) StatusModule: first pass
      ...
      


        • 1. Re: JAXBException: class com.sun.xml.ws.security.opt.crypto.
          ropalka

           

          "sun-certified" wrote:

          for some reason, i'm getting: "com.sun.xml.ws.security.opt.crypto.dsig.SignedInfo nor any of its super class is known to this context" errors. i've upgraded my jdk from j2se 5 to jdk 6. i've copied jaxb-api.jar, jaxws-api.jar and saaj-api.jar from the jboss 5.0.1.GA-jdk6installation to $JAVA_HOME/jre/lib/endorsed; i tried rolling back to jboss 4.2.3 - and then back to jboss 5.0.1 again; at one point, i also added @XmlSeeAlso(com.sun.xml.ws.security.opt.crypto.dsig.SignedInfo.class) to my SEI. but i still get this error!

          one of my colleagues suggested that it might be worth turning off jboss' implementation of metro, and dropping in sun's metro implementation jars instead. my first thought was, "there's no way that would work!" am i right? surely, jboss's own implementation of metro will work best with jboss' other components. right? or maybe i am missing something fundamental, and the two implementations really are interchangeable. it would be great if it were the case. but that can't be right. can it? it seems to me it would cause even more problems that i'd hope to solve.


          You have to follow installation instructions, always!
          If you want to switch the stack, use "ant deploy-jbossXYZ" from our distros.
          The stacks are interchangeable when you're using J2EE standard libraries only i.e. JAX-WS, JWS etc.
          If you're using proprietary features (non J2EE standards yet) such as WS-Security, this is not portable cross different SOAP stacks.


          • 2. Re: JAXBException: class com.sun.xml.ws.security.opt.crypto.
            sun-certified

             

            You have to follow installation instructions, always!
            If you want to switch the stack, use "ant deploy-jbossXYZ" from our distros.
            The stacks are interchangeable when you're using J2EE standard libraries only i.e. JAX-WS, JWS etc.
            If you're using proprietary features (non J2EE standards yet) such as WS-Security, this is not portable cross different SOAP stacks.


            thanks again richard.

            i'm afraid your reply flew a little bit over my head ;-)

            You have to follow installation instructions, always!


            that part i understand. and totally agree with. you're right. i did follow instructions (when i could find them ;-)) they are kind of "thin on the ground" - as they say. when i first installed jbossws, i ran ant deploy-jbossXXX on the metro 3.1.0 distro as instructed here



            If you want to switch the stack, use "ant deploy-jbossXYZ" from our distros.


            this is where you've lost me. i think. i don't _want_ to switch the stack. i _want_ to get rid of the exception i described above. the comment i made about my colleague's suggestion about dropping in sun's metro libraries was just an aside; apologies if that threw you off the scent of the real question i need and answer to.


            If you're using proprietary features (non J2EE standards yet) such as WS-Security, this is not portable cross different SOAP stacks.


            please, correct me if i'm wrong: if i understand you correctly then you are confirming my previous statement in which i was referring to proprietary features such as WS-Security as "other components":

            ...surely, jboss's own implementation of metro will work best with jboss' other components...


            apologies if i was too vague there in that statement.

            so, please can you clarify richard? are you saying that the JAXBException with the SignedInfo can be resolved by switching to a particular stack? this JAXBException on SignedInfo is happening in jbossws' metro 3.1.0 stack currently. which stack, specifically, should i switch to solve the problem?

            thanks again for your help, richard







            • 3. Re: JAXBException: class com.sun.xml.ws.security.opt.crypto.
              sun-certified

               

              "sun-certified" wrote:
              one of my colleagues suggested that it might be worth turning off jboss' implementation of metro, and dropping in sun's metro implementation jars instead.


              i hate to hijack my own thread away from the main question i asked originally. but going by the following comment from richard, it occurred to me that there might be some confusion about what i meant by "dropping in sun's metro":

              "Richard Opalka" wrote:
              ..If you want to switch the stack, use "ant deploy-jbossXYZ" from our distros...


              i'm assuming by "...our distros...", richard is talking about switching between jbossws' native, metro and cxf soap stacks.

              however, my comment - which i only mentioned as a side note originally - was referring to a suggestion one of my teammates proposed as a possible solution to my original problem (JAXBException....). he suggested my problem might possibly be solved by replacing jbossws' metro jars that come bundled with the jbossws metro distribution - with the jars that come bundled with the implementation of metro distributed by sun through their glassfish project.

              clearly, jbossws' metro distribution installation command won't work with sun's metro distribution. and even if it did, richard has already made it clear that the part of metro i'm interested in (wsit and ws-security) wouldn't work if i mixed distributions from different vendors:

              "Richard Opalka" wrote:
              ...If you're using proprietary features (non J2EE standards yet) such as WS-Security, this is not portable cross different SOAP stacks...
              .

              i find that when talking about "metro", it is usually a good idea to make it clear whether you're referring to jbossws' metro or sun's glassfish metro. if there's one thing i've learned over the past several days, its: the differences between the two different distributions are significant "If you're using proprietary features".

              the main difference being: one of them works; and the other one doesn't ;-)