title: JBoss AS 7 - NoSuchMethodError org.apache.xml.security.transforms.Transform.init()V
body: <p>I am migrating from JBoss 5 -> JBoss 7 and according to <a href="https://docs.jboss.org/author/display/AS7/Class+Loading+in+AS7" rel="nofollow">https://docs.jboss.org/author/display/AS7/Class+Loading+in+AS7</a>, local resources packaged in WEB-INF/lib of a war should loaded prior to inter deployment dependencies.</p>
  
  <p>Within my WEB-INF/lib directory I have the wss4j (version 1.5.7) library jar which contains the Transform.init() method.</p>
  
  <p>After I deploy my app and run it I get the following error.</p>
  
  <blockquote>
    <p>ERROR
    [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/].[Resteasy]]
    (http--127.0.0.1-8080-1) Servlet.service() for servlet Resteasy threw
    exception: org.jboss.resteasy.spi.UnhandledException:
    java.lang.NoSuchMethodError:
    org.apache.xml.security.transforms.Transform.init()V
            at org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:340)
    [resteasy-jaxrs-2.3.2.Final.jar:]
            at org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:214)
    [resteasy-jaxrs-2.3.2.Final.jar:]
            at org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:190)
    [resteasy-jaxrs-2.3.2.Final.jar:]
            at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:540)
    [resteasy-jaxrs-2.3.2.Final.jar:]
            at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:502)
    [resteasy-jaxrs-2.3.2.Final.jar:]
            at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)
    [resteasy-jaxrs-2.3.2.Final.jar:]
            at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
    [resteasy-jaxrs-2.3.2.Final.jar:]
            at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
    [resteasy-jaxrs-2.3.2.Final.jar:]
            at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
    [resteasy-jaxrs-2.3.2.Final.jar:]
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
    [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
    [jbossweb-7.0.13.Final.jar:]
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
    [jbossweb-7.0.13.Final.jar:]
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
    [jbossweb-7.0.13.Final.jar:]
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
    [jbossweb-7.0.13.Final.jar:]
            at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
    [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
    [jbossweb-7.0.13.Final.jar:]
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    [jbossweb-7.0.13.Final.jar:]
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    [jbossweb-7.0.13.Final.jar:]
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
    [jbossweb-7.0.13.Final.jar:]
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
    [jbossweb-7.0.13.Final.jar:]
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
    [jbossweb-7.0.13.Final.jar:]
            at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
    [jbossweb-7.0.13.Final.jar:]
            at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_05] Caused by: java.lang.NoSuchMethodError:
    org.apache.xml.security.transforms.Transform.init()V
            at org.apache.ws.security.WSSConfig.(WSSConfig.java:81) [wss4j-1.5.2.jar:]
            at org.apache.ws.security.WSSConfig.getNewInstance(WSSConfig.java:95)
    [wss4j-1.5.2.jar:]
            at org.apache.ws.security.WSSConfig.(WSSConfig.java:47)
    [wss4j-1.5.2.jar:]
            at org.apache.ws.security.WSSecurityEngine.(WSSecurityEngine.java:51)
    [wss4j-1.5.2.jar:]
            at org.apache.ws.security.handler.WSHandler.(WSHandler.java:62)
    [wss4j-1.5.2.jar:]
            at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_05]
            at java.lang.Class.forName(Class.java:264) [rt.jar:1.7.0_05]
            at org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:177) [axis-1.4.jar:]
            at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_05]
            at org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:160)
    [axis-1.4.jar:]
            at org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:100)
    [axis-1.4.jar:]
            at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getJavaClass(WSDDDeployableItem.java:353)
    [axis-1.4.jar:]
            at org.apache.axis.deployment.wsdd.WSDDDeployableItem.makeNewInstance(WSDDDeployableItem.java:295)
    [axis-1.4.jar:]
            at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
    [axis-1.4.jar:]
            at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
    [axis-1.4.jar:]
            at org.apache.axis.deployment.wsdd.WSDDChain.makeNewInstance(WSDDChain.java:125)
    [axis-1.4.jar:]
            at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
    [axis-1.4.jar:]
            at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
    [axis-1.4.jar:]
            at org.apache.axis.deployment.wsdd.WSDDDeployment.getGlobalRequest(WSDDDeployment.java:473)
    [axis-1.4.jar:]
            at org.apache.axis.configuration.FileProvider.getGlobalRequest(FileProvider.java:269)
    [axis-1.4.jar:]
            at org.apache.axis.AxisEngine.getGlobalRequest(AxisEngine.java:365)
    [axis-1.4.jar:]
            at org.apache.axis.client.AxisClient.invoke(AxisClient.java:126)
    [axis-1.4.jar:]
            at org.apache.axis.client.Call.invokeEngine(Call.java:2784) [axis-1.4.jar:]
            at org.apache.axis.client.Call.invoke(Call.java:2767) [axis-1.4.jar:]
            at org.apache.axis.client.Call.invoke(Call.java:2443) [axis-1.4.jar:]
            at org.apache.axis.client.Call.invoke(Call.java:2366) [axis-1.4.jar:]
            at org.apache.axis.client.Call.invoke(Call.java:1812) [axis-1.4.jar:]
            
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_05]
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    [rt.jar:1.7.0_05]
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    [rt.jar:1.7.0_05]
            at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_05]
            at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:155)
    [resteasy-jaxrs-2.3.2.Final.jar:]
            at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257)
    [resteasy-jaxrs-2.3.2.Final.jar:]
            at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222)
    [resteasy-jaxrs-2.3.2.Final.jar:]
            at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211)
    [resteasy-jaxrs-2.3.2.Final.jar:]
            at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:525)
    [resteasy-jaxrs-2.3.2.Final.jar:]
            ... 19 more</p>
  </blockquote>