XMLWordPrintable

    • Sprint 2, 8.0.0 - Sprint 1, 8.0.0 - CR1

      2 tests are failing (set to @Ignore currently):

      • org.jboss.tools.fuse.transformation.model.xml.XmlModelGeneratorIT.generateFromInstance()
      • org.jboss.tools.fuse.transformation.model.xml.XmlModelGeneratorIT.generateFromInstanceWithMultipleNamespaces()

      The tests reveals real issue. it doesn't either in the UI.

      The error is:

      java.lang.ExceptionInInitializerError
      	at org.apache.xmlbeans.impl.xb.xsdschema.SchemaDocument$Factory.newInstance(SchemaDocument.java:752)
      	at org.apache.xmlbeans.impl.inst2xsd.util.TypeSystemHolder.getSchemaDocumentForTNS(TypeSystemHolder.java:137)
      	at org.apache.xmlbeans.impl.inst2xsd.util.TypeSystemHolder.getSchemaDocuments(TypeSystemHolder.java:105)
      	at org.apache.xmlbeans.impl.inst2xsd.Inst2Xsd.inst2xsd(Inst2Xsd.java:304)
      	at org.jboss.tools.fuse.transformation.core.model.xml.XmlModelGenerator.generateFromInstance(XmlModelGenerator.java:225)
      	at org.jboss.tools.fuse.transformation.model.xml.XmlModelGeneratorIT.generateFromInstance(XmlModelGeneratorIT.java:54)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:497)
      	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
      	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
      	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      	at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
      	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
      	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
      	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
      	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
      	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
      	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
      	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
      	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
      	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
      	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
      	at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.main(RemotePluginTestRunner.java:62)
      	at org.eclipse.pde.internal.junit.runtime.PlatformUITestHarness$1.run(PlatformUITestHarness.java:47)
      	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
      	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
      	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4155)
      	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3772)
      	at org.eclipse.jface.window.Window.runEventLoop(Window.java:827)
      	at org.eclipse.jface.window.Window.open(Window.java:803)
      	at org.jboss.tools.usage.event.UsageReporter$6.run(UsageReporter.java:364)
      	at org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:162)
      	at org.eclipse.ui.internal.UISynchronizer$3.run(UISynchronizer.java:154)
      	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
      	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
      	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4155)
      	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3772)
      	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
      	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
      	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
      	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
      	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:694)
      	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
      	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:606)
      	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
      	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139)
      	at org.eclipse.pde.internal.junit.runtime.NonUIThreadTestApplication.runApp(NonUIThreadTestApplication.java:54)
      	at org.eclipse.pde.internal.junit.runtime.UITestApplication.runApp(UITestApplication.java:47)
      	at org.eclipse.pde.internal.junit.runtime.NonUIThreadTestApplication.start(NonUIThreadTestApplication.java:48)
      	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
      	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
      	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
      	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
      	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:497)
      	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
      	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
      	at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
      	at org.eclipse.equinox.launcher.Main.main(Main.java:1488)
      Caused by: java.lang.RuntimeException: Cannot load SchemaTypeSystem. Unable to load class with name schemaorg_apache_xmlbeans.system.sXMLSCHEMA.TypeSystemHolder. Make sure the generated binary files are on the classpath.
      	at org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(XmlBeans.java:783)
      	at org.apache.xmlbeans.impl.xb.xsdschema.SchemaDocument.<clinit>(SchemaDocument.java:19)
      	... 70 more
      Caused by: java.lang.ClassNotFoundException: schemaorg_apache_xmlbeans.system.sXMLSCHEMA.TypeSystemHolder cannot be found by org.apache.xmlbeans_2.3.0.v201405241900
      	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:439)
      	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)
      	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)
      	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      	at org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(XmlBeans.java:769)
      	... 71 more
      

      Current investigation:

      • the library is playing with some classloaders (not a good thign in OSGi world)
      • the library used is 2.3.0, the last one is 2.6.0 released in 2012 (but not provided as OSGi version)
      • the library is based on an Apache project which has been retired since 05/2014
      • not found viable alternatives:
        • xsd-gen: maintained by a single guy and with no license
        • xmlspy from Oxygen with commercial license
        • trang with last release from 2008
        • jaxb and xerces seem not providing this kind of feature
      • I cannot found the SchemaDocument source code in which the error occured
      • decompilation leads to this strange line
        (SchemaType)XmlBeans.typeSystemForClassLoader(
        	(1.class$org$apache$xmlbeans$impl$xb$xsdschema$SchemaDocument == null ?
        		(1.class$org$apache$xmlbeans$impl$xb$xsdschema$SchemaDocument = 1.class$("org.apache.xmlbeans.impl.xb.xsdschema.SchemaDocument"))
        		: 1.class$org$apache$xmlbeans$impl$xb$xsdschema$SchemaDocument).getClassLoader()
        	, "schemaorg_apache_xmlbeans.system.sXMLSCHEMA")
        .resolveHandle("schema0782doctype");

        which results with the EquinoxClassloader of the plugin org.apache.xmlbeans trying to load the class: schemaorg_apache_xmlbeans.system.sXMLSCHEMA.TypeSystemHolder and in the binary plugin in this folder there are only xsb files

              apupier@redhat.com Aurélien Pupier
              apupier@redhat.com Aurélien Pupier
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: