Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Java 1.5
-
Security Level: Public (Public issues, viewable by everyone)
-
None
Description
It is stated in the release notes that "Xalan is no longer a required dependency". However, running signature creation without it produces an exception:
java.lang.NoClassDefFoundError: org/apache/xml/utils/PrefixResolver
at org.apache.xml.security.transforms.implementations.TransformXPath.enginePerformTransform(TransformXPath.java:105)
at org.apache.xml.security.transforms.Transform.performTransform(Transform.java:304)
at org.apache.xml.security.transforms.Transform.performTransform(Transform.java:281)
at org.apache.xml.security.transforms.Transforms.performTransforms(Transforms.java:272)
at org.apache.xml.security.transforms.Transforms.performTransforms(Transforms.java:248)
<...>
Both TransformXPath and TransformXPath2Filter use the same code:
XPathAPI xpathAPIInstance = new XalanXPathAPI();
if (!XalanXPathAPI.isInstalled()) {
xpathAPIInstance = new JDKXPathAPI();
}
which is supposed to provide a way to get either Xalan or JDK -based XPathAPI implementation.
However, the XalanXPathAPI class in turn imports Xalan classes and hence just can not be loaded without it.
And BTW, I think it would be better to provide a factory to get the XPathAPI implementation from, instead of repeating the above code lines.