I'm trying to move from Xalan to Saxon for the XSLT 2.0 support. I no longer
have any Xalan artifacts in the environment and instead am using Saxon
9.1.0.8. On startup, I'm seeing this exception. Note however that
transformations seem to be working fine. I'd just like to get this error
cleared up in case it's causing an issue I just haven't run into yet. Thanks!
It looks as if Spring (or an application using Spring) is using the JAXP
mechanism to find a DOM implementation, and for some reason is finding the
Saxon DOM implementation. This isn't a good idea, because Saxon's DOM
implementation isn't a general-purpose one, and there are lots of things it
doesn't support, for example update. So why is it finding it? Saxon doesn't
register this implementation in the JAR file manifest, so I don't think it's
finding it simply from the classpath search; that would suggest someone is
setting the relevant system property. Setting the system property
jaxp.debug="1" might shed more light as to why this DocumentBuilder is being
loaded.
It's possible that the problem is benign in that the DocumentBuilder is being
loaded but isn't being used, or properties are being set on it that aren't
actually needed; or perhaps Spring catches the exception and recovers by
loading a different DocumentBuilder. But I agree with you, it would be better
to stop it happening.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2012-01-31
Found and removed the system property... fixed. Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm trying to move from Xalan to Saxon for the XSLT 2.0 support. I no longer
have any Xalan artifacts in the environment and instead am using Saxon
9.1.0.8. On startup, I'm seeing this exception. Note however that
transformations seem to be working fine. I'd just like to get this error
cleared up in case it's causing an issue I just haven't run into yet. Thanks!
It looks as if Spring (or an application using Spring) is using the JAXP
mechanism to find a DOM implementation, and for some reason is finding the
Saxon DOM implementation. This isn't a good idea, because Saxon's DOM
implementation isn't a general-purpose one, and there are lots of things it
doesn't support, for example update. So why is it finding it? Saxon doesn't
register this implementation in the JAR file manifest, so I don't think it's
finding it simply from the classpath search; that would suggest someone is
setting the relevant system property. Setting the system property
jaxp.debug="1" might shed more light as to why this DocumentBuilder is being
loaded.
It's possible that the problem is benign in that the DocumentBuilder is being
loaded but isn't being used, or properties are being set on it that aren't
actually needed; or perhaps Spring catches the exception and recovers by
loading a different DocumentBuilder. But I agree with you, it would be better
to stop it happening.
Found and removed the system property... fixed. Thanks!