[JBoss AS 7.1.1] org.xml.sax.SAXException: SAX2 driver class __redirected.__XMLReaderFactory not found
cberger Nov 26, 2012 6:14 AMHi guys,
I have a couple of difficulties when I'm using classes from the package org.xml.sax from within a bundle. I should also mention that these problems are only occassionaly. Sometimes the error is cleared automatically, as soon as I restart the server. But after further restarts, the exception occurred again. As I understand, the package org.xml.sax is normally provided by the rt.jar, so in OSGi it's the task of the system.bundle to provide this package to all other OSGi bundles. I enabled the DEBUG-Level of org.jboss.osgi.framework.internal.BundleManager to see the exported packages from the system.bundle and there is an export for org.xml.sax. By the way: What's the differnence between org.osgi.framework.system.packages.extra and org.jboss.osgi.system.packages?
Here it's an excerpt of the log:
13:42:59,090 ERROR [gofer-metaModel-service-sql] (Thread-63) [com.mwaysolutions.gofer2.metaModel.dao.impl.MetaModelDaoSqlImpl] The activate method has thrown an exception: org.apache.felix.log.LogException: java.lang.RuntimeException: java.lang.ClassNotFoundException: __redirected/__XMLReaderFactory
at com.mwaysolutions.gofer2.database.DatabaseSchemaMaintainer.maintain(DatabaseSchemaMaintainer.java:173)
at com.mwaysolutions.gofer2.metaModel.dao.impl.MetaModelDaoSqlImpl$1$1.doInConnection(MetaModelDaoSqlImpl.java:113)
at com.mwaysolutions.gofer2.metaModel.dao.impl.MetaModelDaoSqlImpl$1$1.doInConnection(MetaModelDaoSqlImpl.java:106)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:341)
at com.mwaysolutions.gofer2.metaModel.dao.impl.MetaModelDaoSqlImpl$1.doInTransaction(MetaModelDaoSqlImpl.java:106)
at com.mwaysolutions.gofer2.metaModel.dao.impl.MetaModelDaoSqlImpl$1.doInTransaction(MetaModelDaoSqlImpl.java:103)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
at com.mwaysolutions.gofer2.metaModel.dao.impl.MetaModelDaoSqlImpl.activate(MetaModelDaoSqlImpl.java:103)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_37]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_37]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_37]
at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_37]
at org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:227)
at org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:38)
at org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:591)
at org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:472)
at org.apache.felix.scr.impl.helper.ActivateMethod.invoke(ActivateMethod.java:146)
at org.apache.felix.scr.impl.manager.ImmediateComponentManager.createImplementationObject(ImmediateComponentManager.java:226)
at org.apache.felix.scr.impl.manager.ImmediateComponentManager.createComponent(ImmediateComponentManager.java:118)
at org.apache.felix.scr.impl.manager.DelayedComponentManager.createRealComponent(DelayedComponentManager.java:95)
at org.apache.felix.scr.impl.manager.AbstractComponentManager$Registered.getService(AbstractComponentManager.java:1164)
at org.apache.felix.scr.impl.manager.DelayedComponentManager.getService(DelayedComponentManager.java:88)
at org.jboss.osgi.framework.internal.ServiceState$ServiceFactoryHolder.getService(ServiceState.java:461)
at org.jboss.osgi.framework.internal.ServiceState.getScopedValue(ServiceState.java:169)
at org.jboss.osgi.framework.internal.ServiceManagerPlugin.getService(ServiceManagerPlugin.java:354)
at org.jboss.osgi.framework.internal.AbstractBundleContext.getService(AbstractBundleContext.java:348)
at org.apache.felix.scr.impl.manager.DependencyManager.getService(DependencyManager.java:785)
at org.apache.felix.scr.impl.manager.DependencyManager$1.getInstance(DependencyManager.java:1039)
at org.apache.felix.scr.impl.helper.BindMethod.getParameters(BindMethod.java:564)
at org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:226)
at org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:38)
at org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:591)
at org.apache.felix.scr.impl.helper.BaseMethod$NotResolved.invoke(BaseMethod.java:548)
at org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:472)
at org.apache.felix.scr.impl.manager.DependencyManager.invokeBindMethod(DependencyManager.java:1028)
at org.apache.felix.scr.impl.manager.DependencyManager.bind(DependencyManager.java:944)
at org.apache.felix.scr.impl.manager.DependencyManager.open(DependencyManager.java:868)
at org.apache.felix.scr.impl.manager.ImmediateComponentManager.createImplementationObject(ImmediateComponentManager.java:200)
at org.apache.felix.scr.impl.manager.ImmediateComponentManager.createComponent(ImmediateComponentManager.java:118)
at org.apache.felix.scr.impl.manager.DelayedComponentManager.createRealComponent(DelayedComponentManager.java:95)
at org.apache.felix.scr.impl.manager.AbstractComponentManager$Registered.getService(AbstractComponentManager.java:1164)
at org.apache.felix.scr.impl.manager.DelayedComponentManager.getService(DelayedComponentManager.java:88)
at org.jboss.osgi.framework.internal.ServiceState$ServiceFactoryHolder.getService(ServiceState.java:461)
at org.jboss.osgi.framework.internal.ServiceState.getScopedValue(ServiceState.java:169)
at org.jboss.osgi.framework.internal.ServiceManagerPlugin.getService(ServiceManagerPlugin.java:354)
at org.jboss.osgi.framework.internal.AbstractBundleContext.getService(AbstractBundleContext.java:348)
at org.apache.felix.scr.impl.manager.DependencyManager.getService(DependencyManager.java:785)
at org.apache.felix.scr.impl.manager.DependencyManager$1.getInstance(DependencyManager.java:1039)
at org.apache.felix.scr.impl.helper.BindMethod.getParameters(BindMethod.java:564)
at org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:226)
at org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:38)
at org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:591)
at org.apache.felix.scr.impl.helper.BaseMethod$NotResolved.invoke(BaseMethod.java:548)
at org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:472)
at org.apache.felix.scr.impl.manager.DependencyManager.invokeBindMethod(DependencyManager.java:1028)
at org.apache.felix.scr.impl.manager.DependencyManager.bind(DependencyManager.java:944)
at org.apache.felix.scr.impl.manager.DependencyManager.open(DependencyManager.java:868)
at org.apache.felix.scr.impl.manager.ImmediateComponentManager.createImplementationObject(ImmediateComponentManager.java:200)
at org.apache.felix.scr.impl.manager.ImmediateComponentManager.createComponent(ImmediateComponentManager.java:118)
at org.apache.felix.scr.impl.manager.DelayedComponentManager.createRealComponent(DelayedComponentManager.java:95)
at org.apache.felix.scr.impl.manager.AbstractComponentManager$Registered.getService(AbstractComponentManager.java:1164)
at org.apache.felix.scr.impl.manager.DelayedComponentManager.getService(DelayedComponentManager.java:88)
at org.jboss.osgi.framework.internal.ServiceState$ServiceFactoryHolder.getService(ServiceState.java:461)
at org.jboss.osgi.framework.internal.ServiceState.getScopedValue(ServiceState.java:169)
at org.jboss.osgi.framework.internal.ServiceManagerPlugin.getService(ServiceManagerPlugin.java:354)
at org.jboss.osgi.framework.internal.AbstractBundleContext.getService(AbstractBundleContext.java:348)
at org.apache.felix.scr.impl.manager.DependencyManager.getService(DependencyManager.java:785)
at org.apache.felix.scr.impl.manager.DependencyManager$1.getInstance(DependencyManager.java:1039)
at org.apache.felix.scr.impl.helper.BindMethod.getParameters(BindMethod.java:564)
at org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:226)
at org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:38)
at org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:591)
at org.apache.felix.scr.impl.helper.BaseMethod$NotResolved.invoke(BaseMethod.java:548)
at org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:472)
at org.apache.felix.scr.impl.manager.DependencyManager.invokeBindMethod(DependencyManager.java:1028)
at org.apache.felix.scr.impl.manager.DependencyManager.bind(DependencyManager.java:944)
at org.apache.felix.scr.impl.manager.DependencyManager.open(DependencyManager.java:868)
at org.apache.felix.scr.impl.manager.ImmediateComponentManager.createImplementationObject(ImmediateComponentManager.java:200)
at org.apache.felix.scr.impl.manager.ImmediateComponentManager.createComponent(ImmediateComponentManager.java:118)
at org.apache.felix.scr.impl.manager.DelayedComponentManager.createRealComponent(DelayedComponentManager.java:95)
at org.apache.felix.scr.impl.manager.AbstractComponentManager$Registered.getService(AbstractComponentManager.java:1164)
at org.apache.felix.scr.impl.manager.DelayedComponentManager.getService(DelayedComponentManager.java:88)
at org.jboss.osgi.framework.internal.ServiceState$ServiceFactoryHolder.getService(ServiceState.java:461)
at org.jboss.osgi.framework.internal.ServiceState.getScopedValue(ServiceState.java:169)
at org.jboss.osgi.framework.internal.ServiceManagerPlugin.getService(ServiceManagerPlugin.java:354)
at org.jboss.osgi.framework.internal.AbstractBundleContext.getService(AbstractBundleContext.java:348)
at com.mwaysolutions.gofer2.jaxRs.Activator$Customizer.addingService(Activator.java:70)
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:896)
at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:261)
at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:233)
at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:840)
at org.jboss.osgi.framework.internal.FrameworkEventsPlugin.fireServiceEvent(FrameworkEventsPlugin.java:528)
at org.jboss.osgi.framework.internal.ServiceManagerPlugin.registerService(ServiceManagerPlugin.java:201)
at org.jboss.osgi.framework.internal.AbstractBundleContext.registerService(AbstractBundleContext.java:301)
at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:449)
at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerComponentService(AbstractComponentManager.java:460)
at org.apache.felix.scr.impl.manager.AbstractComponentManager$Unsatisfied.activate(AbstractComponentManager.java:1025)
at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:333)
at org.apache.felix.scr.impl.manager.DependencyManager.serviceAdded(DependencyManager.java:283)
at org.apache.felix.scr.impl.manager.DependencyManager.serviceChanged(DependencyManager.java:170)
at org.jboss.osgi.framework.internal.FrameworkEventsPlugin.fireServiceEvent(FrameworkEventsPlugin.java:528)
at org.jboss.osgi.framework.internal.ServiceManagerPlugin.registerService(ServiceManagerPlugin.java:201)
at org.jboss.osgi.framework.internal.AbstractBundleContext.registerService(AbstractBundleContext.java:301)
at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:449)
at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerComponentService(AbstractComponentManager.java:460)
at org.apache.felix.scr.impl.manager.AbstractComponentManager$Unsatisfied.activate(AbstractComponentManager.java:1025)
at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:333)
at org.apache.felix.scr.impl.manager.DependencyManager.serviceAdded(DependencyManager.java:283)
at org.apache.felix.scr.impl.manager.DependencyManager.serviceChanged(DependencyManager.java:170)
at org.jboss.osgi.framework.internal.FrameworkEventsPlugin.fireServiceEvent(FrameworkEventsPlugin.java:528)
at org.jboss.osgi.framework.internal.ServiceManagerPlugin.registerService(ServiceManagerPlugin.java:201)
at org.jboss.osgi.framework.internal.AbstractBundleContext.registerService(AbstractBundleContext.java:301)
at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:449)
at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerComponentService(AbstractComponentManager.java:460)
at org.apache.felix.scr.impl.manager.AbstractComponentManager$Unsatisfied.activate(AbstractComponentManager.java:1025)
at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:333)
at org.apache.felix.scr.impl.manager.DependencyManager.serviceAdded(DependencyManager.java:283)
at org.apache.felix.scr.impl.manager.DependencyManager.serviceChanged(DependencyManager.java:170)
at org.jboss.osgi.framework.internal.FrameworkEventsPlugin.fireServiceEvent(FrameworkEventsPlugin.java:528)
at org.jboss.osgi.framework.internal.ServiceManagerPlugin.registerService(ServiceManagerPlugin.java:201)
at org.jboss.osgi.framework.internal.AbstractBundleContext.registerService(AbstractBundleContext.java:301)
at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:449)
at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerComponentService(AbstractComponentManager.java:460)
at org.apache.felix.scr.impl.manager.AbstractComponentManager$Unsatisfied.activate(AbstractComponentManager.java:1025)
at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:333)
at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:157)
at org.apache.felix.scr.impl.config.ImmediateComponentHolder.enableComponents(ImmediateComponentHolder.java:319)
at org.apache.felix.scr.impl.BundleComponentActivator.loadDescriptor(BundleComponentActivator.java:253)
at org.apache.felix.scr.impl.BundleComponentActivator.initialize(BundleComponentActivator.java:147)
at org.apache.felix.scr.impl.BundleComponentActivator.<init>(BundleComponentActivator.java:111)
at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:274)
at org.apache.felix.scr.impl.Activator.loadAllComponents(Activator.java:212)
at org.apache.felix.scr.impl.Activator.start(Activator.java:121)
at org.jboss.osgi.framework.internal.HostBundleState.transitionToActive(HostBundleState.java:300)
at org.jboss.osgi.framework.internal.HostBundleState.startInternal(HostBundleState.java:223)
at org.jboss.osgi.framework.internal.AbstractBundleState.start(AbstractBundleState.java:494)
at org.jboss.as.osgi.deployment.BundleStartTracker$1.processService(BundleStartTracker.java:144)
at org.jboss.as.osgi.deployment.BundleStartTracker$1.transition(BundleStartTracker.java:119)
at org.jboss.msc.service.ServiceControllerImpl.invokeListener(ServiceControllerImpl.java:1416)
at org.jboss.msc.service.ServiceControllerImpl.access$2700(ServiceControllerImpl.java:49)
at org.jboss.msc.service.ServiceControllerImpl$ListenerTask.run(ServiceControllerImpl.java:1954)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_37]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_37]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_37]
Caused by: org.apache.felix.log.LogException: org.xml.sax.SAXException: SAX2 driver class __redirected.__XMLReaderFactory not found
at org.xml.sax.helpers.XMLReaderFactory.loadClass(XMLReaderFactory.java:189) [rt.jar:1.6.0_37]
at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory.java:150) [rt.jar:1.6.0_37]
at com.mwaysolutions.gofer2.database.DatabaseSchemaMaintainer.maintain(DatabaseSchemaMaintainer.java:73)
... 143 more
Caused by: java.lang.ClassNotFoundException: __redirected/__XMLReaderFactory
at java.lang.Class.forName0(Native Method) [rt.jar:1.6.0_37]
at java.lang.Class.forName(Class.java:169) [rt.jar:1.6.0_37]
at org.xml.sax.helpers.NewInstance.newInstance(NewInstance.java:47) [rt.jar:1.6.0_37]
at org.xml.sax.helpers.XMLReaderFactory.loadClass(XMLReaderFactory.java:187) [rt.jar:1.6.0_37]
... 145 more
You can find the whole log file in the attachment. Please do not refer to 7.1.2 / 7.1.3 because it's a management decision to use 7.1.1
I really apprechiate any kind of input concerning the problem.
Thanks in advance.
Cheers Christian
-
server.log.zip 62.3 KB