dev@glassfish.java.net

Endorsing a different JAXP provider for OpenSAML

From: Philip Durbin <philipdurbin_at_gmail.com>
Date: Fri, 1 Nov 2013 09:34:08 -0400

Hello!

I was chatting with Ed Burns in #glassfish on freenode and he asked me
to email this list.

I'm starting to incorporate OIOSAML into
https://github.com/IQSS/dvn/tree/oiosaml but now whenever I change a
file in NetBeans 7.2.1 and redeploy to GlassFish 3.1.2.2 it fails and
I have to restart GlassFish. Obviously, this is killing my
productivity. :(

Here's the error it fails with:

DTD factory class org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl does
not extend from DTDDVFactory

I've done a fair amount of research into this and what I'm trying to
do now is endorse a different JAXP provider.

Why? Well, because OIOSAML is built on OpenSAML, and the OpenSAML docs
have this to say:

"OpenSAML relies heavily on JAXP 1.3 for low-level XML parsing and
creation. Some JREs, most notably Sun's, ship with horribly broken
JAXP implementations. As such you may (in the Sun JRE case, you must)
endorse a different JAXP provider." --
https://wiki.shibboleth.net/confluence/display/OpenSAML/OSTwoUsrManJavaInstall

To keep this nice and reproducible, I've set up a very minimal JSF
project that includes OIOSAML and where I can easily reproduce the
error with the equivalent of:

asadmin redeploy --name myapp myapp.war

Here's my write up of the minimal app and the Xerces DTDDVFactory
issue: https://github.com/pdurbin/oiosaml_on_glassfish/issues/1

In my latest comment on that issue, I pointed Ed at my first attempt
to endorse a different JAX provider, like the OpenSAML docs suggest:
http://dvn-5.hmdc.harvard.edu/tmp/oiosaml_on_glassfish/wars/endorsed/1/oiosaml_on_glassfish-1.0-SNAPSHOT.war

He said he'd take a look but he had a meeting to run to and asked that
I email this list:
http://www.evanchooly.com/logs/%2523glassfish/2013-11-01

I'm new to Maven so please forgive my inexperience in this area. If
anyone can suggest changes to my pom file, please let me know!

Thanks,

Phil
http://greptilian.com