Heads up: mule-1.4, XML, and you

View: New views
8 Messages — Rating Filter:   Alert me  

Heads up: mule-1.4, XML, and you

by Holger Hoffstätte-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Here is some intermediate info on the state of MULE-2700 (Mule must not
add xml-apis/xerces to the classpath) and how it affects anybody building
& running on JDK 1.4. Please read the JIRA first for why this is necessary.

As of http://fisheye.codehaus.org/changelog/mule/?cs=9785 1.4 aka trunk
does not reference any SAX/DOM xml-apis or xerces any more, and will
complain loudly via m-a-v should any dependency try to do so. This is the
correct thing to do on JDK 1.5/1.6 but will cause trouble when building &
running on JDK 1.4. To fix this, you MUST drop a valid JAXP implementation
into your JDK 1.4 jre/lib/endorsed directory. This can be either Apache
Xerces or Sun's JAXP reference implementation (which is just a
rebundled/relocated Xerces plus some Sun QA).
For Xerces, get the latest release from
http://xerces.apache.org/xerces2-j/ (as of today that's 2.9.1 which works
fine) and drop the distributed jar files into an "endorsed" directory in
your JDK/JRE lib directory. I suggest to rename them according to their
spec/implementation version, so that the final directory looks like this:

$ls -1
xercesImpl-2.9.1.jar
xml-apis-1.3.04.jar
xml-resolver-1.2.jar
xml-serializer-2.7.1.jar

*Alternatively* (as in XOR) get Sun's JAXP reference implementation from
http://jaxp.dev.java.net/ and install both the -api and -impl jar.

Both drops will update the JDK 1.4 installation with modern SAX/DOM
capabilities; in the case of Sun's JAXP it will also bring the same level
of StAX support as in JDK6, though this does not affect Mule.

The Sun JAXP jars can also be used to update a JDK 1.5 installation
without harm; however this is really only necessary if you have any
special requirements or problems with the stock 1.5 XML parsers.

I have just installed the xerces-2.9.1 jars on dev.ms.com, so that is
covered when using JDK 1.4 in Bamboo.

One remaining issue is the addition of an optional "endorsed" directory to
the server wrapper (standalone server startup). Is this worth the trouble
or should we simply document that anybody using JDK 1.4 needs to either
drop it into their JDK/JRE or set the endorsed.dirs JVM property manually
to wherever they want to keep their endorsed directory? Just wondering
since everybody seems to be using at least JDK 1.5 anyway these days.

-h

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


Re: Heads up: mule-1.4, XML, and you

by Andrew Perepelytsya :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Oh, man...

Wouldn't it be simpler to provide instructions for running PSR tests instead of mangling the trunk? We specifically tried to avoid any endorsing. Even if it is broken, how often did it emerge? I'm just missing the value point here.

Andrew

Re: Heads up: mule-1.4, XML, and you

by Holger Hoffstätte-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Andrew Perepelytsya wrote:
> Oh, man...

Please complain to Sun. I am not happy about this myself but I cannot fix
the JDK either.

> Wouldn't it be simpler to provide instructions for running PSR tests
> instead of mangling the trunk?

No, and FWIW the trunk is not "mangled".

> We specifically tried to avoid any endorsing.

Yes, and that was wrong in the first place. Practically all app servers
and e.g. synapse do the same, simply because there is no other way to
guarantee reproducible behaviour with XSLT or web services. It is also
much better for support calls; my guess is that >98% of all people do not
know what is on their classpath or why, so the only sensible thing is a
single policy that leaves no room for errors.

Btw, it has also seems to have found an apparent inconsistency in our
Bamboo repo.

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


Re: Heads up: mule-1.4, XML, and you

by Dirk Olmes :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> complain loudly via m-a-v should any dependency try to do so. This is the
> correct thing to do on JDK 1.5/1.6 but will cause trouble when building &
> running on JDK 1.4. To fix this, you MUST drop a valid JAXP implementation
> into your JDK 1.4 jre/lib/endorsed directory. This can be either Apache
> Xerces or Sun's JAXP reference implementation (which is just a
> rebundled/relocated Xerces plus some Sun QA).

