Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[wtp-incubator-dev] Apache Xalan and XML Security

Hi there,

I'm running into a strange problem with XML Security Tools. Apache XML
Security (org.apache.xml.security, at the moment checked in in WTP
incubator, not moved to Orbit yet) requires Apache Xalan 2.7.0 or 2.7.1.
Both Xalan versions are available in Eclipse Orbit. This Xalan plug-in
has an optional dependency on Apache Xerces (org.apache.xerces, versions
between 2.9.0 and 3.0.0). And with this dependency, XML Security could
not be initialized and fails with the following exception (I removed
some parts of it):


!MESSAGE An error occurred while automatically activating bundle
org.eclipse.wst.xml.security.core (362).
!STACK 0
org.osgi.framework.BundleException: Exception in
org.eclipse.wst.xml.security.core.XmlSecurityPlugin.start() of bundle
org.eclipse.wst.xml.security.core.
	at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:1028)
	at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:984)
	at
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346)
	at
org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:265)
	at
org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:400)
	at
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:111)
	at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:427)
	at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:193)
	at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:368)
	at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:444)
	at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:397)
	at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:385)
	at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
Caused by: javax.xml.parsers.FactoryConfigurationError: Provider
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not found
	at
javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:104)
	at org.apache.xml.security.Init.init(Unknown Source)
	at
org.eclipse.wst.xml.security.core.XmlSecurityPlugin.start(XmlSecurityPlugin.java:76)
	at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:1009)
	at java.security.AccessController.doPrivileged(Native Method)
	at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:1003)
	... 56 more
Root exception:
javax.xml.parsers.FactoryConfigurationError: Provider
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not found
	at
javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:104)
	at org.apache.xml.security.Init.init(Unknown Source)
	at
org.eclipse.wst.xml.security.core.XmlSecurityPlugin.start(XmlSecurityPlugin.java:76)
	at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:1009)
	at java.security.AccessController.doPrivileged(Native Method)

After removing this optional dependency XML Security Tools is working.
In my environment, Apache Xerces 2.9.0 is available. Any ideas? Why does
an optional dependency cause such problems?

Thanks, Dominik


Back to the top