1 Reply Latest reply on Dec 1, 2010 3:56 AM by Alessio Soldano

    JBossWS 3.4.0.CR3 with Spring - duplicate jars?

    Dietrich Schmidt Newbie

      Hi,
      to use CXF with Spring in JBoss 6 CR1, I compiled JBossWS 3.4.0.CR3
      through executing ant -Dspring=true deploy-jboss600.
      It compiled fine and installed the JBossWS files.
      However, some jars seem to have different names than in JBoss 6:
      (1) why are the files
      jaxb-api.jar and jaxws-api.jar copied to $JBOSS_HOME/lib/endorsed?
      The files jboss-jaxb-api_2.2_spec.jar and jboss-jaxws-api_2.2_spec.jar
      are already in $JBOSS_HOME/lib/endorsed and seem to have the same content.
      (2) why are the files
      jaxrpc-api.jar and jaxws-api.jar copied to $JBOSS_HOME/common/lib?
      The files jboss-jaxrpc-api_1.1_spec.jar and jboss-jaxws-api_2.2_spec.jar
      are already in $JBOSS_HOME/common/lib and seem to have the same content.
      Other files:
      lib/wstx.jar - lib/wstx-lgpl.jar
      client/wstx.jar - client/wstx-lgpl.jar
      By the way, what happens if there are two jars with
      different names and the same class files?
      Is it just a wast of hard disk space and the second one is ignored?

      Hi,

       

      to use CXF with Spring in JBoss 6 CR1, I compiled JBossWS 3.4.0.CR3

      through executing ant -Dspring=true deploy-jboss600.

      It compiled fine and installed the JBossWS files.

       

      However, some jars seem to have different names than in JBoss 6:

       

      jaxb-api.jar and jaxws-api.jar copied to $JBOSS_HOME/lib/endorsed:

      The files jboss-jaxb-api_2.2_spec.jar and jboss-jaxws-api_2.2_spec.jar

      seem to have the same content.

       

      jaxrpc-api.jar and jaxws-api.jar copied to $JBOSS_HOME/common/lib:

      The files jboss-jaxrpc-api_1.1_spec.jar and jboss-jaxws-api_2.2_spec.jar

      seem to have the same content.

       

      Other files:

      lib/wstx.jar - lib/wstx-lgpl.jar

      client/wstx.jar - client/wstx-lgpl.jar

       

      This looks like a bug to me.

       

      By the way, what happens if there are two jars with

      different names and the same class files?

      Is it just a wast of hard disk space and the second one is ignored?

        • 1. Re: JBossWS 3.4.0.CR3 with Spring - duplicate jars?
          Alessio Soldano Master

          Dietrich Schmidt wrote:

           

           

          Hi,
          to use CXF with Spring in JBoss 6 CR1, I compiled JBossWS 3.4.0.CR3
          through executing ant -Dspring=true deploy-jboss600.
          It compiled fine and installed the JBossWS files.
          However, some jars seem to have different names than in JBoss 6:
          (1) why are the files
          jaxb-api.jar and jaxws-api.jar copied to $JBOSS_HOME/lib/endorsed?
          The files jboss-jaxb-api_2.2_spec.jar and jboss-jaxws-api_2.2_spec.jar
          are already in $JBOSS_HOME/lib/endorsed and seem to have the same content.
          (2) why are the files
          jaxrpc-api.jar and jaxws-api.jar copied to $JBOSS_HOME/common/lib?
          The files jboss-jaxrpc-api_1.1_spec.jar and jboss-jaxws-api_2.2_spec.jar
          are already in $JBOSS_HOME/common/lib and seem to have the same content.
          Other files:
          lib/wstx.jar - lib/wstx-lgpl.jar
          client/wstx.jar - client/wstx-lgpl.jar
          By the way, what happens if there are two jars with
          different names and the same class files?
          Is it just a wast of hard disk space and the second one is ignored?

          Hi,

           

          to use CXF with Spring in JBoss 6 CR1, I compiled JBossWS 3.4.0.CR3

          through executing ant -Dspring=true deploy-jboss600.

          It compiled fine and installed the JBossWS files.

           

          However, some jars seem to have different names than in JBoss 6:

           

          jaxb-api.jar and jaxws-api.jar copied to $JBOSS_HOME/lib/endorsed:

          The files jboss-jaxb-api_2.2_spec.jar and jboss-jaxws-api_2.2_spec.jar

          seem to have the same content.

           

          jaxrpc-api.jar and jaxws-api.jar copied to $JBOSS_HOME/common/lib:

          The files jboss-jaxrpc-api_1.1_spec.jar and jboss-jaxws-api_2.2_spec.jar

          seem to have the same content.

           

          Other files:

          lib/wstx.jar - lib/wstx-lgpl.jar

          client/wstx.jar - client/wstx-lgpl.jar

           

          This looks like a bug to me.

           

          Yes, it's a bug in the jbossws installer. Basically, the jboss-jaxws.. jboss-jaxrpc.. etc. files don't match the list of those to be removed/replaced.

          This shouldn't be a problem in this case, given the contents of the 2 versions are the same, but generally speaking this is a bug. You should be able to safely remove the duplicates.

          https://jira.jboss.org/browse/JBWS-3173

           

          This said, just a few hints: given at the time 3.4.0.CR3 was tagged, AS 6 CR1 was not out yet, the proper "target" to use when installing is 601, so "ant -Dspring=true deploy-jboss601". Moreover, if you happen to have them available, you should also be able to just add the spring libs to AS6 CR1, given it already comes with JBossWS 3.4.0.CR3 (but yes, leveraging the ws installer is probably easier)

           


          By the way, what happens if there are two jars with

          different names and the same class files?

          Is it just a wast of hard disk space and the second one is ignored?

          Actually depends on the contents of the jars. In this case it's most likely that really nothing bad happens. Generally speaking, instead, depending on the way the classloader is implemented you might end up getting classes you don't expect, or getting classloader related exceptions.