java.lang.NoClassDefFoundError: org/w3c/dom/Node -> OSGI issue?

1
I'm getting an error from the Excel importer module. First of all I tried to remove all unnessary jars from my userlib. I removed about 40 jars from the 60 jars that where there. So conflicting libraries should not be the problem. Still I'm getting a class loading error because the excel module tries to load a class from org.w3c.dom. I reproduced this outside the excel module by adding a after startup java action that executes Node node = new Node(). Same error there at runtime (at design time no errors). When googling I ran into this question http://stackoverflow.com/questions/8118404/osgi-expose-an-classnotfoundexception-org-w3c-dom-error-when-release This guy has the exact same issue and the solution is to configure something to the OSGi framework. But how can I fix this issue with Mendix? java.lang.NoClassDefFoundError: org/w3c/dom/Node at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2279) at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1501) at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75) at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at generiek.actions.StartSecurityServlet.executeAction(StartSecurityServlet.java:46) at generiek.actions.StartSecurityServlet.executeAction(StartSecurityServlet.java:1) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:53) at com.mendix.core.actionmanagement.CoreAction.doCall(SourceFile:291) at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:276) at com.mendix.core.actionmanagement.ActionManager.executeSync(SourceFile:205) at com.mendix.core.component.InternalCore.execute(SourceFile:260) at com.mendix.hm.execute(SourceFile:42) at com.mendix.hV.a(SourceFile:47) at com.mendix.hU.a(SourceFile:193) at com.mendix.hU.executeAction(SourceFile:148) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:53) at com.mendix.core.actionmanagement.CoreAction.doCall(SourceFile:291) at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:276) at com.mendix.core.actionmanagement.CustomActionMonitorImpl$$anonfun$run$1.apply(SourceFile:17) at com.mendix.core.session.Worker$$anonfun$receive$3$$anonfun$2.apply(SourceFile:155) at scala.util.Try$.apply(Try.scala:161) at com.mendix.core.session.Worker$$anonfun$receive$3.applyOrElse(SourceFile:153) at akka.actor.ActorCell.receiveMessage(ActorCell.scala:498) at akka.actor.ActorCell.invoke(ActorCell.scala:456) at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:237) at akka.dispatch.Mailbox.run(Mailbox.scala:219) at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:386) at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) Caused by: java.lang.ClassNotFoundException: org.w3c.dom.Node not found by project [87] at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532) at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75) at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2279) at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1501) at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75) at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at generiek.actions.StartSecurityServlet.executeAction(StartSecurityServlet.java:46) at generiek.actions.StartSecurityServlet.executeAction(StartSecurityServlet.java:1) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:53) at com.mendix.core.actionmanagement.CoreAction.doCall(SourceFile:291) at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:276) at com.mendix.core.actionmanagement.ActionManager.executeSync(SourceFile:205) at com.mendix.core.component.InternalCore.execute(SourceFile:260) at com.mendix.hm.execute(SourceFile:42) at com.mendix.hV.a(SourceFile:47) at com.mendix.hU.a(SourceFile:193) at com.mendix.hU.executeAction(SourceFile:148) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:53) at com.mendix.core.actionmanagement.CoreAction.doCall(SourceFile:291) at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:276) at com.mendix.core.actionmanagement.CustomActionMonitorImpl$$anonfun$run$1.apply(SourceFile:17) at com.mendix.core.session.Worker$$anonfun$receive$3$$anonfun$2.apply(SourceFile:155) at scala.util.Try$.apply(Try.scala:161) at com.mendix.core.session.Worker$$anonfun$receive$3.applyOrElse(SourceFile:153) at akka.actor.ActorCell.receiveMessage(ActorCell.scala:498) at akka.actor.ActorCell.invoke(ActorCell.scala:456) at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:237) at akka.dispatch.Mailbox.run(Mailbox.scala:219) at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:386) at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
asked
1 answers
3

This is probably because you have the same library in there just with a slightly different name (and off course a different version)

I can't remember for sure which library exactly caused this problem. I do know that I often found the three libraries below in a project. These used to give me osgi class loading issues.
xbeans.jar Replaced by xmlbeans-2.6.0.jar
resolver.jar Depricated excel import library
xml-apis.jar Depricated excel import library

You could try and see if you have any library similar to these ones. If you have you can remove them, there are newer versions included in the appstore module that won't give you this error.

answered