If you're like me no fan of putting stuff in the JRE's endorsed dir,
it's also sufficient to put the jars into a separate directory and use
-Djava.endorsed.dirs=/path/to/endorsed/dir in your MAVEN_OPTS. Works
fine for me.

Don't forget to add this to your IDE launch configurations, too ...

-dirk

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


Re: Heads up: mule-1.4, XML, and you

by Andrew Perepelytsya :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Can this prerequisite (and a tip) be documented on the http://mule.mulesource.org/display/MULE/Building+from+Source page?

Thanks,
Andrew

On Nov 19, 2007 9:31 PM, Dirk Olmes <dirk@...> wrote:
> complain loudly via m-a-v should any dependency try to do so. This is the
> correct thing to do on JDK 1.5/1.6 but will cause trouble when building &
> running on JDK 1.4. To fix this, you MUST drop a valid JAXP implementation
> into your JDK 1.4 jre/lib/endorsed directory. This can be either Apache
> Xerces or Sun's JAXP reference implementation (which is just a
> rebundled/relocated Xerces plus some Sun QA).

If you're like me no fan of putting stuff in the JRE's endorsed dir,
it's also sufficient to put the jars into a separate directory and use
-Djava.endorsed.dirs=/path/to/endorsed/dir in your MAVEN_OPTS. Works
fine for me.

Don't forget to add this to your IDE launch configurations, too ...

-dirk

---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email



Re: Heads up: mule-1.4, XML, and you

by Holger Hoffstätte-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Quick addendum to my last posting since I assumed everybody was familiar
with the "endorsed" mechanism. Please see:

  http://java.sun.com/j2se/1.4.2/docs/guide/standards/

for the official explanation what it's all about.
For all other questions, requests and bugs please comment on
http://mule.mulesource.org/jira/browse/MULE-2700.

thanks
Holger

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


Re: Re: Heads up: mule-1.4, XML, and you

by Andrew Perepelytsya :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



for the official explanation what it's all about.
For all other questions, requests and bugs please comment on
http://mule.mulesource.org/jira/browse/MULE-2700.

thanks
Holger


Holger, I don't know if it's a bug or just an error in the original instructions. You mentioned the following _4_ libs should be endorsed:
xercesImpl-2.9.1.jar
xml-apis-1.3.04.jar
xml-resolver-1.2.jar
xml-serializer-2.7.1.jar

However, the updated MAV plugin has only _3_ in its blacklist (properly reflected in the full distro):
xercesImpl-2.9.1.jar
xml-apis-1.3.04.jar
xml-serializer-2.7.1.jar

There is no xml-resolver lib now. Could you please comment?

Andrew

Re: Re: Heads up: mule-1.4, XML, and you

by Holger Hoffstätte-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Andrew Perepelytsya wrote:

> Holger, I don't know if it's a bug or just an error in the original
> instructions. You mentioned the following _4_ libs should be endorsed:
> xercesImpl-2.9.1.jar
> xml-apis-1.3.04.jar
> xml-resolver-1.2.jar
> xml-serializer-2.7.1.jar
>
> However, the updated MAV plugin has only _3_ in its blacklist (properly
> reflected in the full distro):
> xercesImpl-2.9.1.jar
> xml-apis-1.3.04.jar
> xml-serializer-2.7.1.jar
>
> There is no xml-resolver lib now. Could you please comment?

I just copied the list of 4 jars from my installed JRE which is why the
resolver jar is there as well. It is optional and therefore not needed, as
to the best of my knowledge we do not use or need XML Catalog support (see
the FAQ at http://xerces.apache.org/xerces2-j/faq-xcatalogs.html).
There should be absolutely no harm in bundling it as well, but for the
sake of minimalism I guess it will be better left out.
Dirk asked me the same question so it's a good one.. ;)

thanks
Holger

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email