Uploaded image for project: 'XalanJ2'
  1. XalanJ2
  2. XALANJ-2436

Xalan must not expose bundled classes (bcel, regexp)



    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 2.7.1
    • None
    • Xalan
    • None
    • any


      I just spent the better part of half a day figuring out what caused the problem outlined in https://sourceforge.net/tracker/?func=detail&atid=614693&aid=1902137&group_id=96405.

      Xalan bundles regexp and bcel, however since one of the recommened ways of installing xalan is via the endorsed mechanism this will wreak serious havoc on any other apps that use bcel. That would be less of a problem is xalan's version were up to date, but as of 2.7.1 it still includes a version from the early stone age (see XALANJ-2423). The solution is easy: when building the aggregate jar, add an ant task to rewrite the bundled packages via jarjar (http://code.google.com/p/jarjar/). This can be trivially added to the build and creates a completely self-contained xalan jar that will not blow up the world when endorsed.

      I will attach a trivial rule file for jarjar that rewrites the embedded packages which should immediately fix any collision problems. For more information about how to use jarjar, see http://code.google.com/p/jarjar/wiki/GettingStarted


        1. rewrite-packages.rules
          0.2 kB
          Holger Hoffstätte
        2. XALAN-2436.patch
          2 kB
          Jérôme Leroux

        Issue Links



              jkesselm Joseph Kessselman
              h2o Holger Hoffstätte
              4 Vote for this issue
              9 Start watching this issue