Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-2470

xslt check in jackrabbit ProviderImpl unfriendly for non sun jdks

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 4.0
    • 3.6.3
    • core
    • None

    Description

      As a workaround for the well known xslt problem in tomcat MAGNOLIA-1958 a long time ago we added a check in info.magnolia.jackrabbit.ProviderImpl that explicitly replaces the default bad transformer with one that can be found in the jvm.

      This is the relevant code:

              if (SystemUtils.isJavaVersionAtLeast(1.5f)
                  && "org.apache.xalan.processor.TransformerFactoryImpl".equals(System
                      .getProperty("javax.xml.transform.TransformerFactory"))) {
      
                  log.info("Java 1.5 detected, setting system property \"javax.xml.transform.TransformerFactory\" to "
                      + "\"com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl\"");
      
                  System.setProperty(
                      "javax.xml.transform.TransformerFactory",
                      "com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl");
              }
      

      Unfortunately, this check may also be triggered when using a non-sun jdk: when using the IBM 5.0 jdk which ships by default with WAS 6.0 this code causes a ClassNotFound exception as soon as the xslt transformer is used since the sun class is obviously not in the classpath.

      Without any big change to this delicate stuff, I think we should at least add a check that verifies that the com.sun... transformer is available before setting it up.

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              fgiust Fabrizio Giustina
              fgiust Fabrizio Giustina
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Checklists

                  Bug DoR
                  Task DoD