JBoss 7.1 and Alfresco SOAP API : conflict with XMLSEC 1.4.2 and Axis 1.4

If you need tu use Axis-1.4 and wss4j-1.5 with Jboss 7, you could have some runtime exceptions with xmlsec because wss4j-1.5 needs xmlsec-1.4.2 and Jboss has xmlsec-1.5.1 in its classpath and it won’t use your application jar but the one inside Jboss modules.

I must use these versions of Axis and Wss4j because I needed to use Alfresco SOAP API which is based on these components.

after several hours spent trying to override and configure Jboss classpath with the “jboss-deployment-structure.xml” file, as explained in this post for example, nothing eventually worked for me.

So finally, I tried a very bad solution :

  • stop JBoss
  • remove the xmlsec-1.5.1.jar which is in the modules/org/apache/santuario/xmlsec/main/ folder
  • copy the xmlsec-1.4.2.jar file inside this folder
  • rename xmlsec-1.4.2.jar by xmlsec-1.5.1.jar so that Jboss indexes on its jars don’t crash.
  • start JBoss

So far, I have everything working, and did not notice any side effect of this xmlsec replacement. Note :

  • I only use JBoss to deploy a WAR which basicaly runs with Spring 3, JPA 2 and use the Alfresco SOAP API.
  • I use the JBoss console to deploy / undeploy my WAR files

If someone managed to find a better solution, or knows which side effects we could have by doing this, that would be interesting.

One thought on “JBoss 7.1 and Alfresco SOAP API : conflict with XMLSEC 1.4.2 and Axis 1.4

  1. Ruben J Garcia

    You can do it in an elegant way:
    – Create a new module in jboss server name javaee-xmlsecold.
    – Copy the module.xml file from the javaee.api module and remove the module “org.apache.santuario.xmlsec” in the dependencies list
    – Exclude module javaee.api in your jboss-deployment-structure.xml file and add a new dependence name javaee-xmlsecold.

    Hope you can fix your “bad solution”


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>