0

I am migrating from JBoss 5 -> JBoss 7 and according to https://docs.jboss.org/author/display/AS7/Class+Loading+in+AS7, local resources packaged in WEB-INF/lib of a war should loaded prior to inter deployment dependencies.

Within my WEB-INF/lib directory I have the wss4j (version 1.5.7) library jar which contains the Transform.init() method.

After I deploy my app and run it I get the following error.

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

2 Answers 2

1

From the info I could find, it seems the method is not available in xmlsec after version 1.4. You could try using an older version of the jar such as:

http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/santuario/xmlsec/1.4.2/xmlsec-1.4.2.jar

Sign up to request clarification or add additional context in comments.

Comments

0

I found the same problem and I solved it setting up the following JBoss' deployment exclusion (in 7.1.1) in META-INF/jboss-deployment-structure.xml:

<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1">
    <ear-subdeployments-isolated>true</ear-subdeployments-isolated>
    <deployment>
        <dependencies>
            <module name="deployment.javaee.api" />
        </dependencies>
        <exclusions>
            <module name="javaee.api" />
        </exclusions>
    </deployment>
    <module name="deployment.javaee.api">
        <dependencies>
            <module name="javaee.api" export="true">
                <imports>
                    <exclude path="org/apache/xml/security/**" />
                </imports>
            </module>
        </dependencies>
    </module>
</jboss-deployment-structure>

From https://community.jboss.org/message/747491#747491.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.