Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4820620

URIResolver class not found with JDK 1.4.1 (bugzilla 17030)

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 1.1
    • Fix Version/s: 1.2.3
    • Component/s: xml
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      1.2.3
    • CPU:
      x86
    • OS:
      windows_2000

      Backports

        Description

        > Here is a JAXP problem that has come to light on the
        > xalan-dev alias and that Norm Walsh encountered independently
        > this weekend. There is an Apache xalan bug, which has a patch.
        >
        > http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17030

        To get to this web site, try setting your Proxy server to

             pkg.eng.sun.com

        There has been a problem with webcache.east
        >
        > Below is Norm's response indicating that this is a serious probem.
        >
        > Don't shoot the messenger. I saw this go by and thought it important
        > to bring to everyone's attention.
        >
        > At the very least, we should have a release note for the 1.1 release
        > telling customer's the work around. Here's an snippet on that from the
        > bugzilla bug from the angry customer:
        >
        >> But Xalan kept telling me it couldn't find the class I had specified in
        >>
        >> the -URIRESOLVER command line definition. Worked fine under JDK 1.3.1.
        >> I finally figured out that I needed to put the jar file that contains my
        >> URIResolver implementation class in the endorsed directory as well.
        >>
        >>
        > The customer then went on to use some profanity.
        >

        > / Tom Amiro was heard to say:
        > | Norm,
        > |
        > | From a QA perspective, if the patch Ilene has come up with (see the
        > | forwarded bug report I sent you) takes care of this problem, how
        > | important would it be to try to get it into our Web Services Pack
        > release?
        > | How high a priority is this problem?
        >
        > I think it deserves a very high priority. The xml-commons resolver
        > package is unusable without this patch as are anyone else's custom
        > URIResolver()s.
        >
        > (For Tom K, the relevant bug is
        > http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17030)
        >
        > | Tom
        > |
        > | Norman Walsh wrote:
        > |
        > |>-----BEGIN PGP SIGNED MESSAGE-----
        > |>Hash: SHA1
        > |>
        > |>Hi guys,
        > |>
        > |>I've been doing some work on the resolver in xml-commons and I'm
        > |>stumbling over something I can't explain.
        > |>
        > |>If I use Java 1.3.x:
        > |>
        > |>/usr/local/jdk1.3.1/bin/java
        > -Djava.endorsed.dirs=/projects/apache/xml-xalan/java/build
        > org.apache.xalan.xslt.Process -IN resolver.xml -XSL
        > /sourceforge/docbook/xsl/html/docbook.xsl -OUT /tmp/out.html
        > -URIRESOLVER org.apache.xml.resolver.tools.CatalogResolver
        > |>
        > |>things work fine. If I use Java 1.4.x, the same command reports that
        > |>the class org.apache.xml.resolver.tools.CatalogResolver cannot be
        > |>loaded (class definition not found error).
        > |>
        > |>The classpath is the same, so I know it is out there, but I don't
        > know why
        > |>
        > |> uriResolver =
        > |> (URIResolver) Class.forName(argv[++i]).newInstance();
        > |>
        > |>doesn't find it with 1.4.x.
        > |>
        > |>Note that I am using java.endorsed.dirs to work around the problem
        > |>that an old version of Xalan is included in 1.4.
        > |>
        > |>I'm probably doing something stupid. Can anyone see what it is?
        > |>
        > |> Be seeing you,
        > |> norm
        ###@###.### 2003-02-19
        I added Ilene's (from IBM) comments on this to the Comments section.
        ###@###.### 2003-02-19

        Here's the fix Ilene did at Apache xalan-dev

        ilene 2003/02/19 09:22:31

          Modified: java/src/org/apache/xalan/xslt Process.java
          Log:
          Patch for bugzilla #17030. The command line (Process) uses the
          bootstrap classloader (in JDK1.4) instead of the system class loader to
          load classes specified by the URIResolver, EntityResolver and
          ContentHandler options.
          
          Revision Changes Path
          1.55 +3 -3 xml-xalan/java/src/org/apache/xalan/xslt/Process.java
          
          Index: Process.java
          ===================================================================
          RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xslt/Process.java,v
          retrieving revision 1.54
          retrieving revision 1.55
          diff -u -r1.54 -r1.55
          --- Process.java 3 Feb 2003 20:48:12 -0000 1.54
          +++ Process.java 19 Feb 2003 17:22:29 -0000 1.55
          @@ -463,7 +463,7 @@
                       try
                       {
                         uriResolver =
          - (URIResolver) Class.forName(argv[++i]).newInstance();
          + (URIResolver) Class.forName(argv[++i],true,ClassLoader.getSystemClassLoader()).newInstance();
           
                         tfactory.setURIResolver(uriResolver);
                       }
          @@ -492,7 +492,7 @@
                       try
                       {
                         entityResolver =
          - (EntityResolver) Class.forName(argv[++i]).newInstance();
          + (EntityResolver) Class.forName(argv[++i],true,ClassLoader.getSystemClassLoader()).newInstance();
                       }
                       catch (Exception cnfe)
                       {
          @@ -519,7 +519,7 @@
                       try
                       {
                         contentHandler =
          - (ContentHandler) Class.forName(argv[++i]).newInstance();
          + (ContentHandler) Class.forName(argv[++i],true,ClassLoader.getSystemClassLoader()).newInstance();
                       }
                       catch (Exception cnfe)
                       {
          
          
          
        ###@###.### 2003-02-20

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  gsharmasunw Gopal Sharma (Inactive)
                  Reporter:
                  duke J. Duke (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: