1 Reply Latest reply on Jun 28, 2005 1:22 PM by mlybarger

    xerces/xalan error migrating war

    mlybarger

      we currently have an error running xerces/xalan on jboss. our web app is deployed fine to a stock 4.1.30 tomcat instance. we wanted to use jboss 4.0.0 instead. when running the application we see an error like:

      17:02:06,345 INFO [STDOUT] java.lang.NoSuchFieldError: S_KEY_INDENT_AMOUNT
      17:02:06,345 INFO [STDOUT] at org.apache.xalan.serialize.SerializerToXML.in
      it(SerializerToXML.java:408)
      17:02:06,376 INFO [STDOUT] at org.apache.xalan.serialize.SerializerToXML.in
      it(SerializerToXML.java:387)...

      i've tried to play around with these settings in the jboss-service.xml of the tomcat deployer, but have not been successfull.

      false
      true

      maybe the app is depending on _some_ stuff from the 4.1.30 tomcat, and relying on others from it's deploy.

      if anyone has suggestions on this it would be most appreciated.

        • 1. Re: xerces/xalan error migrating war
          mlybarger

          i'll just give a bit more details. i've been learning (or trying to learn) too much about jboss class loaders and such lately. it always seems to come back to the jdk including stuff that it probably shouldn't include. (these xml parsers).

          the sun jdk 1.4.2_06 or so includes some old, but usable xalan/xerces classes. i think this is where our app is getting them from when it runs. the problem seems to be that we have xerces.jar, xalan.jar and xml-apis.jar in our web-inf/lib folder. i would like to tell the container to always pull from these classes first, but it seems to pull from the rt where it can find it, then from my jars next. actually it seems to pull from the jboss 4.0.0 endorsed dirs first, then the rt, then the war's WEB-INF/lib. no matter what i put for these attributes:

          true
          true

          if there's a class in the jboss endorsed dir, or one in the rt, it seems to pick up from there first before from my web-inf/lib folder. changing these settings seem to only effect loading 3rd party jars from the server/default/lib folder. is this the expected behavior?

          is there a way to get my web app to use the xerces/xalan from it's web-inf/lib folder before looking at the rt.jar? it even seems that ibm's jdk and sun's jdk includes quite different versions of the xerces/xalan libs. our web app uses fop, and seems to require a specific version of xerces/xalan.

          ~thanks