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

JAXP 1.3 cannot be used with J2SE 1.3

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      1.3.0
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        Name: erR10175 Date: 03/23/2004



        JAXP 1.3 cannot be used with J2SE 1.3. It depends on classes from the
        org.w3c.dom.events package that are not part of J2SE 1.3.

        The test.java (see below) can be compiled with both jaxp1.2.3 and jaxp1.3,
        but runs only with jaxp1.2.3. It needs the org.w3c.dom.events.EventTarget
        class when run with jaxp1.3.

        To reproduce the bug compile and run the test.java on jdk1.3.1 using jaxp1.3
        classes as the log shows below.

        ------------------------------------------------ test.java
        import javax.xml.parsers.DocumentBuilderFactory;

        public class test {

            public static void main(String argv[]) throws Exception {
                DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
                System.out.println("OK");
            }
        }
        ----------------------------------------------------------

        ------------------------------------------------------ log
        $ls jaxp1.3/*.jar
        jaxp1.3/dom.jar jaxp1.3/sax.jar jaxp1.3/xercesImpl.jar
        jaxp1.3/jaxp-api.jar jaxp1.3/xalan.jar
        $CLASSPATH=.:jaxp1.3/dom.jar:jaxp1.3/sax.jar:jaxp1.3/xalan.jar:jaxp1.3/xercesImpl.jar:jaxp1.3/jaxp-api.jar
        $javac test.java && java -showversion test
        java version "1.3.1"
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
        Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode)

        Exception in thread "main" java.lang.NoClassDefFoundError: org/w3c/dom/events/EventTarget
                at java.lang.ClassLoader.defineClass0(Native Method)
                at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
                at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
                at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
                at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
                at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
                at java.security.AccessController.doPrivileged(Native Method)
                at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
                at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
                at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
                at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
                at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
                at java.lang.ClassLoader.defineClass0(Native Method)
                at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
                at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
                at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
                at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
                at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
                at java.security.AccessController.doPrivileged(Native Method)
                at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
                at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
                at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
                at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
                at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
                at java.lang.ClassLoader.defineClass0(Native Method)
                at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
                at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
                at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
                at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
                at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
                at java.security.AccessController.doPrivileged(Native Method)
                at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
                at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
                at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
                at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
                at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
                at java.lang.ClassLoader.defineClass0(Native Method)
                at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
                at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
                at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
                at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
                at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
                at java.security.AccessController.doPrivileged(Native Method)
                at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
                at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
                at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
                at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
                at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
                at java.lang.ClassLoader.defineClass0(Native Method)
                at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
                at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
                at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
                at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
                at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
                at java.security.AccessController.doPrivileged(Native Method)
                at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
                at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
                at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
                at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
                at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
                at org.apache.xerces.jaxp.DocumentBuilderImpl.newDocument(Unknown Source)
                at test.main(test.java:6)
        ----------------------------------------------------------

        ======================================================================

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                jsuttorsunw Jeff Suttor (Inactive)
                Reporter:
                reysunw Rey Rey (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: