1 Reply Latest reply on Jul 12, 2012 7:59 AM by Djed Pfeiler

    wss4j-1.5.8 - java.lang.NoSuchMethodError: org.apache.xml.security.transforms.Transform.init()

    Djed Pfeiler Newbie

      Hi,

       

      we moved from AS 7.1.0 to 7.1.1 and now have a problem with CXF 2.2.3 which uses wss4j which uses xmlsec.

      From https://issues.jboss.org/browse/AS7-4248  I have learned the version of wss4j has changed from 1.4.5 to 1.5.1 an now the class Transform does not have the method init any more.

       

      I deploy a WAR file an i really hoped I can tell JBoss not to use the wss4j from the AS7 module (1.5.1) .. but my wss4j (1.4.7) that I packaged into the WAR file.

       

      I tried jboss-deployment.structure.xml

       



      <exclusions>



      <module name="org.apache.santuario.xmlsec" />


      </exclusions>

       

      but no success.

       

      I get this error:

       

      2012-07-11 17:03:52,094 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/sim-psnt].[CXFServlet]] (http--127.0.0.1-8080-7) G() A() K() S() M() Servlet.service() for servlet CXFServlet threw exception: java.lang.NoSuchMethodError: org.apache.xml.security.transforms.Transform.init()V

                at org.apache.ws.security.WSSConfig.staticInit(WSSConfig.java:288)

                at org.apache.ws.security.WSSConfig.<init>(WSSConfig.java:304)

                at org.apache.ws.security.WSSConfig.getNewInstance(WSSConfig.java:313)

                at org.apache.ws.security.handler.WSHandler.doReceiverAction(WSHandler.java:255)

                at org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:191)

                at org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:77)

       

      Read this .. but no more clues:

      https://docs.jboss.org/author/display/AS7/Class+Loading+in+AS7

       

      Is there any other way, I can tell Jboss to use the Libs in the war file?

       

      Thx in advance!

        • 1. Re: wss4j-1.5.8 - java.lang.NoSuchMethodError: org.apache.xml.security.transforms.Transform.init()
          Djed Pfeiler Newbie

          I found a solution .. jboss-deployment-structure.xml :

           

          <?xml version="1.0" encoding="UTF-8"?>

          <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1">

                    <deployment>

                              <exclusions>

                                        <!-- first exclude-->

                                        <module name="javaee.api" />

                      </exclusions>

                              <dependencies>

                            <!-- then include filtered -->

                                        <module name="javaee.api">

                                                  <imports>

                                                            <exclude path="org/apache/xml/security/**" />

                                                  </imports>

                                        </module>

                              </dependencies>

                    </deployment>

          </jboss-deployment-structure>

           

          see

          https://community.jboss.org/message/637818#637818