Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: error with springIDE 1.2.5

  1. #11
    Join Date
    Feb 2006
    Posts
    5

    Default UserDataHandler in jre 1.4 vs 1.5

    I did some research and found the following.

    The following line was causing the exception:
    xerces 2.7.1 org.apache.xerces.dom.NodeImpl (line 1774) is:

    public Object setUserData(String key,
    Object data,
    UserDataHandler handler) {
    return ownerDocument().setUserData(this, key, data, handler);
    }

    and line 24 is:

    import org.w3c.dom.UserDataHandler;

    The problem is that JRE 1.4 does not have a org.w3c.dom.UserDataHandler at all.
    In JRE 1.4 the UserDataHandler class was in package org.apache.xerces.dom3.UserDataHandler. This both for Sun Java and IBM Java. In fact, if I download the xerces 2.7.1 source, it will not compile with java 1.4 for this reason.

    It is only in Java 1.5 that org.w3c.dom.UserDataHandler exists.

    Can you confirm this? If so, how has anyone been able to run the spring IDE plugin in a pure 1.4 environment with no 1.5 libraries in the classpath?

  2. #12
    Join Date
    Aug 2004
    Location
    Frankfurt/Main, Germany
    Posts
    253

    Default

    Quote Originally Posted by shar_deo
    The problem is that JRE 1.4 does not have a org.w3c.dom.UserDataHandler at all.
    Yes, that's true.

    Quote Originally Posted by shar_deo
    In JRE 1.4 the UserDataHandler class was in package org.apache.xerces.dom3.UserDataHandler. This both for Sun Java and IBM Java.
    Hhm, IMHO Sun's JRE 1.4 ships with Sun's buggy Crimson XML parser not Apache's Xerces. So no package 'org.apache.xerces.' should be available in a plain JRE 1.4.

    Quote Originally Posted by shar_deo
    In fact, if I download the xerces 2.7.1 source, it will not compile with java 1.4 for this reason.
    You need the separate library "xml-apis.jar" with W3C's latest DOM API. This library ships with Spring IDE's core plugin. But this library's classes seem to be shadowed by your JRE's library "xmlParserAPIs.jar" which belongs to an older version of Xerces.

    Quote Originally Posted by shar_deo
    It is only in Java 1.5 that org.w3c.dom.UserDataHandler exists.
    No, it's available in "xml-apis.jar" which is part of Xerces 2.7.1 binary dist.

    Quote Originally Posted by shar_deo
    Can you confirm this? If so, how has anyone been able to run the spring IDE plugin in a pure 1.4 environment with no 1.5 libraries in the classpath?
    Maybe they are not running IBM's J9 with an outdated Xerces (the one which uses "org.apache.xerces.dom3.UserDataHandler" instead of "org.w3c.dom.UserDataHandler") in their "endorsed" lib ;-)

    Sorry, maybe you should try a different JRE or find and remove / replace the old Xerces libs ("xmlParserAPIs.jar" and "xercesImpl.jar") from your JDK or RSA installation.

    BTW the access logs of Spring IDE's update site indicate that a few users downloaded Spring IDE v1.2.5 (in February more than 16.000 ;-).

    Torsten

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •