What's wrong with XML/XSL processing in Java 5?

Discussion in 'XML' started by Simon Brooke, Mar 15, 2007.

  1. Simon Brooke

    Simon Brooke Guest

    Yet another silly question, but this just might be the crucial one.

    In answer to another of my silly questions, Björn Höhrmann pointed me to
    http://home.ccil.org/~cowan/XML/tagsoup/, and as I read down the page I
    came across this paragraph:

    Warning: TagSoup will not build on Java 5.x or 6.x!
    Due to a bug in the versions of Xalan shipped with Java 5.x and 6.x,
    TagSoup will not build out of the box.

    and that reminded me that every time I've started Eclipse the last couple
    of months, I've had a nag warning:

    22:34:57,727 0 ERROR [ main ] com.oxygenxml.editor.EditorPlugin - The
    expected Xerces version Xerces-J 2.7.1 was not loaded due to the fact
    that the version XML4J 4.4.3 is added as an extension to the JVM. This
    can cause program malfunction. It is strongly recommended to remove the
    Xerces implementation located at:
    jar:file:/opt/ibm-java2-i386-50/jre/lib/xml.jar!/org/apache/xerces/impl/Version.class

    (if I do remove this jar file, Eclipse won't start at all...)

    So, is there actually something wrong with the Xalan and Xerces libraries
    shipped with Java 5 (and, specifically, as far as I'm concerned, with
    IBM's Java 5), and might this explain why I've suddenly got a lot of
    things breaking that were reliable before?

    I've kind of assumed that my stuff was breaking because it was old and
    crufty and depended on bugs in old XSL implementations, but have I
    actually installed buggy libraries with Java 5?

    This page: http://java.sun.com/j2se/1.5.0/compatibility.html and this:
    http://java.sun.com/j2se/1.5.0/docs/guide/xml/jaxp/JAXP-Compatibility_150.html
    acknowledge that there are some incompatibilities between the old
    implementations and the new, but claim that the new is better (as one
    would hope). I want my stuff to work out-of-the-box with Java 5 - not just
    IBM's Java 5, any old Java 5. But is Java 5 actually broken?

    --
    (Simon Brooke) http://www.jasmine.org.uk/~simon/
    .::;===r==\
    / /___||___\____
    //==\- ||- | /__\( MS Windows IS an operating environment.
    //____\__||___|_// \|: C++ IS an object oriented programming language.
    \__/ ~~~~~~~~~ \__/ Citroen 2cv6 IS a four door family saloon.
     
    Simon Brooke, Mar 15, 2007
    #1
    1. Advertising

  2. Simon Brooke wrote:
    > 22:34:57,727 0 ERROR [ main ] com.oxygenxml.editor.EditorPlugin - The
    > expected Xerces version Xerces-J 2.7.1 was not loaded due to the fact
    > that the version XML4J 4.4.3 is added as an extension to the JVM. This
    > can cause program malfunction. It is strongly recommended to remove the
    > Xerces implementation located at:
    > jar:file:/opt/ibm-java2-i386-50/jre/lib/xml.jar!/org/apache/xerces/impl/Version.class


    This isn't a Xalan/Xerces issue; it's a Java "system class path" issue
    combined with the fact that it didn't occur to Sun to rename the
    packages before shipping so they could easily be used alongside the
    latest Apache versions. Descriptions of the problem appear on Apache's
    website.

    Having said that: When I'm developing on Eclipse, I use the fact that
    modern versions of Eclipse can specify which system JARfiles it wants to
    use, and I turn off the JVM's copy of xml.jar. That only affects the
    JVMs launched to compile and run the app I'm working on; Eclipse
    continues to run on the JVM as normally installed.

    (Note that, by definition, the version of Apache code that's bundled
    into a JVM will run at least several releases behind the most recent
    version posted on Apache itself, just due to product release cycles. The
    Apache download will have the most recent bug fixes... and the most
    recent bugs. Whether that's an improvement or not depends on which ones
    your code happens to be sensitive to.)


    I know nothing about TagSoup, so I know nothing about whether there is a
    real bug issue in the Xalan code Sun shipped or if it's a deliberate
    change (perhaps even a bug fix!) that TagSoup failed to track.



    >
    > (if I do remove this jar file, Eclipse won't start at all...)
    >
    > So, is there actually something wrong with the Xalan and Xerces libraries
    > shipped with Java 5 (and, specifically, as far as I'm concerned, with
    > IBM's Java 5), and might this explain why I've suddenly got a lot of
    > things breaking that were reliable before?
    >
    > I've kind of assumed that my stuff was breaking because it was old and
    > crufty and depended on bugs in old XSL implementations, but have I
    > actually installed buggy libraries with Java 5?
    >
    > This page: http://java.sun.com/j2se/1.5.0/compatibility.html and this:
    > http://java.sun.com/j2se/1.5.0/docs/guide/xml/jaxp/JAXP-Compatibility_150.html
    > acknowledge that there are some incompatibilities between the old
    > implementations and the new, but claim that the new is better (as one
    > would hope). I want my stuff to work out-of-the-box with Java 5 - not just
    > IBM's Java 5, any old Java 5. But is Java 5 actually broken?
    >



    --
    Joe Kesselman / Beware the fury of a patient man. -- John Dryden
     
    Joseph Kesselman, Mar 15, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bomb Diggy
    Replies:
    0
    Views:
    452
    Bomb Diggy
    Jul 28, 2004
  2. Rocchi Cesare
    Replies:
    0
    Views:
    739
    Rocchi Cesare
    Jul 14, 2003
  3. Replies:
    1
    Views:
    3,622
    A. Bolmarcich
    May 27, 2005
  4. Replies:
    0
    Views:
    285
  5. Replies:
    2
    Views:
    94
Loading...

Share This Page