Hello,
I am porting an apache batik user interface that displays svg files to osgi.
Currently the application displays a simple about window. I got all osgi
dependencies solved by wrapping them or using bundles from servicemix, now
the following error occurs:
javax.xml.parsers.FactoryConfigurationError: Provider
org.apache.xerces.jaxp.SAXParserFactoryImpl not found
After searching and reading some posts, I think I need to change the
etc/jre.properties to comment out the jre provided xml libraries that
xml-apis provide. But after removing all xml.* libraries that the header of
the xml-apis bundle shows, karaf does not start anymore. I should probably
load the xml-apis earlier in the bundle startup order, but I don't know
exactly how to do that.
Do I need that xml-apis bundle at all? My other thought is that I leave
xml-apis away and somehow tell the jre where to find the correct
SAXParserFactory.
Thanks for any hints.
-marcus
environment:
---
Karaf 2.2.0
Sun Java HotSpot(TM) Server VM version 16.3-b01
version 1.6.0_20
Ubuntu 9.04, Linux version 2.6.28-19-generic, i386
stacktrace:
-
14:24:58,286 | ERROR | ExtenderThread-2 | ContextLoaderListener|
BundleApplicationContextListener 50 | 54 -
org.springframework.osgi.extender - 1.2.1 | Application context refresh
failed (OsgiBundleXmlApplicationContext(bundle=fi.somebundle.ui-display,
config=osgibundle:/META-INF/spring/*.xml))
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'springActivated' defined in URL
[bundle://57.1:0/META-INF/spring/applicationContext.xml]: Invocation of init
method failed; nested exception is
javax.xml.parsers.FactoryConfigurationError: Provider
org.apache.xerces.jaxp.SAXParserFactoryImpl not found
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)[47:org.springframework.beans:3.0.5.RELEASE]
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)[47:org.springframework.beans:3.0.5.RELEASE]
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)[47:org.springframework.beans:3.0.5.RELEASE]
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)[47:org.springframework.beans:3.0.5.RELEASE]
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)[47:org.springframework.beans:3.0.5.RELEASE]
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)[47:org.springframework.beans:3.0.5.RELEASE]
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)[47:org.springframework.beans:3.0.5.RELEASE]
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)[47:org.springframework.beans:3.0.5.RELEASE]
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)[49:org.springframework.context:3.0.5.RELEASE]
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)[53:org.springframework.osgi.core:1.2.1]
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)[53:org.springframework.osgi.core:1.2.1]
at
org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)[53:org.springframework.osgi.core:1.2.1]
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)[53:org.springframework.osgi.core:1.2.1]
at
org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132)[54:org.springframework.osgi.extender:1.2.1]
at java.lang.Thread.run(Thread.java:619)[:1.6.0_20]
Caused by: javax.xml.parsers.FactoryConfigurationError: Provider
org.apache.xerces.jaxp.SAXParserFactoryImpl not found
at javax.xml.parsers.SAXParserFactory.newInstance(Unknown
Source)[:1.6.0_20]
at
org.apache.batik.dom.util.SAXDocumentFactory.(SAXDocumentFactory.java:393)
at fi.somebundle.uidisplay.internal.About.(About.java:316)
at
fi.somebundle.uidisplay.internal.SpringActivated.showAbout(SpringActivated.java:78)
at
fi.somebundle.uidisplay.internal.SpringActivated.start(SpringActivated.java:33)
at