Home » Archived » XML Schema Definition (XSD) » errors using XSD as plugin, UnknownHostException and NPE
errors using XSD as plugin, UnknownHostException and NPE [message #63953] |
Tue, 27 September 2005 17:58 |
Francis Upton IV Messages: 472 Registered: July 2009 Location: Oakland, CA |
Senior Member |
|
|
I have previously used the wonderful XSD support standalone, using
xsd.[resource].jar, common.[resource].jar and core.[resource].jar with
version 2.0.1.
I have since migrated to SWT and RCP (on version 3.1) and am now using
it as a plug in. I have removed the above jar files and and replaced
them with these jar files (which of course include quite a bit more than
XSD):
org.eclipse.core.resources_3.1.0.jar org.eclipse.osgi_3.1.0.jar
org.eclipse.core.resources.linux_3.1.0.jar
org.eclipse.swt.gtk.linux.x86_3.1.0.jar
org.eclipse.core.runtime_3.1.0.jar org.eclipse.ui_3.1.0.jar
org.eclipse.emf.common_2.1.0.jar org.eclipse.ui.ide_3.1.0.jar
org.eclipse.emf.ecore_2.1.0.jar org.eclipse.ui.views_3.1.0.jar
org.eclipse.jface_3.1.0.jar
org.eclipse.ui.workbench_3.1.0.jar
org.eclipse.jface.text_3.1.0.jar org.eclipse.xsd_2.1.0.jar
I have also added the the following dependent plugins:
Require-Bundle: org.eclipse.jface,
org.eclipse.jface.text,
org.eclipse.osgi,
org.eclipse.swt,
org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.osgi.util,
org.eclipse.osgi.services,
org.eclipse.ui.views,
org.eclipse.ui.ide,
org.eclipse.ui.editors,
org.eclipse.ui.workbench.texteditor,
org.junit,
org.eclipse.emf.common,
org.eclipse.emf.ecore,
org.eclipse.xsd,
org.eclipse.emf.importer,
org.eclipse.emf.importer.ecore,
org.eclipse.xsd.ecore.importer
With all this, running the same tests that used to work fine, I'm
getting the following errors when I try to import an .xsd file.
Any ideas?
Thanks,
Francis
!SESSION 2005-09-27 10:50:03.485
-----------------------------------------------
eclipse.buildId=unknown
java.version=1.4.2_05
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
Framework arguments: -version 3 -application
org.eclipse.pde.junit.runtime.uitestapplication -product
com.oaklandsw.transform.product -pdelaunch -port 34067 -testpluginname
com.oaklandsw.transform -test
com.oaklandsw.transform.XsdSimpleImportTest:testBasic
Command-line arguments: -version 3 -application
org.eclipse.pde.junit.runtime.uitestapplication -product
com.oaklandsw.transform.product -data
/home/francis/junit-workbench-workspace -dev
file:/home/francis/d/.metadata/.plugins/org.eclipse.pde.core /XsdSimpleImportTest.testBasic/dev.properties
-pdelaunch -os linux -ws gtk -arch x86 -port 34067 -testpluginname
com.oaklandsw.transform -test
com.oaklandsw.transform.XsdSimpleImportTest:testBasic
!ENTRY org.eclipse.ui 4 4 2005-09-27 10:50:11.33
!MESSAGE Invalid Menu Extension (Path is invalid):
org.eclipse.ui.edit.text.gotoLastEditPosition
!ENTRY org.eclipse.xsd 2 0 2005-09-27 10:50:14.290
!MESSAGE bundleentry
!STACK 0
java.net.UnknownHostException: bundleentry
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:153)
at java.net.Socket.connect(Socket.java:452)
at java.net.Socket.connect(Socket.java:402)
at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
at sun.net.NetworkClient.openServer(NetworkClient.java:118)
at sun.net.ftp.FtpClient.openServer(FtpClient.java:423)
at sun.net.ftp.FtpClient.<init>(FtpClient.java:692)
at
sun.net.www.protocol.ftp.FtpURLConnection.connect(FtpURLConn ection.java:175)
at
sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(Ftp URLConnection.java:257)
at java.net.URL.openStream(URL.java:913)
at
org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(U nknown Source)
at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown
Source)
at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown
Source)
at org.apache.xerces.impl.XMLDTDScannerImpl.startPE(Unknown Source)
at
org.apache.xerces.impl.XMLDTDScannerImpl.skipSeparator(Unkno wn Source)
at org.apache.xerces.impl.XMLDTDScannerImpl.scanDecls(Unknown
Source)
at
org.apache.xerces.impl.XMLDTDScannerImpl.scanDTDExternalSubs et(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher. dispatch(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDo cument(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at
org.eclipse.xsd.util.XSDResourceImpl.getDocument(XSDResource Impl.java:238)
at
org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:412)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
at
org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:398)
at
org.eclipse.xsd.impl.XSDImportImpl.importSchema(XSDImportImp l.java:476)
at
org.eclipse.xsd.impl.XSDSchemaImpl.resolveSchema(XSDSchemaIm pl.java:2120)
at
org.eclipse.xsd.impl.XSDSchemaImpl.resolveNamedComponent(XSD SchemaImpl.java:2143)
at
org.eclipse.xsd.impl.XSDSchemaImpl.resolveAttributeDeclarati on(XSDSchemaImpl.java:2168)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.resolveAttribu teDeclaration(XSDConcreteComponentImpl.java:2469)
at
org.eclipse.xsd.impl.XSDAttributeDeclarationImpl.patch(XSDAt tributeDeclarationImpl.java:203)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
at
org.eclipse.xsd.impl.XSDAttributeUseImpl.patch(XSDAttributeU seImpl.java:738)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
at
org.eclipse.xsd.impl.XSDNamedComponentImpl.patch(XSDNamedCom ponentImpl.java:727)
at
org.eclipse.xsd.impl.XSDTypeDefinitionImpl.patch(XSDTypeDefi nitionImpl.java:249)
at
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.patch(XSDC omplexTypeDefinitionImpl.java:994)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
at
org.eclipse.xsd.impl.XSDNamedComponentImpl.patch(XSDNamedCom ponentImpl.java:727)
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.patch(XSDElem entDeclarationImpl.java:546)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
at
org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1493)
at
org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2314)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1219)
at
org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:825)
at
org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:489)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
at
org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaForSchema(XSDSch emaImpl.java:609)
at
org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:420)
at
org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:536)
at
org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:502)
at
org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:431)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
at
com.oaklandsw.transform.rep.xml.XsdImportProcessor.importFro mFile(XsdImportProcessor.java:178)
at
com.oaklandsw.transform.rep.xml.XsdImporter.doImportSubclass (XsdImporter.java:42)
at
com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:338)
at
com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:322)
at
com.oaklandsw.transform.TransformTestBase.importXsdDefinitio n(TransformTestBase.java:1711)
at
com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1926)
at
com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1905)
at
com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1891)
at
com.oaklandsw.transform.XsdSimpleImportTest.testBasic(XsdSim pleImportTest.java:43)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:478)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:344)
at
org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:57)
at
org.eclipse.pde.internal.junit.runtime.UITestApplication$1.r un(UITestApplication.java:99)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
at
org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2844)
at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2575)
at
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1699)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:367)
at
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
at
com.oaklandsw.transform.editor.Editor.runEditor(Editor.java: 2111)
at
com.oaklandsw.transform.editor.Standalone.run(Standalone.jav a:72)
at
org.eclipse.pde.internal.junit.runtime.UITestApplication.run (UITestApplication.java:39)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
at org.eclipse.core.launcher.Main.run(Main.java:973)
at org.eclipse.core.launcher.Main.main(Main.java:948)
!ENTRY org.eclipse.xsd 2 0 2005-09-27 10:50:14.505
!MESSAGE
!STACK 0
java.lang.NullPointerException
at
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleNewB aseTypeDefinition(XSDComplexTypeDefinitionImpl.java:2046)
at
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2329)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
at
org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
at
org.eclipse.xsd.impl.XSDModelGroupImpl.adoptContent(XSDModel GroupImpl.java:693)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
at
org.eclipse.xsd.impl.XSDModelGroupImpl.handleReconciliation( XSDModelGroupImpl.java:657)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
at
org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
at
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.adoptConte nt(XSDComplexTypeDefinitionImpl.java:2600)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
at
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.setContent (XSDComplexTypeDefinitionImpl.java:758)
at
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2240)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
at
org.eclipse.xsd.impl.XSDSchemaImpl.adoptContent(XSDSchemaImp l.java:1763)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
at
org.eclipse.xsd.impl.XSDSchemaImpl.handleReconciliation(XSDS chemaImpl.java:1985)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.changeAttribut e(XSDConcreteComponentImpl.java:1246)
at
org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2318)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1219)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElementGen( XSDConcreteComponentImpl.java:2817)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElement(XSD ConcreteComponentImpl.java:2849)
at
org.eclipse.xsd.impl.XSDSchemaImpl.setElement(XSDSchemaImpl. java:2441)
at
org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:422)
at
org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:536)
at
org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:502)
at
org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:431)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
at
com.oaklandsw.transform.rep.xml.XsdImportProcessor.importFro mFile(XsdImportProcessor.java:178)
at
com.oaklandsw.transform.rep.xml.XsdImporter.doImportSubclass (XsdImporter.java:42)
at
com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:338)
at
com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:322)
at
com.oaklandsw.transform.TransformTestBase.importXsdDefinitio n(TransformTestBase.java:1711)
at
com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1926)
at
com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1905)
at
com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1891)
at
com.oaklandsw.transform.XsdSimpleImportTest.testBasic(XsdSim pleImportTest.java:43)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:478)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:344)
at
org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:57)
at
org.eclipse.pde.internal.junit.runtime.UITestApplication$1.r un(UITestApplication.java:99)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
at
org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2844)
at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2575)
at
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1699)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:367)
at
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
at
com.oaklandsw.transform.editor.Editor.runEditor(Editor.java: 2111)
at
com.oaklandsw.transform.editor.Standalone.run(Standalone.jav a:72)
at
org.eclipse.pde.internal.junit.runtime.UITestApplication.run (UITestApplication.java:39)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
at org.eclipse.core.launcher.Main.run(Main.java:973)
at org.eclipse.core.launcher.Main.main(Main.java:948)
main ~/junit-workbench-workspace/.metadata>
Platform UI Committer for Common Navigator
http://wiki.eclipse.org/index.php/Common_Navigator_Framework
http://help.eclipse.org/galileo/topic/org.eclipse.platform.d oc.isv/guide/cnf.htm
|
|
|
Re: errors using XSD as plugin, UnknownHostException and NPE [message #63982 is a reply to message #63953] |
Tue, 27 September 2005 18:08 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Francis,
You aren't putting these jars on the classpath explicitly are you?
I would also expect bundleentry to have a registered protocol handler so
that creating a URL for it would not fail in the way you showed...
Francis Upton wrote:
> I have previously used the wonderful XSD support standalone, using
> xsd.[resource].jar, common.[resource].jar and core.[resource].jar with
> version 2.0.1.
>
> I have since migrated to SWT and RCP (on version 3.1) and am now using
> it as a plug in. I have removed the above jar files and and replaced
> them with these jar files (which of course include quite a bit more
> than XSD):
>
> org.eclipse.core.resources_3.1.0.jar org.eclipse.osgi_3.1.0.jar
> org.eclipse.core.resources.linux_3.1.0.jar
> org.eclipse.swt.gtk.linux.x86_3.1.0.jar
> org.eclipse.core.runtime_3.1.0.jar org.eclipse.ui_3.1.0.jar
> org.eclipse.emf.common_2.1.0.jar org.eclipse.ui.ide_3.1.0.jar
> org.eclipse.emf.ecore_2.1.0.jar
> org.eclipse.ui.views_3.1.0.jar
> org.eclipse.jface_3.1.0.jar org.eclipse.ui.workbench_3.1.0.jar
> org.eclipse.jface.text_3.1.0.jar org.eclipse.xsd_2.1.0.jar
>
>
> I have also added the the following dependent plugins:
>
> Require-Bundle: org.eclipse.jface,
> org.eclipse.jface.text,
> org.eclipse.osgi,
> org.eclipse.swt,
> org.eclipse.ui,
> org.eclipse.core.runtime,
> org.eclipse.osgi.util,
> org.eclipse.osgi.services,
> org.eclipse.ui.views,
> org.eclipse.ui.ide,
> org.eclipse.ui.editors,
> org.eclipse.ui.workbench.texteditor,
> org.junit,
> org.eclipse.emf.common,
> org.eclipse.emf.ecore,
> org.eclipse.xsd,
> org.eclipse.emf.importer,
> org.eclipse.emf.importer.ecore,
> org.eclipse.xsd.ecore.importer
>
> With all this, running the same tests that used to work fine, I'm
> getting the following errors when I try to import an .xsd file.
>
> Any ideas?
>
> Thanks,
>
> Francis
>
>
> !SESSION 2005-09-27 10:50:03.485
> -----------------------------------------------
> eclipse.buildId=unknown
> java.version=1.4.2_05
> java.vendor=Sun Microsystems Inc.
> BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
> Framework arguments: -version 3 -application
> org.eclipse.pde.junit.runtime.uitestapplication -product
> com.oaklandsw.transform.product -pdelaunch -port 34067 -testpluginname
> com.oaklandsw.transform -test
> com.oaklandsw.transform.XsdSimpleImportTest:testBasic
> Command-line arguments: -version 3 -application
> org.eclipse.pde.junit.runtime.uitestapplication -product
> com.oaklandsw.transform.product -data
> /home/francis/junit-workbench-workspace -dev
> file:/home/francis/d/.metadata/.plugins/org.eclipse.pde.core /XsdSimpleImportTest.testBasic/dev.properties
> -pdelaunch -os linux -ws gtk -arch x86 -port 34067 -testpluginname
> com.oaklandsw.transform -test
> com.oaklandsw.transform.XsdSimpleImportTest:testBasic
>
> !ENTRY org.eclipse.ui 4 4 2005-09-27 10:50:11.33
> !MESSAGE Invalid Menu Extension (Path is invalid):
> org.eclipse.ui.edit.text.gotoLastEditPosition
>
> !ENTRY org.eclipse.xsd 2 0 2005-09-27 10:50:14.290
> !MESSAGE bundleentry
> !STACK 0
> java.net.UnknownHostException: bundleentry
> at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:153)
> at java.net.Socket.connect(Socket.java:452)
> at java.net.Socket.connect(Socket.java:402)
> at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
> at sun.net.NetworkClient.openServer(NetworkClient.java:118)
> at sun.net.ftp.FtpClient.openServer(FtpClient.java:423)
> at sun.net.ftp.FtpClient.<init>(FtpClient.java:692)
> at
> sun.net.www.protocol.ftp.FtpURLConnection.connect(FtpURLConn ection.java:175)
>
> at
> sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(Ftp URLConnection.java:257)
>
> at java.net.URL.openStream(URL.java:913)
> at
> org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(U nknown
> Source)
> at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown
> Source)
> at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown
> Source)
> at org.apache.xerces.impl.XMLDTDScannerImpl.startPE(Unknown
> Source)
> at
> org.apache.xerces.impl.XMLDTDScannerImpl.skipSeparator(Unkno wn Source)
> at org.apache.xerces.impl.XMLDTDScannerImpl.scanDecls(Unknown
> Source)
> at
> org.apache.xerces.impl.XMLDTDScannerImpl.scanDTDExternalSubs et(Unknown
> Source)
> at
> org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher. dispatch(Unknown
> Source)
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDo cument(Unknown
> Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
> Source)
> at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
> Source)
> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
> at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown
> Source)
> at
> org.eclipse.xsd.util.XSDResourceImpl.getDocument(XSDResource Impl.java:238)
>
> at
> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:412)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>
> at
> org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:398)
>
> at
> org.eclipse.xsd.impl.XSDImportImpl.importSchema(XSDImportImp l.java:476)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.resolveSchema(XSDSchemaIm pl.java:2120)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.resolveNamedComponent(XSD SchemaImpl.java:2143)
>
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.resolveAttributeDeclarati on(XSDSchemaImpl.java:2168)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.resolveAttribu teDeclaration(XSDConcreteComponentImpl.java:2469)
>
> at
> org.eclipse.xsd.impl.XSDAttributeDeclarationImpl.patch(XSDAt tributeDeclarationImpl.java:203)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
>
> at
> org.eclipse.xsd.impl.XSDAttributeUseImpl.patch(XSDAttributeU seImpl.java:738)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
>
> at
> org.eclipse.xsd.impl.XSDNamedComponentImpl.patch(XSDNamedCom ponentImpl.java:727)
>
> at
> org.eclipse.xsd.impl.XSDTypeDefinitionImpl.patch(XSDTypeDefi nitionImpl.java:249)
>
> at
> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.patch(XSDC omplexTypeDefinitionImpl.java:994)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
>
> at
> org.eclipse.xsd.impl.XSDNamedComponentImpl.patch(XSDNamedCom ponentImpl.java:727)
>
> at
> org.eclipse.xsd.impl.XSDElementDeclarationImpl.patch(XSDElem entDeclarationImpl.java:546)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
>
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1493)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2314)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1219)
>
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:825)
>
> at
> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:489)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
>
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaForSchema(XSDSch emaImpl.java:609)
>
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:420)
> at
> org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:536)
>
> at
> org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:502)
>
> at
> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:431)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
>
> at
> com.oaklandsw.transform.rep.xml.XsdImportProcessor.importFro mFile(XsdImportProcessor.java:178)
>
> at
> com.oaklandsw.transform.rep.xml.XsdImporter.doImportSubclass (XsdImporter.java:42)
>
> at
> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:338)
> at
> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:322)
> at
> com.oaklandsw.transform.TransformTestBase.importXsdDefinitio n(TransformTestBase.java:1711)
>
> at
> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1926)
>
> at
> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1905)
>
> at
> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1891)
>
> at
> com.oaklandsw.transform.XsdSimpleImportTest.testBasic(XsdSim pleImportTest.java:43)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:324)
> at junit.framework.TestCase.runTest(TestCase.java:154)
> at junit.framework.TestCase.runBare(TestCase.java:127)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:118)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:478)
>
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:344)
>
> at
> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:57)
>
> at
> org.eclipse.pde.internal.junit.runtime.UITestApplication$1.r un(UITestApplication.java:99)
>
> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
> at
> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
>
> at
> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2844)
> at
> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2575)
> at
> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1699)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:367)
>
> at
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
> at
> com.oaklandsw.transform.editor.Editor.runEditor(Editor.java: 2111)
> at
> com.oaklandsw.transform.editor.Standalone.run(Standalone.jav a:72)
> at
> org.eclipse.pde.internal.junit.runtime.UITestApplication.run (UITestApplication.java:39)
>
> at
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:324)
> at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
> at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
> at org.eclipse.core.launcher.Main.run(Main.java:973)
> at org.eclipse.core.launcher.Main.main(Main.java:948)
>
> !ENTRY org.eclipse.xsd 2 0 2005-09-27 10:50:14.505
> !MESSAGE
> !STACK 0
> java.lang.NullPointerException
> at
> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleNewB aseTypeDefinition(XSDComplexTypeDefinitionImpl.java:2046)
>
> at
> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2329)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>
> at
> org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>
> at
> org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
>
> at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>
> at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>
> at
> org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
>
> at
> org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>
> at
> org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
>
> at
> org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>
> at
> org.eclipse.xsd.impl.XSDModelGroupImpl.adoptContent(XSDModel GroupImpl.java:693)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
>
> at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>
> at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>
> at
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
>
> at
> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
>
> at
> org.eclipse.xsd.impl.XSDModelGroupImpl.handleReconciliation( XSDModelGroupImpl.java:657)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
>
> at
> org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>
> at
> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.adoptConte nt(XSDComplexTypeDefinitionImpl.java:2600)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>
> at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>
> at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>
> at
> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.setContent (XSDComplexTypeDefinitionImpl.java:758)
>
> at
> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2240)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>
> at
> org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>
> at
> org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
>
> at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>
> at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>
> at
> org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
>
> at
> org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>
> at
> org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.adoptContent(XSDSchemaImp l.java:1763)
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
>
> at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>
> at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>
> at
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
>
> at
> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
>
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.handleReconciliation(XSDS chemaImpl.java:1985)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.changeAttribut e(XSDConcreteComponentImpl.java:1246)
>
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2318)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1219)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElementGen( XSDConcreteComponentImpl.java:2817)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElement(XSD ConcreteComponentImpl.java:2849)
>
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.setElement(XSDSchemaImpl. java:2441)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:422)
> at
> org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:536)
>
> at
> org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:502)
>
> at
> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:431)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
>
> at
> com.oaklandsw.transform.rep.xml.XsdImportProcessor.importFro mFile(XsdImportProcessor.java:178)
>
> at
> com.oaklandsw.transform.rep.xml.XsdImporter.doImportSubclass (XsdImporter.java:42)
>
> at
> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:338)
> at
> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:322)
> at
> com.oaklandsw.transform.TransformTestBase.importXsdDefinitio n(TransformTestBase.java:1711)
>
> at
> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1926)
>
> at
> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1905)
>
> at
> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1891)
>
> at
> com.oaklandsw.transform.XsdSimpleImportTest.testBasic(XsdSim pleImportTest.java:43)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:324)
> at junit.framework.TestCase.runTest(TestCase.java:154)
> at junit.framework.TestCase.runBare(TestCase.java:127)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:118)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:478)
>
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:344)
>
> at
> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:57)
>
> at
> org.eclipse.pde.internal.junit.runtime.UITestApplication$1.r un(UITestApplication.java:99)
>
> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
> at
> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
>
> at
> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2844)
> at
> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2575)
> at
> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1699)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:367)
>
> at
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
> at
> com.oaklandsw.transform.editor.Editor.runEditor(Editor.java: 2111)
> at
> com.oaklandsw.transform.editor.Standalone.run(Standalone.jav a:72)
> at
> org.eclipse.pde.internal.junit.runtime.UITestApplication.run (UITestApplication.java:39)
>
> at
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:324)
> at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
> at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
> at org.eclipse.core.launcher.Main.run(Main.java:973)
> at org.eclipse.core.launcher.Main.main(Main.java:948)
> main ~/junit-workbench-workspace/.metadata>
>
>
|
|
|
Re: errors using XSD as plugin, UnknownHostException and NPE [message #64007 is a reply to message #63982] |
Tue, 27 September 2005 21:32 |
Francis Upton IV Messages: 472 Registered: July 2009 Location: Oakland, CA |
Senior Member |
|
|
Ed Merks wrote:
> Francis,
>
> You aren't putting these jars on the classpath explicitly are you?
> I would also expect bundleentry to have a registered protocol handler so
> that creating a URL for it would not fail in the way you showed...
I have added the jars to the java build path/libraries tab, as I have
always done. Is this not the way to do it?
Regarding the bundleentry thing, here are some of the variable values
from the XSDSchemaImpl.resolveSchema() stack frame:
this:
org.eclipse.xsd.impl.XSDSchemaImpl@1533b2c (element: [xs:schema: null])
(document: [#document: null], schemaLocation:
bundleentry://141/cache/www.w3.org/2001/XMLSchema.xsd, targetNamespace:
http://www.w3.org/2001/XMLSchema, attributeFormDefault: <unset>,
elementFormDefault: qualified, finalDefault: [], blockDefault: [all],
version: 1.0)
xsdImport:
org.eclipse.xsd.impl.XSDImportImpl@4e76b4 (element: [xs:import: null])
(schemaLocation: http://www.w3.org/2001/xml.xsd) (namespace:
http://www.w3.org/XML/1998/namespace)
namespace:
http://www.w3.org/XML/1998/namespace
So it looks like it's trying to resolve something from one of the built
in schemas.
It seems that I have some of my plumbing messed up here, but I'm not
sure how I should fix it.
>
>
> Francis Upton wrote:
>
>> I have previously used the wonderful XSD support standalone, using
>> xsd.[resource].jar, common.[resource].jar and core.[resource].jar with
>> version 2.0.1.
>>
>> I have since migrated to SWT and RCP (on version 3.1) and am now using
>> it as a plug in. I have removed the above jar files and and replaced
>> them with these jar files (which of course include quite a bit more
>> than XSD):
>>
>> org.eclipse.core.resources_3.1.0.jar org.eclipse.osgi_3.1.0.jar
>> org.eclipse.core.resources.linux_3.1.0.jar
>> org.eclipse.swt.gtk.linux.x86_3.1.0.jar
>> org.eclipse.core.runtime_3.1.0.jar org.eclipse.ui_3.1.0.jar
>> org.eclipse.emf.common_2.1.0.jar org.eclipse.ui.ide_3.1.0.jar
>> org.eclipse.emf.ecore_2.1.0.jar
>> org.eclipse.ui.views_3.1.0.jar
>> org.eclipse.jface_3.1.0.jar org.eclipse.ui.workbench_3.1.0.jar
>> org.eclipse.jface.text_3.1.0.jar org.eclipse.xsd_2.1.0.jar
>>
>>
>> I have also added the the following dependent plugins:
>>
>> Require-Bundle: org.eclipse.jface,
>> org.eclipse.jface.text,
>> org.eclipse.osgi,
>> org.eclipse.swt,
>> org.eclipse.ui,
>> org.eclipse.core.runtime,
>> org.eclipse.osgi.util,
>> org.eclipse.osgi.services,
>> org.eclipse.ui.views,
>> org.eclipse.ui.ide,
>> org.eclipse.ui.editors,
>> org.eclipse.ui.workbench.texteditor,
>> org.junit,
>> org.eclipse.emf.common,
>> org.eclipse.emf.ecore,
>> org.eclipse.xsd,
>> org.eclipse.emf.importer,
>> org.eclipse.emf.importer.ecore,
>> org.eclipse.xsd.ecore.importer
>>
>> With all this, running the same tests that used to work fine, I'm
>> getting the following errors when I try to import an .xsd file.
>>
>> Any ideas?
>>
>> Thanks,
>>
>> Francis
>>
>>
>> !SESSION 2005-09-27 10:50:03.485
>> -----------------------------------------------
>> eclipse.buildId=unknown
>> java.version=1.4.2_05
>> java.vendor=Sun Microsystems Inc.
>> BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
>> Framework arguments: -version 3 -application
>> org.eclipse.pde.junit.runtime.uitestapplication -product
>> com.oaklandsw.transform.product -pdelaunch -port 34067 -testpluginname
>> com.oaklandsw.transform -test
>> com.oaklandsw.transform.XsdSimpleImportTest:testBasic
>> Command-line arguments: -version 3 -application
>> org.eclipse.pde.junit.runtime.uitestapplication -product
>> com.oaklandsw.transform.product -data
>> /home/francis/junit-workbench-workspace -dev
>> file:/home/francis/d/.metadata/.plugins/org.eclipse.pde.core /XsdSimpleImportTest.testBasic/dev.properties
>> -pdelaunch -os linux -ws gtk -arch x86 -port 34067 -testpluginname
>> com.oaklandsw.transform -test
>> com.oaklandsw.transform.XsdSimpleImportTest:testBasic
>>
>> !ENTRY org.eclipse.ui 4 4 2005-09-27 10:50:11.33
>> !MESSAGE Invalid Menu Extension (Path is invalid):
>> org.eclipse.ui.edit.text.gotoLastEditPosition
>>
>> !ENTRY org.eclipse.xsd 2 0 2005-09-27 10:50:14.290
>> !MESSAGE bundleentry
>> !STACK 0
>> java.net.UnknownHostException: bundleentry
>> at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:153)
>> at java.net.Socket.connect(Socket.java:452)
>> at java.net.Socket.connect(Socket.java:402)
>> at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
>> at sun.net.NetworkClient.openServer(NetworkClient.java:118)
>> at sun.net.ftp.FtpClient.openServer(FtpClient.java:423)
>> at sun.net.ftp.FtpClient.<init>(FtpClient.java:692)
>> at
>> sun.net.www.protocol.ftp.FtpURLConnection.connect(FtpURLConn ection.java:175)
>>
>> at
>> sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(Ftp URLConnection.java:257)
>>
>> at java.net.URL.openStream(URL.java:913)
>> at
>> org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(U nknown
>> Source)
>> at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown
>> Source)
>> at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown
>> Source)
>> at org.apache.xerces.impl.XMLDTDScannerImpl.startPE(Unknown
>> Source)
>> at
>> org.apache.xerces.impl.XMLDTDScannerImpl.skipSeparator(Unkno wn Source)
>> at org.apache.xerces.impl.XMLDTDScannerImpl.scanDecls(Unknown
>> Source)
>> at
>> org.apache.xerces.impl.XMLDTDScannerImpl.scanDTDExternalSubs et(Unknown
>> Source)
>> at
>> org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher. dispatch(Unknown
>> Source)
>> at
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDo cument(Unknown
>> Source)
>> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>> Source)
>> at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
>> Source)
>> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>> at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
>> at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown
>> Source)
>> at
>> org.eclipse.xsd.util.XSDResourceImpl.getDocument(XSDResource Impl.java:238)
>>
>> at
>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:412)
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>>
>> at
>> org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:398)
>>
>> at
>> org.eclipse.xsd.impl.XSDImportImpl.importSchema(XSDImportImp l.java:476)
>> at
>> org.eclipse.xsd.impl.XSDSchemaImpl.resolveSchema(XSDSchemaIm pl.java:2120)
>> at
>> org.eclipse.xsd.impl.XSDSchemaImpl.resolveNamedComponent(XSD SchemaImpl.java:2143)
>>
>> at
>> org.eclipse.xsd.impl.XSDSchemaImpl.resolveAttributeDeclarati on(XSDSchemaImpl.java:2168)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.resolveAttribu teDeclaration(XSDConcreteComponentImpl.java:2469)
>>
>> at
>> org.eclipse.xsd.impl.XSDAttributeDeclarationImpl.patch(XSDAt tributeDeclarationImpl.java:203)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
>>
>> at
>> org.eclipse.xsd.impl.XSDAttributeUseImpl.patch(XSDAttributeU seImpl.java:738)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
>>
>> at
>> org.eclipse.xsd.impl.XSDNamedComponentImpl.patch(XSDNamedCom ponentImpl.java:727)
>>
>> at
>> org.eclipse.xsd.impl.XSDTypeDefinitionImpl.patch(XSDTypeDefi nitionImpl.java:249)
>>
>> at
>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.patch(XSDC omplexTypeDefinitionImpl.java:994)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
>>
>> at
>> org.eclipse.xsd.impl.XSDNamedComponentImpl.patch(XSDNamedCom ponentImpl.java:727)
>>
>> at
>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.patch(XSDElem entDeclarationImpl.java:546)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
>>
>> at
>> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1493)
>> at
>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2314)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1219)
>>
>> at
>> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:825)
>>
>> at
>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:489)
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
>>
>> at
>> org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaForSchema(XSDSch emaImpl.java:609)
>>
>> at
>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:420)
>> at
>> org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:536)
>>
>> at
>> org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:502)
>>
>> at
>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:431)
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
>>
>> at
>> com.oaklandsw.transform.rep.xml.XsdImportProcessor.importFro mFile(XsdImportProcessor.java:178)
>>
>> at
>> com.oaklandsw.transform.rep.xml.XsdImporter.doImportSubclass (XsdImporter.java:42)
>>
>> at
>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:338)
>> at
>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:322)
>> at
>> com.oaklandsw.transform.TransformTestBase.importXsdDefinitio n(TransformTestBase.java:1711)
>>
>> at
>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1926)
>>
>> at
>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1905)
>>
>> at
>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1891)
>>
>> at
>> com.oaklandsw.transform.XsdSimpleImportTest.testBasic(XsdSim pleImportTest.java:43)
>>
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>
>> at java.lang.reflect.Method.invoke(Method.java:324)
>> at junit.framework.TestCase.runTest(TestCase.java:154)
>> at junit.framework.TestCase.runBare(TestCase.java:127)
>> at junit.framework.TestResult$1.protect(TestResult.java:106)
>> at junit.framework.TestResult.runProtected(TestResult.java:124)
>> at junit.framework.TestResult.run(TestResult.java:109)
>> at junit.framework.TestCase.run(TestCase.java:118)
>> at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:478)
>>
>> at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:344)
>>
>> at
>> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:57)
>>
>> at
>> org.eclipse.pde.internal.junit.runtime.UITestApplication$1.r un(UITestApplication.java:99)
>>
>> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
>> at
>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
>>
>> at
>> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2844)
>> at
>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2575)
>> at
>> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1699)
>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
>> at
>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:367)
>>
>> at
>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
>> at
>> com.oaklandsw.transform.editor.Editor.runEditor(Editor.java: 2111)
>> at
>> com.oaklandsw.transform.editor.Standalone.run(Standalone.jav a:72)
>> at
>> org.eclipse.pde.internal.junit.runtime.UITestApplication.run (UITestApplication.java:39)
>>
>> at
>> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
>>
>> at
>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
>>
>> at
>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
>>
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>
>> at java.lang.reflect.Method.invoke(Method.java:324)
>> at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
>> at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
>> at org.eclipse.core.launcher.Main.run(Main.java:973)
>> at org.eclipse.core.launcher.Main.main(Main.java:948)
>>
>> !ENTRY org.eclipse.xsd 2 0 2005-09-27 10:50:14.505
>> !MESSAGE
>> !STACK 0
>> java.lang.NullPointerException
>> at
>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleNewB aseTypeDefinition(XSDComplexTypeDefinitionImpl.java:2046)
>>
>> at
>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2329)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>
>> at
>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>
>> at
>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>
>> at
>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
>>
>> at
>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>
>> at
>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
>>
>> at
>> org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>
>> at
>> org.eclipse.xsd.impl.XSDModelGroupImpl.adoptContent(XSDModel GroupImpl.java:693)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
>>
>> at
>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
>>
>> at
>> org.eclipse.xsd.impl.XSDModelGroupImpl.handleReconciliation( XSDModelGroupImpl.java:657)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
>>
>> at
>> org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>
>> at
>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.adoptConte nt(XSDComplexTypeDefinitionImpl.java:2600)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>
>> at
>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.setContent (XSDComplexTypeDefinitionImpl.java:758)
>>
>> at
>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2240)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>
>> at
>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>
>> at
>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>
>> at
>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
>>
>> at
>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>
>> at
>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>
>> at
>> org.eclipse.xsd.impl.XSDSchemaImpl.adoptContent(XSDSchemaImp l.java:1763)
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
>>
>> at
>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
>>
>> at
>> org.eclipse.xsd.impl.XSDSchemaImpl.handleReconciliation(XSDS chemaImpl.java:1985)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.changeAttribut e(XSDConcreteComponentImpl.java:1246)
>>
>> at
>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2318)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1219)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElementGen( XSDConcreteComponentImpl.java:2817)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElement(XSD ConcreteComponentImpl.java:2849)
>>
>> at
>> org.eclipse.xsd.impl.XSDSchemaImpl.setElement(XSDSchemaImpl. java:2441)
>> at
>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:422)
>> at
>> org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:536)
>>
>> at
>> org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:502)
>>
>> at
>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:431)
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
>>
>> at
>> com.oaklandsw.transform.rep.xml.XsdImportProcessor.importFro mFile(XsdImportProcessor.java:178)
>>
>> at
>> com.oaklandsw.transform.rep.xml.XsdImporter.doImportSubclass (XsdImporter.java:42)
>>
>> at
>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:338)
>> at
>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:322)
>> at
>> com.oaklandsw.transform.TransformTestBase.importXsdDefinitio n(TransformTestBase.java:1711)
>>
>> at
>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1926)
>>
>> at
>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1905)
>>
>> at
>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1891)
>>
>> at
>> com.oaklandsw.transform.XsdSimpleImportTest.testBasic(XsdSim pleImportTest.java:43)
>>
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>
>> at java.lang.reflect.Method.invoke(Method.java:324)
>> at junit.framework.TestCase.runTest(TestCase.java:154)
>> at junit.framework.TestCase.runBare(TestCase.java:127)
>> at junit.framework.TestResult$1.protect(TestResult.java:106)
>> at junit.framework.TestResult.runProtected(TestResult.java:124)
>> at junit.framework.TestResult.run(TestResult.java:109)
>> at junit.framework.TestCase.run(TestCase.java:118)
>> at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:478)
>>
>> at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:344)
>>
>> at
>> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:57)
>>
>> at
>> org.eclipse.pde.internal.junit.runtime.UITestApplication$1.r un(UITestApplication.java:99)
>>
>> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
>> at
>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
>>
>> at
>> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2844)
>> at
>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2575)
>> at
>> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1699)
>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
>> at
>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:367)
>>
>> at
>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
>> at
>> com.oaklandsw.transform.editor.Editor.runEditor(Editor.java: 2111)
>> at
>> com.oaklandsw.transform.editor.Standalone.run(Standalone.jav a:72)
>> at
>> org.eclipse.pde.internal.junit.runtime.UITestApplication.run (UITestApplication.java:39)
>>
>> at
>> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
>>
>> at
>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
>>
>> at
>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
>>
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>
>> at java.lang.reflect.Method.invoke(Method.java:324)
>> at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
>> at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
>> at org.eclipse.core.launcher.Main.run(Main.java:973)
>> at org.eclipse.core.launcher.Main.main(Main.java:948)
>> main ~/junit-workbench-workspace/.metadata>
>>
>>
Platform UI Committer for Common Navigator
http://wiki.eclipse.org/index.php/Common_Navigator_Framework
http://help.eclipse.org/galileo/topic/org.eclipse.platform.d oc.isv/guide/cnf.htm
|
|
|
Re: errors using XSD as plugin, UnknownHostException and NPE [message #64033 is a reply to message #64007] |
Tue, 27 September 2005 23:24 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Francis,
No! When running an Eclipse headless invocation you don't put anything
on the classpath except the startup.jar. If you put plugin jars on the
classpath, you'll by pass the normal plugin initialization that is
supposed to happen. In this case you are loading the cached "meta"
schemas from the org.eclipse.xsd plugin, which should normally work
fine, but I'm quite sure the classpath thing is going to mess it up...
Francis Upton wrote:
> Ed Merks wrote:
>
>> Francis,
>>
>> You aren't putting these jars on the classpath explicitly are you?
>> I would also expect bundleentry to have a registered protocol handler
>> so that creating a URL for it would not fail in the way you showed...
>
>
> I have added the jars to the java build path/libraries tab, as I have
> always done. Is this not the way to do it?
>
> Regarding the bundleentry thing, here are some of the variable values
> from the XSDSchemaImpl.resolveSchema() stack frame:
>
> this:
> org.eclipse.xsd.impl.XSDSchemaImpl@1533b2c (element: [xs:schema:
> null]) (document: [#document: null], schemaLocation:
> bundleentry://141/cache/www.w3.org/2001/XMLSchema.xsd,
> targetNamespace: http://www.w3.org/2001/XMLSchema,
> attributeFormDefault: <unset>, elementFormDefault: qualified,
> finalDefault: [], blockDefault: [all], version: 1.0)
>
> xsdImport:
> org.eclipse.xsd.impl.XSDImportImpl@4e76b4 (element: [xs:import: null])
> (schemaLocation: http://www.w3.org/2001/xml.xsd) (namespace:
> http://www.w3.org/XML/1998/namespace)
>
> namespace:
> http://www.w3.org/XML/1998/namespace
>
> So it looks like it's trying to resolve something from one of the
> built in schemas.
>
> It seems that I have some of my plumbing messed up here, but I'm not
> sure how I should fix it.
>
>
>>
>>
>> Francis Upton wrote:
>>
>>> I have previously used the wonderful XSD support standalone, using
>>> xsd.[resource].jar, common.[resource].jar and core.[resource].jar
>>> with version 2.0.1.
>>>
>>> I have since migrated to SWT and RCP (on version 3.1) and am now
>>> using it as a plug in. I have removed the above jar files and and
>>> replaced them with these jar files (which of course include quite a
>>> bit more than XSD):
>>>
>>> org.eclipse.core.resources_3.1.0.jar org.eclipse.osgi_3.1.0.jar
>>> org.eclipse.core.resources.linux_3.1.0.jar
>>> org.eclipse.swt.gtk.linux.x86_3.1.0.jar
>>> org.eclipse.core.runtime_3.1.0.jar org.eclipse.ui_3.1.0.jar
>>> org.eclipse.emf.common_2.1.0.jar
>>> org.eclipse.ui.ide_3.1.0.jar
>>> org.eclipse.emf.ecore_2.1.0.jar
>>> org.eclipse.ui.views_3.1.0.jar
>>> org.eclipse.jface_3.1.0.jar org.eclipse.ui.workbench_3.1.0.jar
>>> org.eclipse.jface.text_3.1.0.jar org.eclipse.xsd_2.1.0.jar
>>>
>>>
>>> I have also added the the following dependent plugins:
>>>
>>> Require-Bundle: org.eclipse.jface,
>>> org.eclipse.jface.text,
>>> org.eclipse.osgi,
>>> org.eclipse.swt,
>>> org.eclipse.ui,
>>> org.eclipse.core.runtime,
>>> org.eclipse.osgi.util,
>>> org.eclipse.osgi.services,
>>> org.eclipse.ui.views,
>>> org.eclipse.ui.ide,
>>> org.eclipse.ui.editors,
>>> org.eclipse.ui.workbench.texteditor,
>>> org.junit,
>>> org.eclipse.emf.common,
>>> org.eclipse.emf.ecore,
>>> org.eclipse.xsd,
>>> org.eclipse.emf.importer,
>>> org.eclipse.emf.importer.ecore,
>>> org.eclipse.xsd.ecore.importer
>>>
>>> With all this, running the same tests that used to work fine, I'm
>>> getting the following errors when I try to import an .xsd file.
>>>
>>> Any ideas?
>>>
>>> Thanks,
>>>
>>> Francis
>>>
>>>
>>> !SESSION 2005-09-27 10:50:03.485
>>> -----------------------------------------------
>>> eclipse.buildId=unknown
>>> java.version=1.4.2_05
>>> java.vendor=Sun Microsystems Inc.
>>> BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
>>> Framework arguments: -version 3 -application
>>> org.eclipse.pde.junit.runtime.uitestapplication -product
>>> com.oaklandsw.transform.product -pdelaunch -port 34067
>>> -testpluginname com.oaklandsw.transform -test
>>> com.oaklandsw.transform.XsdSimpleImportTest:testBasic
>>> Command-line arguments: -version 3 -application
>>> org.eclipse.pde.junit.runtime.uitestapplication -product
>>> com.oaklandsw.transform.product -data
>>> /home/francis/junit-workbench-workspace -dev
>>> file:/home/francis/d/.metadata/.plugins/org.eclipse.pde.core /XsdSimpleImportTest.testBasic/dev.properties
>>> -pdelaunch -os linux -ws gtk -arch x86 -port 34067 -testpluginname
>>> com.oaklandsw.transform -test
>>> com.oaklandsw.transform.XsdSimpleImportTest:testBasic
>>>
>>> !ENTRY org.eclipse.ui 4 4 2005-09-27 10:50:11.33
>>> !MESSAGE Invalid Menu Extension (Path is invalid):
>>> org.eclipse.ui.edit.text.gotoLastEditPosition
>>>
>>> !ENTRY org.eclipse.xsd 2 0 2005-09-27 10:50:14.290
>>> !MESSAGE bundleentry
>>> !STACK 0
>>> java.net.UnknownHostException: bundleentry
>>> at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:153)
>>> at java.net.Socket.connect(Socket.java:452)
>>> at java.net.Socket.connect(Socket.java:402)
>>> at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
>>> at sun.net.NetworkClient.openServer(NetworkClient.java:118)
>>> at sun.net.ftp.FtpClient.openServer(FtpClient.java:423)
>>> at sun.net.ftp.FtpClient.<init>(FtpClient.java:692)
>>> at
>>> sun.net.www.protocol.ftp.FtpURLConnection.connect(FtpURLConn ection.java:175)
>>>
>>> at
>>> sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(Ftp URLConnection.java:257)
>>>
>>> at java.net.URL.openStream(URL.java:913)
>>> at
>>> org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(U nknown
>>> Source)
>>> at
>>> org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
>>> at
>>> org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
>>> at org.apache.xerces.impl.XMLDTDScannerImpl.startPE(Unknown
>>> Source)
>>> at
>>> org.apache.xerces.impl.XMLDTDScannerImpl.skipSeparator(Unkno wn Source)
>>> at
>>> org.apache.xerces.impl.XMLDTDScannerImpl.scanDecls(Unknown Source)
>>> at
>>> org.apache.xerces.impl.XMLDTDScannerImpl.scanDTDExternalSubs et(Unknown
>>> Source)
>>> at
>>> org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher. dispatch(Unknown
>>> Source)
>>> at
>>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDo cument(Unknown
>>> Source)
>>> at
>>> org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>>> at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
>>> Source)
>>> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>>> at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
>>> at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown
>>> Source)
>>> at
>>> org.eclipse.xsd.util.XSDResourceImpl.getDocument(XSDResource Impl.java:238)
>>>
>>> at
>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:412)
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:398)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDImportImpl.importSchema(XSDImportImp l.java:476)
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.resolveSchema(XSDSchemaIm pl.java:2120)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.resolveNamedComponent(XSD SchemaImpl.java:2143)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.resolveAttributeDeclarati on(XSDSchemaImpl.java:2168)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.resolveAttribu teDeclaration(XSDConcreteComponentImpl.java:2469)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDAttributeDeclarationImpl.patch(XSDAt tributeDeclarationImpl.java:203)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDAttributeUseImpl.patch(XSDAttributeU seImpl.java:738)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDNamedComponentImpl.patch(XSDNamedCom ponentImpl.java:727)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDTypeDefinitionImpl.patch(XSDTypeDefi nitionImpl.java:249)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.patch(XSDC omplexTypeDefinitionImpl.java:994)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDNamedComponentImpl.patch(XSDNamedCom ponentImpl.java:727)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.patch(XSDElem entDeclarationImpl.java:546)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1493)
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2314)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1219)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:825)
>>>
>>> at
>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:489)
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaForSchema(XSDSch emaImpl.java:609)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:420)
>>> at
>>> org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:536)
>>>
>>> at
>>> org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:502)
>>>
>>> at
>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:431)
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
>>>
>>> at
>>> com.oaklandsw.transform.rep.xml.XsdImportProcessor.importFro mFile(XsdImportProcessor.java:178)
>>>
>>> at
>>> com.oaklandsw.transform.rep.xml.XsdImporter.doImportSubclass (XsdImporter.java:42)
>>>
>>> at
>>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:338)
>>> at
>>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:322)
>>> at
>>> com.oaklandsw.transform.TransformTestBase.importXsdDefinitio n(TransformTestBase.java:1711)
>>>
>>> at
>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1926)
>>>
>>> at
>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1905)
>>>
>>> at
>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1891)
>>>
>>> at
>>> com.oaklandsw.transform.XsdSimpleImportTest.testBasic(XsdSim pleImportTest.java:43)
>>>
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>
>>> at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>
>>> at java.lang.reflect.Method.invoke(Method.java:324)
>>> at junit.framework.TestCase.runTest(TestCase.java:154)
>>> at junit.framework.TestCase.runBare(TestCase.java:127)
>>> at junit.framework.TestResult$1.protect(TestResult.java:106)
>>> at junit.framework.TestResult.runProtected(TestResult.java:124)
>>> at junit.framework.TestResult.run(TestResult.java:109)
>>> at junit.framework.TestCase.run(TestCase.java:118)
>>> at
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:478)
>>>
>>> at
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:344)
>>>
>>> at
>>> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:57)
>>>
>>> at
>>> org.eclipse.pde.internal.junit.runtime.UITestApplication$1.r un(UITestApplication.java:99)
>>>
>>> at
>>> org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
>>> at
>>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
>>>
>>> at
>>> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2844)
>>> at
>>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2575)
>>> at
>>> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1699)
>>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
>>> at
>>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:367)
>>>
>>> at
>>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
>>> at
>>> com.oaklandsw.transform.editor.Editor.runEditor(Editor.java: 2111)
>>> at
>>> com.oaklandsw.transform.editor.Standalone.run(Standalone.jav a:72)
>>> at
>>> org.eclipse.pde.internal.junit.runtime.UITestApplication.run (UITestApplication.java:39)
>>>
>>> at
>>> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
>>>
>>> at
>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
>>>
>>> at
>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
>>>
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>
>>> at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>
>>> at java.lang.reflect.Method.invoke(Method.java:324)
>>> at
>>> org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
>>> at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
>>> at org.eclipse.core.launcher.Main.run(Main.java:973)
>>> at org.eclipse.core.launcher.Main.main(Main.java:948)
>>>
>>> !ENTRY org.eclipse.xsd 2 0 2005-09-27 10:50:14.505
>>> !MESSAGE
>>> !STACK 0
>>> java.lang.NullPointerException
>>> at
>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleNewB aseTypeDefinition(XSDComplexTypeDefinitionImpl.java:2046)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2329)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDModelGroupImpl.adoptContent(XSDModel GroupImpl.java:693)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
>>>
>>> at
>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDModelGroupImpl.handleReconciliation( XSDModelGroupImpl.java:657)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.adoptConte nt(XSDComplexTypeDefinitionImpl.java:2600)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.setContent (XSDComplexTypeDefinitionImpl.java:758)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2240)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.adoptContent(XSDSchemaImp l.java:1763)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
>>>
>>> at
>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.handleReconciliation(XSDS chemaImpl.java:1985)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.changeAttribut e(XSDConcreteComponentImpl.java:1246)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2318)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1219)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElementGen( XSDConcreteComponentImpl.java:2817)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElement(XSD ConcreteComponentImpl.java:2849)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.setElement(XSDSchemaImpl. java:2441)
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:422)
>>> at
>>> org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:536)
>>>
>>> at
>>> org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:502)
>>>
>>> at
>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:431)
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
>>>
>>> at
>>> com.oaklandsw.transform.rep.xml.XsdImportProcessor.importFro mFile(XsdImportProcessor.java:178)
>>>
>>> at
>>> com.oaklandsw.transform.rep.xml.XsdImporter.doImportSubclass (XsdImporter.java:42)
>>>
>>> at
>>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:338)
>>> at
>>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:322)
>>> at
>>> com.oaklandsw.transform.TransformTestBase.importXsdDefinitio n(TransformTestBase.java:1711)
>>>
>>> at
>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1926)
>>>
>>> at
>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1905)
>>>
>>> at
>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1891)
>>>
>>> at
>>> com.oaklandsw.transform.XsdSimpleImportTest.testBasic(XsdSim pleImportTest.java:43)
>>>
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>
>>> at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>
>>> at java.lang.reflect.Method.invoke(Method.java:324)
>>> at junit.framework.TestCase.runTest(TestCase.java:154)
>>> at junit.framework.TestCase.runBare(TestCase.java:127)
>>> at junit.framework.TestResult$1.protect(TestResult.java:106)
>>> at junit.framework.TestResult.runProtected(TestResult.java:124)
>>> at junit.framework.TestResult.run(TestResult.java:109)
>>> at junit.framework.TestCase.run(TestCase.java:118)
>>> at
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:478)
>>>
>>> at
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:344)
>>>
>>> at
>>> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:57)
>>>
>>> at
>>> org.eclipse.pde.internal.junit.runtime.UITestApplication$1.r un(UITestApplication.java:99)
>>>
>>> at
>>> org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
>>> at
>>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
>>>
>>> at
>>> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2844)
>>> at
>>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2575)
>>> at
>>> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1699)
>>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
>>> at
>>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:367)
>>>
>>> at
>>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
>>> at
>>> com.oaklandsw.transform.editor.Editor.runEditor(Editor.java: 2111)
>>> at
>>> com.oaklandsw.transform.editor.Standalone.run(Standalone.jav a:72)
>>> at
>>> org.eclipse.pde.internal.junit.runtime.UITestApplication.run (UITestApplication.java:39)
>>>
>>> at
>>> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
>>>
>>> at
>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
>>>
>>> at
>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
>>>
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>
>>> at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>
>>> at java.lang.reflect.Method.invoke(Method.java:324)
>>> at
>>> org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
>>> at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
>>> at org.eclipse.core.launcher.Main.run(Main.java:973)
>>> at org.eclipse.core.launcher.Main.main(Main.java:948)
>>> main ~/junit-workbench-workspace/.metadata>
>>>
>>>
|
|
|
Re: errors using XSD as plugin, UnknownHostException and NPE [message #64057 is a reply to message #64033] |
Wed, 28 September 2005 06:21 |
Francis Upton IV Messages: 472 Registered: July 2009 Location: Oakland, CA |
Senior Member |
|
|
Ed,
I'm still confused. First, I'm not executing headless; this is an RCP
application which is created from a plugin as a product. There is
nothing the class of the plugin - here is the manifest.mf:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Oakland Software Data Mapper
Bundle-SymbolicName: com.oaklandsw.transform; singleton:=true
Bundle-Version: 1.0.0
Bundle-Activator: com.oaklandsw.transform.editor.TransformPlugin
Bundle-Localization: plugin
Require-Bundle: org.eclipse.jface,
org.eclipse.jface.text,
org.eclipse.osgi,
org.eclipse.swt,
org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.osgi.util,
org.eclipse.osgi.services,
org.eclipse.ui.views,
org.eclipse.ui.ide,
org.eclipse.ui.editors,
org.eclipse.ui.workbench.texteditor,
org.junit,
org.eclipse.emf.common,
org.eclipse.emf.ecore,
org.eclipse.xsd,
org.eclipse.emf.importer,
org.eclipse.emf.importer.ecore,
org.eclipse.xsd.ecore.importer
Eclipse-AutoStart: true
I have the jars for all of the eclipse stuff (including SWT, jface,
runtime, emf, xsd) in my java build path (Project -> Properties -> Java
BuildPath -> Library) so that my code can compile, but I don't think
this puts things in the classpath when the plugin is being executed.
I still don't know what to do to fix the problem. Thanks for your
patience with me if I'm missing something obvious.
Francis
Ed Merks wrote:
> Francis,
>
> No! When running an Eclipse headless invocation you don't put anything
> on the classpath except the startup.jar. If you put plugin jars on the
> classpath, you'll by pass the normal plugin initialization that is
> supposed to happen. In this case you are loading the cached "meta"
> schemas from the org.eclipse.xsd plugin, which should normally work
> fine, but I'm quite sure the classpath thing is going to mess it up...
>
>
> Francis Upton wrote:
>
>> Ed Merks wrote:
>>
>>> Francis,
>>>
>>> You aren't putting these jars on the classpath explicitly are you?
>>> I would also expect bundleentry to have a registered protocol handler
>>> so that creating a URL for it would not fail in the way you showed...
>>
>>
>>
>> I have added the jars to the java build path/libraries tab, as I have
>> always done. Is this not the way to do it?
>>
>> Regarding the bundleentry thing, here are some of the variable values
>> from the XSDSchemaImpl.resolveSchema() stack frame:
>>
>> this:
>> org.eclipse.xsd.impl.XSDSchemaImpl@1533b2c (element: [xs:schema:
>> null]) (document: [#document: null], schemaLocation:
>> bundleentry://141/cache/www.w3.org/2001/XMLSchema.xsd,
>> targetNamespace: http://www.w3.org/2001/XMLSchema,
>> attributeFormDefault: <unset>, elementFormDefault: qualified,
>> finalDefault: [], blockDefault: [all], version: 1.0)
>>
>> xsdImport:
>> org.eclipse.xsd.impl.XSDImportImpl@4e76b4 (element: [xs:import: null])
>> (schemaLocation: http://www.w3.org/2001/xml.xsd) (namespace:
>> http://www.w3.org/XML/1998/namespace)
>>
>> namespace:
>> http://www.w3.org/XML/1998/namespace
>>
>> So it looks like it's trying to resolve something from one of the
>> built in schemas.
>>
>> It seems that I have some of my plumbing messed up here, but I'm not
>> sure how I should fix it.
>>
>>
>>>
>>>
>>> Francis Upton wrote:
>>>
>>>> I have previously used the wonderful XSD support standalone, using
>>>> xsd.[resource].jar, common.[resource].jar and core.[resource].jar
>>>> with version 2.0.1.
>>>>
>>>> I have since migrated to SWT and RCP (on version 3.1) and am now
>>>> using it as a plug in. I have removed the above jar files and and
>>>> replaced them with these jar files (which of course include quite a
>>>> bit more than XSD):
>>>>
>>>> org.eclipse.core.resources_3.1.0.jar org.eclipse.osgi_3.1.0.jar
>>>> org.eclipse.core.resources.linux_3.1.0.jar
>>>> org.eclipse.swt.gtk.linux.x86_3.1.0.jar
>>>> org.eclipse.core.runtime_3.1.0.jar org.eclipse.ui_3.1.0.jar
>>>> org.eclipse.emf.common_2.1.0.jar
>>>> org.eclipse.ui.ide_3.1.0.jar
>>>> org.eclipse.emf.ecore_2.1.0.jar
>>>> org.eclipse.ui.views_3.1.0.jar
>>>> org.eclipse.jface_3.1.0.jar org.eclipse.ui.workbench_3.1.0.jar
>>>> org.eclipse.jface.text_3.1.0.jar org.eclipse.xsd_2.1.0.jar
>>>>
>>>>
>>>> I have also added the the following dependent plugins:
>>>>
>>>> Require-Bundle: org.eclipse.jface,
>>>> org.eclipse.jface.text,
>>>> org.eclipse.osgi,
>>>> org.eclipse.swt,
>>>> org.eclipse.ui,
>>>> org.eclipse.core.runtime,
>>>> org.eclipse.osgi.util,
>>>> org.eclipse.osgi.services,
>>>> org.eclipse.ui.views,
>>>> org.eclipse.ui.ide,
>>>> org.eclipse.ui.editors,
>>>> org.eclipse.ui.workbench.texteditor,
>>>> org.junit,
>>>> org.eclipse.emf.common,
>>>> org.eclipse.emf.ecore,
>>>> org.eclipse.xsd,
>>>> org.eclipse.emf.importer,
>>>> org.eclipse.emf.importer.ecore,
>>>> org.eclipse.xsd.ecore.importer
>>>>
>>>> With all this, running the same tests that used to work fine, I'm
>>>> getting the following errors when I try to import an .xsd file.
>>>>
>>>> Any ideas?
>>>>
>>>> Thanks,
>>>>
>>>> Francis
>>>>
>>>>
>>>> !SESSION 2005-09-27 10:50:03.485
>>>> -----------------------------------------------
>>>> eclipse.buildId=unknown
>>>> java.version=1.4.2_05
>>>> java.vendor=Sun Microsystems Inc.
>>>> BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
>>>> Framework arguments: -version 3 -application
>>>> org.eclipse.pde.junit.runtime.uitestapplication -product
>>>> com.oaklandsw.transform.product -pdelaunch -port 34067
>>>> -testpluginname com.oaklandsw.transform -test
>>>> com.oaklandsw.transform.XsdSimpleImportTest:testBasic
>>>> Command-line arguments: -version 3 -application
>>>> org.eclipse.pde.junit.runtime.uitestapplication -product
>>>> com.oaklandsw.transform.product -data
>>>> /home/francis/junit-workbench-workspace -dev
>>>> file:/home/francis/d/.metadata/.plugins/org.eclipse.pde.core /XsdSimpleImportTest.testBasic/dev.properties
>>>> -pdelaunch -os linux -ws gtk -arch x86 -port 34067 -testpluginname
>>>> com.oaklandsw.transform -test
>>>> com.oaklandsw.transform.XsdSimpleImportTest:testBasic
>>>>
>>>> !ENTRY org.eclipse.ui 4 4 2005-09-27 10:50:11.33
>>>> !MESSAGE Invalid Menu Extension (Path is invalid):
>>>> org.eclipse.ui.edit.text.gotoLastEditPosition
>>>>
>>>> !ENTRY org.eclipse.xsd 2 0 2005-09-27 10:50:14.290
>>>> !MESSAGE bundleentry
>>>> !STACK 0
>>>> java.net.UnknownHostException: bundleentry
>>>> at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:153)
>>>> at java.net.Socket.connect(Socket.java:452)
>>>> at java.net.Socket.connect(Socket.java:402)
>>>> at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
>>>> at sun.net.NetworkClient.openServer(NetworkClient.java:118)
>>>> at sun.net.ftp.FtpClient.openServer(FtpClient.java:423)
>>>> at sun.net.ftp.FtpClient.<init>(FtpClient.java:692)
>>>> at
>>>> sun.net.www.protocol.ftp.FtpURLConnection.connect(FtpURLConn ection.java:175)
>>>>
>>>> at
>>>> sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(Ftp URLConnection.java:257)
>>>>
>>>> at java.net.URL.openStream(URL.java:913)
>>>> at
>>>> org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(U nknown
>>>> Source)
>>>> at
>>>> org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
>>>> at
>>>> org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
>>>> at org.apache.xerces.impl.XMLDTDScannerImpl.startPE(Unknown
>>>> Source)
>>>> at
>>>> org.apache.xerces.impl.XMLDTDScannerImpl.skipSeparator(Unkno wn Source)
>>>> at
>>>> org.apache.xerces.impl.XMLDTDScannerImpl.scanDecls(Unknown Source)
>>>> at
>>>> org.apache.xerces.impl.XMLDTDScannerImpl.scanDTDExternalSubs et(Unknown
>>>> Source)
>>>> at
>>>> org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher. dispatch(Unknown
>>>> Source)
>>>> at
>>>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDo cument(Unknown
>>>> Source)
>>>> at
>>>> org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>>>> at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
>>>> Source)
>>>> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>>>> at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
>>>> at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown
>>>> Source)
>>>> at
>>>> org.eclipse.xsd.util.XSDResourceImpl.getDocument(XSDResource Impl.java:238)
>>>>
>>>> at
>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:412)
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:398)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDImportImpl.importSchema(XSDImportImp l.java:476)
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.resolveSchema(XSDSchemaIm pl.java:2120)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.resolveNamedComponent(XSD SchemaImpl.java:2143)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.resolveAttributeDeclarati on(XSDSchemaImpl.java:2168)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.resolveAttribu teDeclaration(XSDConcreteComponentImpl.java:2469)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDAttributeDeclarationImpl.patch(XSDAt tributeDeclarationImpl.java:203)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDAttributeUseImpl.patch(XSDAttributeU seImpl.java:738)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDNamedComponentImpl.patch(XSDNamedCom ponentImpl.java:727)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDTypeDefinitionImpl.patch(XSDTypeDefi nitionImpl.java:249)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.patch(XSDC omplexTypeDefinitionImpl.java:994)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDNamedComponentImpl.patch(XSDNamedCom ponentImpl.java:727)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.patch(XSDElem entDeclarationImpl.java:546)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1493)
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2314)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1219)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:825)
>>>>
>>>> at
>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:489)
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaForSchema(XSDSch emaImpl.java:609)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:420)
>>>> at
>>>> org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:536)
>>>>
>>>> at
>>>> org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:502)
>>>>
>>>> at
>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:431)
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
>>>>
>>>> at
>>>> com.oaklandsw.transform.rep.xml.XsdImportProcessor.importFro mFile(XsdImportProcessor.java:178)
>>>>
>>>> at
>>>> com.oaklandsw.transform.rep.xml.XsdImporter.doImportSubclass (XsdImporter.java:42)
>>>>
>>>> at
>>>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:338)
>>>> at
>>>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:322)
>>>> at
>>>> com.oaklandsw.transform.TransformTestBase.importXsdDefinitio n(TransformTestBase.java:1711)
>>>>
>>>> at
>>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1926)
>>>>
>>>> at
>>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1905)
>>>>
>>>> at
>>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1891)
>>>>
>>>> at
>>>> com.oaklandsw.transform.XsdSimpleImportTest.testBasic(XsdSim pleImportTest.java:43)
>>>>
>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>> at
>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>>
>>>> at
>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>>
>>>> at java.lang.reflect.Method.invoke(Method.java:324)
>>>> at junit.framework.TestCase.runTest(TestCase.java:154)
>>>> at junit.framework.TestCase.runBare(TestCase.java:127)
>>>> at junit.framework.TestResult$1.protect(TestResult.java:106)
>>>> at junit.framework.TestResult.runProtected(TestResult.java:124)
>>>> at junit.framework.TestResult.run(TestResult.java:109)
>>>> at junit.framework.TestCase.run(TestCase.java:118)
>>>> at
>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:478)
>>>>
>>>> at
>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:344)
>>>>
>>>> at
>>>> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:57)
>>>>
>>>> at
>>>> org.eclipse.pde.internal.junit.runtime.UITestApplication$1.r un(UITestApplication.java:99)
>>>>
>>>> at
>>>> org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
>>>> at
>>>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
>>>>
>>>> at
>>>> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2844)
>>>> at
>>>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2575)
>>>> at
>>>> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1699)
>>>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
>>>> at
>>>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:367)
>>>>
>>>> at
>>>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
>>>> at
>>>> com.oaklandsw.transform.editor.Editor.runEditor(Editor.java: 2111)
>>>> at
>>>> com.oaklandsw.transform.editor.Standalone.run(Standalone.jav a:72)
>>>> at
>>>> org.eclipse.pde.internal.junit.runtime.UITestApplication.run (UITestApplication.java:39)
>>>>
>>>> at
>>>> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
>>>>
>>>> at
>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
>>>>
>>>> at
>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
>>>>
>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>> at
>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>>
>>>> at
>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>>
>>>> at java.lang.reflect.Method.invoke(Method.java:324)
>>>> at
>>>> org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
>>>> at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
>>>> at org.eclipse.core.launcher.Main.run(Main.java:973)
>>>> at org.eclipse.core.launcher.Main.main(Main.java:948)
>>>>
>>>> !ENTRY org.eclipse.xsd 2 0 2005-09-27 10:50:14.505
>>>> !MESSAGE
>>>> !STACK 0
>>>> java.lang.NullPointerException
>>>> at
>>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleNewB aseTypeDefinition(XSDComplexTypeDefinitionImpl.java:2046)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2329)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDModelGroupImpl.adoptContent(XSDModel GroupImpl.java:693)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
>>>>
>>>> at
>>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDModelGroupImpl.handleReconciliation( XSDModelGroupImpl.java:657)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.adoptConte nt(XSDComplexTypeDefinitionImpl.java:2600)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.setContent (XSDComplexTypeDefinitionImpl.java:758)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2240)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.adoptContent(XSDSchemaImp l.java:1763)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
>>>>
>>>> at
>>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.handleReconciliation(XSDS chemaImpl.java:1985)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.changeAttribut e(XSDConcreteComponentImpl.java:1246)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2318)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1219)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElementGen( XSDConcreteComponentImpl.java:2817)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElement(XSD ConcreteComponentImpl.java:2849)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.setElement(XSDSchemaImpl. java:2441)
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:422)
>>>> at
>>>> org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:536)
>>>>
>>>> at
>>>> org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:502)
>>>>
>>>> at
>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:431)
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
>>>>
>>>> at
>>>> com.oaklandsw.transform.rep.xml.XsdImportProcessor.importFro mFile(XsdImportProcessor.java:178)
>>>>
>>>> at
>>>> com.oaklandsw.transform.rep.xml.XsdImporter.doImportSubclass (XsdImporter.java:42)
>>>>
>>>> at
>>>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:338)
>>>> at
>>>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:322)
>>>> at
>>>> com.oaklandsw.transform.TransformTestBase.importXsdDefinitio n(TransformTestBase.java:1711)
>>>>
>>>> at
>>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1926)
>>>>
>>>> at
>>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1905)
>>>>
>>>> at
>>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1891)
>>>>
>>>> at
>>>> com.oaklandsw.transform.XsdSimpleImportTest.testBasic(XsdSim pleImportTest.java:43)
>>>>
>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>> at
>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>>
>>>> at
>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>>
>>>> at java.lang.reflect.Method.invoke(Method.java:324)
>>>> at junit.framework.TestCase.runTest(TestCase.java:154)
>>>> at junit.framework.TestCase.runBare(TestCase.java:127)
>>>> at junit.framework.TestResult$1.protect(TestResult.java:106)
>>>> at junit.framework.TestResult.runProtected(TestResult.java:124)
>>>> at junit.framework.TestResult.run(TestResult.java:109)
>>>> at junit.framework.TestCase.run(TestCase.java:118)
>>>> at
>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:478)
>>>>
>>>> at
>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:344)
>>>>
>>>> at
>>>> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:57)
>>>>
>>>> at
>>>> org.eclipse.pde.internal.junit.runtime.UITestApplication$1.r un(UITestApplication.java:99)
>>>>
>>>> at
>>>> org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
>>>> at
>>>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
>>>>
>>>> at
>>>> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2844)
>>>> at
>>>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2575)
>>>> at
>>>> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1699)
>>>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
>>>> at
>>>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:367)
>>>>
>>>> at
>>>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
>>>> at
>>>> com.oaklandsw.transform.editor.Editor.runEditor(Editor.java: 2111)
>>>> at
>>>> com.oaklandsw.transform.editor.Standalone.run(Standalone.jav a:72)
>>>> at
>>>> org.eclipse.pde.internal.junit.runtime.UITestApplication.run (UITestApplication.java:39)
>>>>
>>>> at
>>>> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
>>>>
>>>> at
>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
>>>>
>>>> at
>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
>>>>
>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>> at
>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>>
>>>> at
>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>>
>>>> at java.lang.reflect.Method.invoke(Method.java:324)
>>>> at
>>>> org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
>>>> at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
>>>> at org.eclipse.core.launcher.Main.run(Main.java:973)
>>>> at org.eclipse.core.launcher.Main.main(Main.java:948)
>>>> main ~/junit-workbench-workspace/.metadata>
>>>>
>>>>
Platform UI Committer for Common Navigator
http://wiki.eclipse.org/index.php/Common_Navigator_Framework
http://help.eclipse.org/galileo/topic/org.eclipse.platform.d oc.isv/guide/cnf.htm
|
|
|
Re: errors using XSD as plugin, UnknownHostException and NPE [message #64081 is a reply to message #64057] |
Wed, 28 September 2005 09:28 |
Francis Upton IV Messages: 472 Registered: July 2009 Location: Oakland, CA |
Senior Member |
|
|
Ed,
I hope you disregarded my previous post. I'm no longer confused about
the classpath issue and have removed all of the org.eclipse.* from the
build path libraries, as I can see now that they come in with the
plugins if the dependencies are correctly declared.
I built everything clean, deleted my run configurations, and yet I still
get exactly the same problem.
It looks like getDocument() is being called to parse:
http://www.w3.org/2001/xml.xsd. It has been called a couple of other
times previously (and successfully) to parse documents where the URI
scheme is "bundled".
However, in the failing call, the parser tries to open the URL:
" file://bundleentry://141/cache/www.w3.org/2001/datatypes.dtd"
which goes to the FTP client and then fails because of the invalid host
on bundleentry. Seems like this URL is bad.
This same error and stacktrace has appeared before, in the tools.emf
newsgroup, with the title "XSD metamodel: Error trying to load xsd
resources into the resourceset." on 3 Jun 05. The resolution of the
problem was not posted.
Can you give me some hints to debug this?
Thanks,
Francis
Francis Upton wrote:
> Ed,
>
> I'm still confused. First, I'm not executing headless; this is an RCP
> application which is created from a plugin as a product. There is
> nothing the class of the plugin - here is the manifest.mf:
>
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Oakland Software Data Mapper
> Bundle-SymbolicName: com.oaklandsw.transform; singleton:=true
> Bundle-Version: 1.0.0
> Bundle-Activator: com.oaklandsw.transform.editor.TransformPlugin
> Bundle-Localization: plugin
> Require-Bundle: org.eclipse.jface,
> org.eclipse.jface.text,
> org.eclipse.osgi,
> org.eclipse.swt,
> org.eclipse.ui,
> org.eclipse.core.runtime,
> org.eclipse.osgi.util,
> org.eclipse.osgi.services,
> org.eclipse.ui.views,
> org.eclipse.ui.ide,
> org.eclipse.ui.editors,
> org.eclipse.ui.workbench.texteditor,
> org.junit,
> org.eclipse.emf.common,
> org.eclipse.emf.ecore,
> org.eclipse.xsd,
> org.eclipse.emf.importer,
> org.eclipse.emf.importer.ecore,
> org.eclipse.xsd.ecore.importer
> Eclipse-AutoStart: true
>
> I have the jars for all of the eclipse stuff (including SWT, jface,
> runtime, emf, xsd) in my java build path (Project -> Properties -> Java
> BuildPath -> Library) so that my code can compile, but I don't think
> this puts things in the classpath when the plugin is being executed.
>
> I still don't know what to do to fix the problem. Thanks for your
> patience with me if I'm missing something obvious.
>
> Francis
>
> Ed Merks wrote:
>
>> Francis,
>>
>> No! When running an Eclipse headless invocation you don't put
>> anything on the classpath except the startup.jar. If you put plugin
>> jars on the classpath, you'll by pass the normal plugin initialization
>> that is supposed to happen. In this case you are loading the cached
>> "meta" schemas from the org.eclipse.xsd plugin, which should normally
>> work fine, but I'm quite sure the classpath thing is going to mess it
>> up...
>>
>>
>> Francis Upton wrote:
>>
>>> Ed Merks wrote:
>>>
>>>> Francis,
>>>>
>>>> You aren't putting these jars on the classpath explicitly are you?
>>>> I would also expect bundleentry to have a registered protocol
>>>> handler so that creating a URL for it would not fail in the way you
>>>> showed...
>>>
>>>
>>>
>>>
>>> I have added the jars to the java build path/libraries tab, as I have
>>> always done. Is this not the way to do it?
>>>
>>> Regarding the bundleentry thing, here are some of the variable values
>>> from the XSDSchemaImpl.resolveSchema() stack frame:
>>>
>>> this:
>>> org.eclipse.xsd.impl.XSDSchemaImpl@1533b2c (element: [xs:schema:
>>> null]) (document: [#document: null], schemaLocation:
>>> bundleentry://141/cache/www.w3.org/2001/XMLSchema.xsd,
>>> targetNamespace: http://www.w3.org/2001/XMLSchema,
>>> attributeFormDefault: <unset>, elementFormDefault: qualified,
>>> finalDefault: [], blockDefault: [all], version: 1.0)
>>>
>>> xsdImport:
>>> org.eclipse.xsd.impl.XSDImportImpl@4e76b4 (element: [xs:import:
>>> null]) (schemaLocation: http://www.w3.org/2001/xml.xsd) (namespace:
>>> http://www.w3.org/XML/1998/namespace)
>>>
>>> namespace:
>>> http://www.w3.org/XML/1998/namespace
>>>
>>> So it looks like it's trying to resolve something from one of the
>>> built in schemas.
>>>
>>> It seems that I have some of my plumbing messed up here, but I'm not
>>> sure how I should fix it.
>>>
>>>
>>>>
>>>>
>>>> Francis Upton wrote:
>>>>
>>>>> I have previously used the wonderful XSD support standalone, using
>>>>> xsd.[resource].jar, common.[resource].jar and core.[resource].jar
>>>>> with version 2.0.1.
>>>>>
>>>>> I have since migrated to SWT and RCP (on version 3.1) and am now
>>>>> using it as a plug in. I have removed the above jar files and and
>>>>> replaced them with these jar files (which of course include quite a
>>>>> bit more than XSD):
>>>>>
>>>>> org.eclipse.core.resources_3.1.0.jar org.eclipse.osgi_3.1.0.jar
>>>>> org.eclipse.core.resources.linux_3.1.0.jar
>>>>> org.eclipse.swt.gtk.linux.x86_3.1.0.jar
>>>>> org.eclipse.core.runtime_3.1.0.jar org.eclipse.ui_3.1.0.jar
>>>>> org.eclipse.emf.common_2.1.0.jar
>>>>> org.eclipse.ui.ide_3.1.0.jar
>>>>> org.eclipse.emf.ecore_2.1.0.jar
>>>>> org.eclipse.ui.views_3.1.0.jar
>>>>> org.eclipse.jface_3.1.0.jar org.eclipse.ui.workbench_3.1.0.jar
>>>>> org.eclipse.jface.text_3.1.0.jar org.eclipse.xsd_2.1.0.jar
>>>>>
>>>>>
>>>>> I have also added the the following dependent plugins:
>>>>>
>>>>> Require-Bundle: org.eclipse.jface,
>>>>> org.eclipse.jface.text,
>>>>> org.eclipse.osgi,
>>>>> org.eclipse.swt,
>>>>> org.eclipse.ui,
>>>>> org.eclipse.core.runtime,
>>>>> org.eclipse.osgi.util,
>>>>> org.eclipse.osgi.services,
>>>>> org.eclipse.ui.views,
>>>>> org.eclipse.ui.ide,
>>>>> org.eclipse.ui.editors,
>>>>> org.eclipse.ui.workbench.texteditor,
>>>>> org.junit,
>>>>> org.eclipse.emf.common,
>>>>> org.eclipse.emf.ecore,
>>>>> org.eclipse.xsd,
>>>>> org.eclipse.emf.importer,
>>>>> org.eclipse.emf.importer.ecore,
>>>>> org.eclipse.xsd.ecore.importer
>>>>>
>>>>> With all this, running the same tests that used to work fine, I'm
>>>>> getting the following errors when I try to import an .xsd file.
>>>>>
>>>>> Any ideas?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Francis
>>>>>
>>>>>
>>>>> !SESSION 2005-09-27 10:50:03.485
>>>>> -----------------------------------------------
>>>>> eclipse.buildId=unknown
>>>>> java.version=1.4.2_05
>>>>> java.vendor=Sun Microsystems Inc.
>>>>> BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
>>>>> Framework arguments: -version 3 -application
>>>>> org.eclipse.pde.junit.runtime.uitestapplication -product
>>>>> com.oaklandsw.transform.product -pdelaunch -port 34067
>>>>> -testpluginname com.oaklandsw.transform -test
>>>>> com.oaklandsw.transform.XsdSimpleImportTest:testBasic
>>>>> Command-line arguments: -version 3 -application
>>>>> org.eclipse.pde.junit.runtime.uitestapplication -product
>>>>> com.oaklandsw.transform.product -data
>>>>> /home/francis/junit-workbench-workspace -dev
>>>>> file:/home/francis/d/.metadata/.plugins/org.eclipse.pde.core /XsdSimpleImportTest.testBasic/dev.properties
>>>>> -pdelaunch -os linux -ws gtk -arch x86 -port 34067 -testpluginname
>>>>> com.oaklandsw.transform -test
>>>>> com.oaklandsw.transform.XsdSimpleImportTest:testBasic
>>>>>
>>>>> !ENTRY org.eclipse.ui 4 4 2005-09-27 10:50:11.33
>>>>> !MESSAGE Invalid Menu Extension (Path is invalid):
>>>>> org.eclipse.ui.edit.text.gotoLastEditPosition
>>>>>
>>>>> !ENTRY org.eclipse.xsd 2 0 2005-09-27 10:50:14.290
>>>>> !MESSAGE bundleentry
>>>>> !STACK 0
>>>>> java.net.UnknownHostException: bundleentry
>>>>> at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:153)
>>>>> at java.net.Socket.connect(Socket.java:452)
>>>>> at java.net.Socket.connect(Socket.java:402)
>>>>> at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
>>>>> at sun.net.NetworkClient.openServer(NetworkClient.java:118)
>>>>> at sun.net.ftp.FtpClient.openServer(FtpClient.java:423)
>>>>> at sun.net.ftp.FtpClient.<init>(FtpClient.java:692)
>>>>> at
>>>>> sun.net.www.protocol.ftp.FtpURLConnection.connect(FtpURLConn ection.java:175)
>>>>>
>>>>> at
>>>>> sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(Ftp URLConnection.java:257)
>>>>>
>>>>> at java.net.URL.openStream(URL.java:913)
>>>>> at
>>>>> org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(U nknown
>>>>> Source)
>>>>> at
>>>>> org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
>>>>> at
>>>>> org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
>>>>> at org.apache.xerces.impl.XMLDTDScannerImpl.startPE(Unknown
>>>>> Source)
>>>>> at
>>>>> org.apache.xerces.impl.XMLDTDScannerImpl.skipSeparator(Unkno wn Source)
>>>>> at
>>>>> org.apache.xerces.impl.XMLDTDScannerImpl.scanDecls(Unknown Source)
>>>>> at
>>>>> org.apache.xerces.impl.XMLDTDScannerImpl.scanDTDExternalSubs et(Unknown
>>>>> Source)
>>>>> at
>>>>> org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher. dispatch(Unknown
>>>>> Source)
>>>>> at
>>>>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDo cument(Unknown
>>>>> Source)
>>>>> at
>>>>> org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>>>>> at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
>>>>> Source)
>>>>> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>>>>> at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
>>>>> at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown
>>>>> Source)
>>>>> at
>>>>> org.eclipse.xsd.util.XSDResourceImpl.getDocument(XSDResource Impl.java:238)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:412)
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:398)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDImportImpl.importSchema(XSDImportImp l.java:476)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.resolveSchema(XSDSchemaIm pl.java:2120)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.resolveNamedComponent(XSD SchemaImpl.java:2143)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.resolveAttributeDeclarati on(XSDSchemaImpl.java:2168)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.resolveAttribu teDeclaration(XSDConcreteComponentImpl.java:2469)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDAttributeDeclarationImpl.patch(XSDAt tributeDeclarationImpl.java:203)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDAttributeUseImpl.patch(XSDAttributeU seImpl.java:738)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDNamedComponentImpl.patch(XSDNamedCom ponentImpl.java:727)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDTypeDefinitionImpl.patch(XSDTypeDefi nitionImpl.java:249)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.patch(XSDC omplexTypeDefinitionImpl.java:994)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDNamedComponentImpl.patch(XSDNamedCom ponentImpl.java:727)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.patch(XSDElem entDeclarationImpl.java:546)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1493)
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2314)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1219)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:825)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:489)
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaForSchema(XSDSch emaImpl.java:609)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:420)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:536)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:502)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:431)
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
>>>>>
>>>>> at
>>>>> com.oaklandsw.transform.rep.xml.XsdImportProcessor.importFro mFile(XsdImportProcessor.java:178)
>>>>>
>>>>> at
>>>>> com.oaklandsw.transform.rep.xml.XsdImporter.doImportSubclass (XsdImporter.java:42)
>>>>>
>>>>> at
>>>>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:338)
>>>>> at
>>>>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:322)
>>>>> at
>>>>> com.oaklandsw.transform.TransformTestBase.importXsdDefinitio n(TransformTestBase.java:1711)
>>>>>
>>>>> at
>>>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1926)
>>>>>
>>>>> at
>>>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1905)
>>>>>
>>>>> at
>>>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1891)
>>>>>
>>>>> at
>>>>> com.oaklandsw.transform.XsdSimpleImportTest.testBasic(XsdSim pleImportTest.java:43)
>>>>>
>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>> at
>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>>>
>>>>> at
>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>>>
>>>>> at java.lang.reflect.Method.invoke(Method.java:324)
>>>>> at junit.framework.TestCase.runTest(TestCase.java:154)
>>>>> at junit.framework.TestCase.runBare(TestCase.java:127)
>>>>> at junit.framework.TestResult$1.protect(TestResult.java:106)
>>>>> at
>>>>> junit.framework.TestResult.runProtected(TestResult.java:124)
>>>>> at junit.framework.TestResult.run(TestResult.java:109)
>>>>> at junit.framework.TestCase.run(TestCase.java:118)
>>>>> at
>>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:478)
>>>>>
>>>>> at
>>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:344)
>>>>>
>>>>> at
>>>>> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:57)
>>>>>
>>>>> at
>>>>> org.eclipse.pde.internal.junit.runtime.UITestApplication$1.r un(UITestApplication.java:99)
>>>>>
>>>>> at
>>>>> org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
>>>>> at
>>>>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
>>>>>
>>>>> at
>>>>> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2844)
>>>>> at
>>>>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2575)
>>>>> at
>>>>> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1699)
>>>>> at
>>>>> org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
>>>>> at
>>>>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:367)
>>>>>
>>>>> at
>>>>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
>>>>> at
>>>>> com.oaklandsw.transform.editor.Editor.runEditor(Editor.java: 2111)
>>>>> at
>>>>> com.oaklandsw.transform.editor.Standalone.run(Standalone.jav a:72)
>>>>> at
>>>>> org.eclipse.pde.internal.junit.runtime.UITestApplication.run (UITestApplication.java:39)
>>>>>
>>>>> at
>>>>> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
>>>>>
>>>>> at
>>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
>>>>>
>>>>> at
>>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
>>>>>
>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>> at
>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>>>
>>>>> at
>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>>>
>>>>> at java.lang.reflect.Method.invoke(Method.java:324)
>>>>> at
>>>>> org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
>>>>> at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
>>>>> at org.eclipse.core.launcher.Main.run(Main.java:973)
>>>>> at org.eclipse.core.launcher.Main.main(Main.java:948)
>>>>>
>>>>> !ENTRY org.eclipse.xsd 2 0 2005-09-27 10:50:14.505
>>>>> !MESSAGE
>>>>> !STACK 0
>>>>> java.lang.NullPointerException
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleNewB aseTypeDefinition(XSDComplexTypeDefinitionImpl.java:2046)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2329)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDModelGroupImpl.adoptContent(XSDModel GroupImpl.java:693)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDModelGroupImpl.handleReconciliation( XSDModelGroupImpl.java:657)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.adoptConte nt(XSDComplexTypeDefinitionImpl.java:2600)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.setContent (XSDComplexTypeDefinitionImpl.java:758)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2240)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.adoptContent(XSDSchemaImp l.java:1763)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.handleReconciliation(XSDS chemaImpl.java:1985)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.changeAttribut e(XSDConcreteComponentImpl.java:1246)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2318)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1219)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElementGen( XSDConcreteComponentImpl.java:2817)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElement(XSD ConcreteComponentImpl.java:2849)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.setElement(XSDSchemaImpl. java:2441)
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:422)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:536)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:502)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:431)
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
>>>>>
>>>>> at
>>>>> com.oaklandsw.transform.rep.xml.XsdImportProcessor.importFro mFile(XsdImportProcessor.java:178)
>>>>>
>>>>> at
>>>>> com.oaklandsw.transform.rep.xml.XsdImporter.doImportSubclass (XsdImporter.java:42)
>>>>>
>>>>> at
>>>>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:338)
>>>>> at
>>>>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:322)
>>>>> at
>>>>> com.oaklandsw.transform.TransformTestBase.importXsdDefinitio n(TransformTestBase.java:1711)
>>>>>
>>>>> at
>>>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1926)
>>>>>
>>>>> at
>>>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1905)
>>>>>
>>>>> at
>>>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1891)
>>>>>
>>>>> at
>>>>> com.oaklandsw.transform.XsdSimpleImportTest.testBasic(XsdSim pleImportTest.java:43)
>>>>>
>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>> at
>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>>>
>>>>> at
>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>>>
>>>>> at java.lang.reflect.Method.invoke(Method.java:324)
>>>>> at junit.framework.TestCase.runTest(TestCase.java:154)
>>>>> at junit.framework.TestCase.runBare(TestCase.java:127)
>>>>> at junit.framework.TestResult$1.protect(TestResult.java:106)
>>>>> at
>>>>> junit.framework.TestResult.runProtected(TestResult.java:124)
>>>>> at junit.framework.TestResult.run(TestResult.java:109)
>>>>> at junit.framework.TestCase.run(TestCase.java:118)
>>>>> at
>>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:478)
>>>>>
>>>>> at
>>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:344)
>>>>>
>>>>> at
>>>>> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:57)
>>>>>
>>>>> at
>>>>> org.eclipse.pde.internal.junit.runtime.UITestApplication$1.r un(UITestApplication.java:99)
>>>>>
>>>>> at
>>>>> org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
>>>>> at
>>>>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
>>>>>
>>>>> at
>>>>> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2844)
>>>>> at
>>>>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2575)
>>>>> at
>>>>> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1699)
>>>>> at
>>>>> org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
>>>>> at
>>>>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:367)
>>>>>
>>>>> at
>>>>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
>>>>> at
>>>>> com.oaklandsw.transform.editor.Editor.runEditor(Editor.java: 2111)
>>>>> at
>>>>> com.oaklandsw.transform.editor.Standalone.run(Standalone.jav a:72)
>>>>> at
>>>>> org.eclipse.pde.internal.junit.runtime.UITestApplication.run (UITestApplication.java:39)
>>>>>
>>>>> at
>>>>> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
>>>>>
>>>>> at
>>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
>>>>>
>>>>> at
>>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
>>>>>
>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>> at
>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>>>
>>>>> at
>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>>>
>>>>> at java.lang.reflect.Method.invoke(Method.java:324)
>>>>> at
>>>>> org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
>>>>> at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
>>>>> at org.eclipse.core.launcher.Main.run(Main.java:973)
>>>>> at org.eclipse.core.launcher.Main.main(Main.java:948)
>>>>> main ~/junit-workbench-workspace/.metadata>
>>>>>
>>>>>
Platform UI Committer for Common Navigator
http://wiki.eclipse.org/index.php/Common_Navigator_Framework
http://help.eclipse.org/galileo/topic/org.eclipse.platform.d oc.isv/guide/cnf.htm
|
|
|
Re: errors using XSD as plugin, UnknownHostException and NPE [message #64105 is a reply to message #64081] |
Wed, 28 September 2005 10:19 |
Francis Upton IV Messages: 472 Registered: July 2009 Location: Oakland, CA |
Senior Member |
|
|
Good morning Ed,
I have resolved the first of the two exceptions. It was caused by
inconsistent xerces jar files from two different versions. Sorry about
troubling you for that, and my punishment is that my sloppyness will be
enshrined here for public view by future generations.
However, the 2nd NPE still remains (I copied the stack trace below this
message). In this case, it is trying to get the "schema for schema",
but in the schema being parsed, the qNamePrefixToNamespaceMap is empty,
but the schemaForSchemaQnamePrefix contains "xsd" which is what I would
expect.
java.lang.NullPointerException
at
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleNewB aseTypeDefinition(XSDComplexTypeDefinitionImpl.java:2046)
at
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2329)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
at
org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
at
org.eclipse.xsd.impl.XSDModelGroupImpl.adoptContent(XSDModel GroupImpl.java:693)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
at
org.eclipse.xsd.impl.XSDModelGroupImpl.handleReconciliation( XSDModelGroupImpl.java:657)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
at
org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
at
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.adoptConte nt(XSDComplexTypeDefinitionImpl.java:2600)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
at
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.setContent (XSDComplexTypeDefinitionImpl.java:758)
at
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2240)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
at
org.eclipse.xsd.impl.XSDSchemaImpl.adoptContent(XSDSchemaImp l.java:1763)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
at
org.eclipse.xsd.impl.XSDSchemaImpl.handleReconciliation(XSDS chemaImpl.java:1985)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.changeAttribut e(XSDConcreteComponentImpl.java:1246)
at
org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2318)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1219)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElementGen( XSDConcreteComponentImpl.java:2817)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElement(XSD ConcreteComponentImpl.java:2849)
at
org.eclipse.xsd.impl.XSDSchemaImpl.setElement(XSDSchemaImpl. java:2441)
at
org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:422)
at
org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:536)
at
org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:502)
at
org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:431)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
at
com.oaklandsw.transform.rep.xml.XsdImportProcessor.importFro mFile(XsdImportProcessor.java:178)
at
com.oaklandsw.transform.rep.xml.XsdImporter.doImportSubclass (XsdImporter.java:42)
at
com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:338)
at
com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:322)
at
com.oaklandsw.transform.TransformTestBase.importXsdDefinitio n(TransformTestBase.java:1711)
at
com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1926)
at
com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1905)
at
com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1891)
at
com.oaklandsw.transform.XsdSimpleImportTest.testBasic(XsdSim pleImportTest.java:43)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:478)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:344)
at
org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:57)
at
org.eclipse.pde.internal.junit.runtime.UITestApplication$1.r un(UITestApplication.java:99)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
at
org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2844)
at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2575)
at
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1699)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:367)
at
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
at
com.oaklandsw.transform.editor.Editor.runEditor(Editor.java: 2111)
at
com.oaklandsw.transform.editor.Standalone.run(Standalone.jav a:72)
at
org.eclipse.pde.internal.junit.runtime.UITestApplication.run (UITestApplication.java:39)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
at org.eclipse.core.launcher.Main.run(Main.java:973)
at org.eclipse.core.launcher.Main.main(Main.java:948)
Here is the XSD file (which has worked fine in the past):
<?xml version="1.0" encoding="UTF-8" ?>
<!--
simple xsd document
-->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.publishing.org"
xmlns="http://www.publishing.org"
elementFormDefault="qualified">
<xsd:element name="BookCatalogue">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Book" minOccurs="1"
maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element
name="Title" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element
name="Author" type="xsd:string" minOccurs="1" maxOccurs="2"/>
<xsd:element
name="Date" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<!-- ISBN
element is optional for the sake of testing -->
<xsd:element
name="ISBN" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element
name="Publisher" type="xsd:string" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
Platform UI Committer for Common Navigator
http://wiki.eclipse.org/index.php/Common_Navigator_Framework
http://help.eclipse.org/galileo/topic/org.eclipse.platform.d oc.isv/guide/cnf.htm
|
|
|
Re: errors using XSD as plugin, UnknownHostException and NPE [message #64134 is a reply to message #64105] |
Wed, 28 September 2005 11:41 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
This is a multi-part message in MIME format.
--------------010901020603010302050600
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Francis,
I can't duplicate this problem. The prefix map should have been
populated by this code in XSDSchemaImpl.reconcileAttributes:
Map theQNamePrefixToNamespaceMap = getQNamePrefixToNamespaceMap();
theQNamePrefixToNamespaceMap.clear();
for (Element currentElement = changedElement; currentElement
!= null; )
{
NamedNodeMap attributes = currentElement.getAttributes();
for (int i = 0, size = attributes.getLength(); i < size; ++i)
{
Attr attr = (Attr)attributes.item(i);
String name = attr.getNodeName();
if (name.startsWith("xmlns"))
{
String value = attr.getNodeValue();
int index = name.indexOf(":");
String key = index == -1 ? null : name.substring(index
+ 1);
if (!theQNamePrefixToNamespaceMap.containsKey(key))
{
theQNamePrefixToNamespaceMap.put(key, value);
}
}
}
Node parent = currentElement.getParentNode();
if (parent instanceof Element)
{
currentElement = (Element)parent;
}
else
{
break;
}
}
Maybe you could step through that and see why no prefix mappings are
being populated.
Francis Upton wrote:
> Good morning Ed,
>
> I have resolved the first of the two exceptions. It was caused by
> inconsistent xerces jar files from two different versions. Sorry
> about troubling you for that, and my punishment is that my sloppyness
> will be enshrined here for public view by future generations.
>
> However, the 2nd NPE still remains (I copied the stack trace below
> this message). In this case, it is trying to get the "schema for
> schema", but in the schema being parsed, the qNamePrefixToNamespaceMap
> is empty, but the schemaForSchemaQnamePrefix contains "xsd" which is
> what I would expect.
>
> java.lang.NullPointerException
> at
> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleNewB aseTypeDefinition(XSDComplexTypeDefinitionImpl.java:2046)
>
> at
> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2329)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>
> at
> org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>
> at
> org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
>
> at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>
> at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>
> at
> org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
>
> at
> org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>
> at
> org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
>
> at
> org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>
> at
> org.eclipse.xsd.impl.XSDModelGroupImpl.adoptContent(XSDModel GroupImpl.java:693)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
>
> at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>
> at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>
> at
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
>
> at
> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
>
> at
> org.eclipse.xsd.impl.XSDModelGroupImpl.handleReconciliation( XSDModelGroupImpl.java:657)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
>
> at
> org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>
> at
> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.adoptConte nt(XSDComplexTypeDefinitionImpl.java:2600)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>
> at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>
> at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>
> at
> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.setContent (XSDComplexTypeDefinitionImpl.java:758)
>
> at
> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2240)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>
> at
> org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>
> at
> org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
>
> at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>
> at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>
> at
> org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
>
> at
> org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>
> at
> org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.adoptContent(XSDSchemaImp l.java:1763)
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
>
> at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>
> at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>
> at
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
>
> at
> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
>
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.handleReconciliation(XSDS chemaImpl.java:1985)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.changeAttribut e(XSDConcreteComponentImpl.java:1246)
>
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2318)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1219)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElementGen( XSDConcreteComponentImpl.java:2817)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElement(XSD ConcreteComponentImpl.java:2849)
>
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.setElement(XSDSchemaImpl. java:2441)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:422)
> at
> org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:536)
>
> at
> org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:502)
>
> at
> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:431)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
>
> at
> com.oaklandsw.transform.rep.xml.XsdImportProcessor.importFro mFile(XsdImportProcessor.java:178)
>
> at
> com.oaklandsw.transform.rep.xml.XsdImporter.doImportSubclass (XsdImporter.java:42)
>
> at
> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:338)
> at
> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:322)
> at
> com.oaklandsw.transform.TransformTestBase.importXsdDefinitio n(TransformTestBase.java:1711)
>
> at
> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1926)
>
> at
> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1905)
>
> at
> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1891)
>
> at
> com.oaklandsw.transform.XsdSimpleImportTest.testBasic(XsdSim pleImportTest.java:43)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:324)
> at junit.framework.TestCase.runTest(TestCase.java:154)
> at junit.framework.TestCase.runBare(TestCase.java:127)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:118)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:478)
>
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:344)
>
> at
> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:57)
>
> at
> org.eclipse.pde.internal.junit.runtime.UITestApplication$1.r un(UITestApplication.java:99)
>
> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
> at
> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
>
> at
> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2844)
> at
> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2575)
> at
> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1699)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:367)
>
> at
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
> at
> com.oaklandsw.transform.editor.Editor.runEditor(Editor.java: 2111)
> at
> com.oaklandsw.transform.editor.Standalone.run(Standalone.jav a:72)
> at
> org.eclipse.pde.internal.junit.runtime.UITestApplication.run (UITestApplication.java:39)
>
> at
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:324)
> at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
> at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
> at org.eclipse.core.launcher.Main.run(Main.java:973)
> at org.eclipse.core.launcher.Main.main(Main.java:948)
>
>
>
>
>
>
> Here is the XSD file (which has worked fine in the past):
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <!--
> simple xsd document
> -->
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> targetNamespace="http://www.publishing.org"
> xmlns="http://www.publishing.org"
> elementFormDefault="qualified">
> <xsd:element name="BookCatalogue">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="Book"
> minOccurs="1" maxOccurs="unbounded">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element
> name="Title" type="xsd:string" minOccurs="1" maxOccurs="1"/>
> <xsd:element
> name="Author" type="xsd:string" minOccurs="1" maxOccurs="2"/>
> <xsd:element
> name="Date" type="xsd:string" minOccurs="1" maxOccurs="1"/>
> <!-- ISBN
> element is optional for the sake of testing -->
> <xsd:element
> name="ISBN" type="xsd:string" minOccurs="0" maxOccurs="1"/>
> <xsd:element
> name="Publisher" type="xsd:string" minOccurs="1" maxOccurs="1"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> </xsd:schema>
>
--------------010901020603010302050600
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Francis,<br>
<br>
I can't duplicate this problem. The prefix map should have been
populated by this code in XSDSchemaImpl.reconcileAttributes:<br>
<blockquote><small> Map theQNamePrefixToNamespaceMap =
getQNamePrefixToNamespaceMap();</small><br>
<small> theQNamePrefixToNamespaceMap.clear();</small><br>
<small> for (Element currentElement = changedElement;
currentElement != null; ) </small><br>
<small> {</small><br>
<small> NamedNodeMap attributes =
currentElement.getAttributes(); </small><br>
<small> for (int i = 0, size = attributes.getLength(); i <
size; ++i)</small><br>
<small> {</small><br>
<small> Attr attr = (Attr)attributes.item(i);</small><br>
<small> String name = attr.getNodeName();</small><br>
<small> if (name.startsWith("xmlns"))</small><br>
<small> {</small><br>
<small> String value = attr.getNodeValue();</small><br>
<small> int index = name.indexOf(":");</small><br>
<small> String key = index == -1 ? null :
name.substring(index + 1);</small><br>
<small> if
(!theQNamePrefixToNamespaceMap.containsKey(key)) </small><br>
<small> {</small><br>
<small> theQNamePrefixToNamespaceMap.put(key, value);</small><br>
<small> }</small><br>
<small> }</small><br>
<small> }</small><br>
<small> Node parent = currentElement.getParentNode(); </small><br>
<small> if (parent instanceof Element)</small><br>
<small> {</small><br>
<small> currentElement = (Element)parent;</small><br>
<small> }</small><br>
<small> else</small><br>
<small> {</small><br>
<small> break;</small><br>
<small> }</small><br>
<small> } </small><br>
</blockquote>
Maybe you could step through that and see why no prefix mappings are
being populated.<br>
<br>
<br>
Francis Upton wrote:
<blockquote cite="middhdqo7$jbk$1@news.eclipse.org" type="cite">Good
morning Ed,
<br>
<br>
I have resolved the first of the two exceptions. It was caused by
inconsistent xerces jar files from two different versions. Sorry about
troubling you for that, and my punishment is that my sloppyness will be
enshrined here for public view by future generations.
<br>
<br>
However, the 2nd NPE still remains (I copied the stack trace below this
message). In this case, it is trying to get the "schema for schema",
but in the schema being parsed, the qNamePrefixToNamespaceMap is empty,
but the schemaForSchemaQnamePrefix contains "xsd" which is what I would
expect.
<br>
<br>
java.lang.NullPointerException
<br>
at
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleNewB aseTypeDefinition(XSDComplexTypeDefinitionImpl.java:2046)
<br>
at
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2329)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
<br>
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
<br>
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
<br>
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
<br>
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
<br>
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
<br>
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
<br>
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
<br>
at
org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
<br>
at
org.eclipse.xsd.impl.XSDModelGroupImpl.adoptContent(XSDModel GroupImpl.java:693)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
<br>
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
<br>
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
<br>
at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
<br>
at
org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
<br>
at
org.eclipse.xsd.impl.XSDModelGroupImpl.handleReconciliation( XSDModelGroupImpl.java:657)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
<br>
at
org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
<br>
at
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.adoptConte nt(XSDComplexTypeDefinitionImpl.java:2600)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
<br>
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
<br>
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
<br>
at
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.setContent (XSDComplexTypeDefinitionImpl.java:758)
<br>
at
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2240)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
<br>
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
<br>
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
<br>
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
<br>
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
<br>
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
<br>
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
<br>
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
<br>
at
org.eclipse.xsd.impl.XSDSchemaImpl.adoptContent(XSDSchemaImp l.java:1763)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
<br>
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
<br>
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
<br>
at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
<br>
at
org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
<br>
at
org.eclipse.xsd.impl.XSDSchemaImpl.handleReconciliation(XSDS chemaImpl.java:1985)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.changeAttribut e(XSDConcreteComponentImpl.java:1246)
<br>
at
org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2318)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1219)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElementGen( XSDConcreteComponentImpl.java:2817)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElement(XSD ConcreteComponentImpl.java:2849)
<br>
at
org.eclipse.xsd.impl.XSDSchemaImpl.setElement(XSDSchemaImpl. java:2441)
<br>
at
org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:422)
<br>
at
org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:536)
<br>
at
org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:502)
<br>
at
org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:431)
<br>
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
<br>
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
<br>
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
<br>
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
<br>
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
<br>
at
com.oaklandsw.transform.rep.xml.XsdImportProcessor.importFro mFile(XsdImportProcessor.java:178)
<br>
at
com.oaklandsw.transform.rep.xml.XsdImporter.doImportSubclass (XsdImporter.java:42)
<br>
at
com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:338)
<br>
at
com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:322)
<br>
at
com.oaklandsw.transform.TransformTestBase.importXsdDefinitio n(TransformTestBase.java:1711)
<br>
at
com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1926)
<br>
at
com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1905)
<br>
at
com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1891)
<br>
at
com.oaklandsw.transform.XsdSimpleImportTest.testBasic(XsdSim pleImportTest.java:43)
<br>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
<br>
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
<br>
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
<br>
at java.lang.reflect.Method.invoke(Method.java:324)
<br>
at junit.framework.TestCase.runTest(TestCase.java:154)
<br>
at junit.framework.TestCase.runBare(TestCase.java:127)
<br>
at junit.framework.TestResult$1.protect(TestResult.java:106)
<br>
at junit.framework.TestResult.runProtected(TestResult.java:124)
<br>
at junit.framework.TestResult.run(TestResult.java:109)
<br>
at junit.framework.TestCase.run(TestCase.java:118)
<br>
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:478)
<br>
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:344)
<br>
at
org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:57)
<br>
at
org.eclipse.pde.internal.junit.runtime.UITestApplication$1.r un(UITestApplication.java:99)
<br>
at
org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
<br>
at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
<br>
at
org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2844)
<br>
at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2575)
<br>
at
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1699)
<br>
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
<br>
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:367)
<br>
at
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
<br>
at
com.oaklandsw.transform.editor.Editor.runEditor(Editor.java: 2111)
<br>
at
com.oaklandsw.transform.editor.Standalone.run(Standalone.jav a:72)
<br>
at
org.eclipse.pde.internal.junit.runtime.UITestApplication.run (UITestApplication.java:39)
<br>
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
<br>
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
<br>
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
<br>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
<br>
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
<br>
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
<br>
at java.lang.reflect.Method.invoke(Method.java:324)
<br>
at
org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
<br>
at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
<br>
at org.eclipse.core.launcher.Main.run(Main.java:973)
<br>
at org.eclipse.core.launcher.Main.main(Main.java:948)
<br>
<br>
<br>
<br>
<br>
<br>
<br>
Here is the XSD file (which has worked fine in the past):
<br>
<br>
<?xml version="1.0" encoding="UTF-8" ?>
<br>
<!--
<br>
simple xsd document
<br>
-->
<br>
<xsd:schema xmlns:xsd=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a>
<br>
targetNamespace=<a class="moz-txt-link-rfc2396E" href="http://www.publishing.org">"http://www.publishing.org"</a>
<br>
xmlns=<a class="moz-txt-link-rfc2396E" href="http://www.publishing.org">"http://www.publishing.org"</a>
<br>
elementFormDefault="qualified">
<br>
<xsd:element name="BookCatalogue">
<br>
<xsd:complexType>
<br>
<xsd:sequence>
<br>
<xsd:element name="Book"
minOccurs="1" maxOccurs="unbounded">
<br>
<xsd:complexType>
<br>
<xsd:sequence>
<br>
<xsd:element
name="Title" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<br>
<xsd:element
name="Author" type="xsd:string" minOccurs="1" maxOccurs="2"/>
<br>
<xsd:element
name="Date" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<br>
<!-- ISBN
element is optional for the sake of testing -->
<br>
<xsd:element
name="ISBN" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<br>
<xsd:element
name="Publisher" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<br>
</xsd:sequence>
<br>
</xsd:complexType>
<br>
</xsd:element>
<br>
</xsd:sequence>
<br>
</xsd:complexType>
<br>
</xsd:element>
<br>
</xsd:schema>
<br>
<br>
</blockquote>
<br>
</body>
</html>
--------------010901020603010302050600--
|
|
|
Re: errors using XSD as plugin, UnknownHostException and NPE [message #64158 is a reply to message #64134] |
Wed, 28 September 2005 17:16 |
Francis Upton IV Messages: 472 Registered: July 2009 Location: Oakland, CA |
Senior Member |
|
|
Ed,
I have stepped through the code and the xmlns attribute is not present
in the Element. The element is of type
org.apache.xerces.dom.ElementNsImpl, and the namespace information is
provided in fields of that element.
I'm guessing this alteration of the element is caused by the:
http://xml.org/sax/features/namespaces feature of the Xerces parser,
which is by default set to true.
See: http://xml.apache.org/xerces2-j/features.html
How are the features controls for Xerces as used by the XSd stuff?
Francis
Ed Merks wrote:
> Francis,
>
> I can't duplicate this problem. The prefix map should have been
> populated by this code in XSDSchemaImpl.reconcileAttributes:
>
> Map theQNamePrefixToNamespaceMap = getQNamePrefixToNamespaceMap();
> theQNamePrefixToNamespaceMap.clear();
> for (Element currentElement = changedElement; currentElement
> != null; )
> {
> NamedNodeMap attributes = currentElement.getAttributes();
> for (int i = 0, size = attributes.getLength(); i < size; ++i)
> {
> Attr attr = (Attr)attributes.item(i);
> String name = attr.getNodeName();
> if (name.startsWith("xmlns"))
> {
> String value = attr.getNodeValue();
> int index = name.indexOf(":");
> String key = index == -1 ? null : name.substring(index
> + 1);
> if (!theQNamePrefixToNamespaceMap.containsKey(key))
> {
> theQNamePrefixToNamespaceMap.put(key, value);
> }
> }
> }
> Node parent = currentElement.getParentNode();
> if (parent instanceof Element)
> {
> currentElement = (Element)parent;
> }
> else
> {
> break;
> }
> }
>
> Maybe you could step through that and see why no prefix mappings are
> being populated.
>
>
> Francis Upton wrote:
>
>> Good morning Ed,
>>
>> I have resolved the first of the two exceptions. It was caused by
>> inconsistent xerces jar files from two different versions. Sorry
>> about troubling you for that, and my punishment is that my sloppyness
>> will be enshrined here for public view by future generations.
>>
>> However, the 2nd NPE still remains (I copied the stack trace below
>> this message). In this case, it is trying to get the "schema for
>> schema", but in the schema being parsed, the qNamePrefixToNamespaceMap
>> is empty, but the schemaForSchemaQnamePrefix contains "xsd" which is
>> what I would expect.
>>
>> java.lang.NullPointerException
>> at
>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleNewB aseTypeDefinition(XSDComplexTypeDefinitionImpl.java:2046)
>>
>> at
>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2329)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>
>> at
>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>
>> at
>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>
>> at
>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
>>
>> at
>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>
>> at
>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
>>
>> at
>> org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>
>> at
>> org.eclipse.xsd.impl.XSDModelGroupImpl.adoptContent(XSDModel GroupImpl.java:693)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
>>
>> at
>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
>>
>> at
>> org.eclipse.xsd.impl.XSDModelGroupImpl.handleReconciliation( XSDModelGroupImpl.java:657)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
>>
>> at
>> org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>
>> at
>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.adoptConte nt(XSDComplexTypeDefinitionImpl.java:2600)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>
>> at
>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.setContent (XSDComplexTypeDefinitionImpl.java:758)
>>
>> at
>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2240)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>
>> at
>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>
>> at
>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>
>> at
>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
>>
>> at
>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>
>> at
>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>
>> at
>> org.eclipse.xsd.impl.XSDSchemaImpl.adoptContent(XSDSchemaImp l.java:1763)
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
>>
>> at
>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
>>
>> at
>> org.eclipse.xsd.impl.XSDSchemaImpl.handleReconciliation(XSDS chemaImpl.java:1985)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.changeAttribut e(XSDConcreteComponentImpl.java:1246)
>>
>> at
>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2318)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1219)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElementGen( XSDConcreteComponentImpl.java:2817)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElement(XSD ConcreteComponentImpl.java:2849)
>>
>> at
>> org.eclipse.xsd.impl.XSDSchemaImpl.setElement(XSDSchemaImpl. java:2441)
>> at
>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:422)
>> at
>> org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:536)
>>
>> at
>> org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:502)
>>
>> at
>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:431)
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
>>
>> at
>> com.oaklandsw.transform.rep.xml.XsdImportProcessor.importFro mFile(XsdImportProcessor.java:178)
>>
>> at
>> com.oaklandsw.transform.rep.xml.XsdImporter.doImportSubclass (XsdImporter.java:42)
>>
>> at
>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:338)
>> at
>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:322)
>> at
>> com.oaklandsw.transform.TransformTestBase.importXsdDefinitio n(TransformTestBase.java:1711)
>>
>> at
>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1926)
>>
>> at
>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1905)
>>
>> at
>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1891)
>>
>> at
>> com.oaklandsw.transform.XsdSimpleImportTest.testBasic(XsdSim pleImportTest.java:43)
>>
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>
>> at java.lang.reflect.Method.invoke(Method.java:324)
>> at junit.framework.TestCase.runTest(TestCase.java:154)
>> at junit.framework.TestCase.runBare(TestCase.java:127)
>> at junit.framework.TestResult$1.protect(TestResult.java:106)
>> at junit.framework.TestResult.runProtected(TestResult.java:124)
>> at junit.framework.TestResult.run(TestResult.java:109)
>> at junit.framework.TestCase.run(TestCase.java:118)
>> at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:478)
>>
>> at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:344)
>>
>> at
>> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:57)
>>
>> at
>> org.eclipse.pde.internal.junit.runtime.UITestApplication$1.r un(UITestApplication.java:99)
>>
>> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
>> at
>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
>>
>> at
>> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2844)
>> at
>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2575)
>> at
>> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1699)
>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
>> at
>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:367)
>>
>> at
>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
>> at
>> com.oaklandsw.transform.editor.Editor.runEditor(Editor.java: 2111)
>> at
>> com.oaklandsw.transform.editor.Standalone.run(Standalone.jav a:72)
>> at
>> org.eclipse.pde.internal.junit.runtime.UITestApplication.run (UITestApplication.java:39)
>>
>> at
>> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
>>
>> at
>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
>>
>> at
>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
>>
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>
>> at java.lang.reflect.Method.invoke(Method.java:324)
>> at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
>> at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
>> at org.eclipse.core.launcher.Main.run(Main.java:973)
>> at org.eclipse.core.launcher.Main.main(Main.java:948)
>>
>>
>>
>>
>>
>>
>> Here is the XSD file (which has worked fine in the past):
>>
>> <?xml version="1.0" encoding="UTF-8" ?>
>> <!--
>> simple xsd document
>> -->
>> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>> targetNamespace="http://www.publishing.org"
>> xmlns="http://www.publishing.org"
>> elementFormDefault="qualified">
>> <xsd:element name="BookCatalogue">
>> <xsd:complexType>
>> <xsd:sequence>
>> <xsd:element name="Book"
>> minOccurs="1" maxOccurs="unbounded">
>> <xsd:complexType>
>> <xsd:sequence>
>> <xsd:element
>> name="Title" type="xsd:string" minOccurs="1" maxOccurs="1"/>
>> <xsd:element
>> name="Author" type="xsd:string" minOccurs="1" maxOccurs="2"/>
>> <xsd:element
>> name="Date" type="xsd:string" minOccurs="1" maxOccurs="1"/>
>> <!-- ISBN
>> element is optional for the sake of testing -->
>> <xsd:element
>> name="ISBN" type="xsd:string" minOccurs="0" maxOccurs="1"/>
>> <xsd:element
>> name="Publisher" type="xsd:string" minOccurs="1" maxOccurs="1"/>
>> </xsd:sequence>
>> </xsd:complexType>
>> </xsd:element>
>> </xsd:sequence>
>> </xsd:complexType>
>> </xsd:element>
>> </xsd:schema>
>>
>
Platform UI Committer for Common Navigator
http://wiki.eclipse.org/index.php/Common_Navigator_Framework
http://help.eclipse.org/galileo/topic/org.eclipse.platform.d oc.isv/guide/cnf.htm
|
|
|
Re: errors using XSD as plugin, UnknownHostException and NPE [message #64184 is a reply to message #64158] |
Wed, 28 September 2005 17:41 |
Francis Upton IV Messages: 472 Registered: July 2009 Location: Oakland, CA |
Senior Member |
|
|
Ed,
Ok, I found the problem. The SAX parser that is was using was the
ancient alfraed parser, not the Xerces one. I already had this code for
the DOM parser.
System.setProperty("javax.xml.parsers.DocumentBuilderFactory ",
"org.apache.xerces.jaxp.DocumentBuilderFactoryImpl");
I added this line for the SAX parser:
System.setProperty("javax.xml.parsers.SAXParserFactory",
"org.apache.xerces.jaxp.SAXParserFactoryImpl");
Thanks for your help.
Francis
Francis Upton wrote:
> Ed,
>
> I have stepped through the code and the xmlns attribute is not present
> in the Element. The element is of type
> org.apache.xerces.dom.ElementNsImpl, and the namespace information is
> provided in fields of that element.
>
> I'm guessing this alteration of the element is caused by the:
> http://xml.org/sax/features/namespaces feature of the Xerces parser,
> which is by default set to true.
>
> See: http://xml.apache.org/xerces2-j/features.html
>
> How are the features controls for Xerces as used by the XSd stuff?
>
> Francis
>
> Ed Merks wrote:
>
>> Francis,
>>
>> I can't duplicate this problem. The prefix map should have been
>> populated by this code in XSDSchemaImpl.reconcileAttributes:
>>
>> Map theQNamePrefixToNamespaceMap =
>> getQNamePrefixToNamespaceMap();
>> theQNamePrefixToNamespaceMap.clear();
>> for (Element currentElement = changedElement; currentElement
>> != null; )
>> {
>> NamedNodeMap attributes = currentElement.getAttributes();
>> for (int i = 0, size = attributes.getLength(); i < size; ++i)
>> {
>> Attr attr = (Attr)attributes.item(i);
>> String name = attr.getNodeName();
>> if (name.startsWith("xmlns"))
>> {
>> String value = attr.getNodeValue();
>> int index = name.indexOf(":");
>> String key = index == -1 ? null : name.substring(index
>> + 1);
>> if (!theQNamePrefixToNamespaceMap.containsKey(key))
>> {
>> theQNamePrefixToNamespaceMap.put(key, value);
>> }
>> }
>> }
>> Node parent = currentElement.getParentNode();
>> if (parent instanceof Element)
>> {
>> currentElement = (Element)parent;
>> }
>> else
>> {
>> break;
>> }
>> }
>>
>> Maybe you could step through that and see why no prefix mappings are
>> being populated.
>>
>>
>> Francis Upton wrote:
>>
>>> Good morning Ed,
>>>
>>> I have resolved the first of the two exceptions. It was caused by
>>> inconsistent xerces jar files from two different versions. Sorry
>>> about troubling you for that, and my punishment is that my sloppyness
>>> will be enshrined here for public view by future generations.
>>>
>>> However, the 2nd NPE still remains (I copied the stack trace below
>>> this message). In this case, it is trying to get the "schema for
>>> schema", but in the schema being parsed, the
>>> qNamePrefixToNamespaceMap is empty, but the
>>> schemaForSchemaQnamePrefix contains "xsd" which is what I would expect.
>>>
>>> java.lang.NullPointerException
>>> at
>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleNewB aseTypeDefinition(XSDComplexTypeDefinitionImpl.java:2046)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2329)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDModelGroupImpl.adoptContent(XSDModel GroupImpl.java:693)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
>>>
>>> at
>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDModelGroupImpl.handleReconciliation( XSDModelGroupImpl.java:657)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.adoptConte nt(XSDComplexTypeDefinitionImpl.java:2600)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.setContent (XSDComplexTypeDefinitionImpl.java:758)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2240)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.adoptContent(XSDSchemaImp l.java:1763)
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
>>>
>>> at
>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.handleReconciliation(XSDS chemaImpl.java:1985)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.changeAttribut e(XSDConcreteComponentImpl.java:1246)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2318)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1219)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElementGen( XSDConcreteComponentImpl.java:2817)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElement(XSD ConcreteComponentImpl.java:2849)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.setElement(XSDSchemaImpl. java:2441)
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:422)
>>> at
>>> org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:536)
>>>
>>> at
>>> org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:502)
>>>
>>> at
>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:431)
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
>>>
>>> at
>>> com.oaklandsw.transform.rep.xml.XsdImportProcessor.importFro mFile(XsdImportProcessor.java:178)
>>>
>>> at
>>> com.oaklandsw.transform.rep.xml.XsdImporter.doImportSubclass (XsdImporter.java:42)
>>>
>>> at
>>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:338)
>>> at
>>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:322)
>>> at
>>> com.oaklandsw.transform.TransformTestBase.importXsdDefinitio n(TransformTestBase.java:1711)
>>>
>>> at
>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1926)
>>>
>>> at
>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1905)
>>>
>>> at
>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1891)
>>>
>>> at
>>> com.oaklandsw.transform.XsdSimpleImportTest.testBasic(XsdSim pleImportTest.java:43)
>>>
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>
>>> at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>
>>> at java.lang.reflect.Method.invoke(Method.java:324)
>>> at junit.framework.TestCase.runTest(TestCase.java:154)
>>> at junit.framework.TestCase.runBare(TestCase.java:127)
>>> at junit.framework.TestResult$1.protect(TestResult.java:106)
>>> at junit.framework.TestResult.runProtected(TestResult.java:124)
>>> at junit.framework.TestResult.run(TestResult.java:109)
>>> at junit.framework.TestCase.run(TestCase.java:118)
>>> at
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:478)
>>>
>>> at
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:344)
>>>
>>> at
>>> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:57)
>>>
>>> at
>>> org.eclipse.pde.internal.junit.runtime.UITestApplication$1.r un(UITestApplication.java:99)
>>>
>>> at
>>> org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
>>> at
>>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
>>>
>>> at
>>> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2844)
>>> at
>>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2575)
>>> at
>>> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1699)
>>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
>>> at
>>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:367)
>>>
>>> at
>>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
>>> at
>>> com.oaklandsw.transform.editor.Editor.runEditor(Editor.java: 2111)
>>> at
>>> com.oaklandsw.transform.editor.Standalone.run(Standalone.jav a:72)
>>> at
>>> org.eclipse.pde.internal.junit.runtime.UITestApplication.run (UITestApplication.java:39)
>>>
>>> at
>>> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
>>>
>>> at
>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
>>>
>>> at
>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
>>>
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>
>>> at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>
>>> at java.lang.reflect.Method.invoke(Method.java:324)
>>> at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
>>> at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
>>> at org.eclipse.core.launcher.Main.run(Main.java:973)
>>> at org.eclipse.core.launcher.Main.main(Main.java:948)
>>>
>>>
>>>
>>>
>>>
>>>
>>> Here is the XSD file (which has worked fine in the past):
>>>
>>> <?xml version="1.0" encoding="UTF-8" ?>
>>> <!--
>>> simple xsd document
>>> -->
>>> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>>> targetNamespace="http://www.publishing.org"
>>> xmlns="http://www.publishing.org"
>>> elementFormDefault="qualified">
>>> <xsd:element name="BookCatalogue">
>>> <xsd:complexType>
>>> <xsd:sequence>
>>> <xsd:element name="Book"
>>> minOccurs="1" maxOccurs="unbounded">
>>> <xsd:complexType>
>>> <xsd:sequence>
>>> <xsd:element
>>> name="Title" type="xsd:string" minOccurs="1" maxOccurs="1"/>
>>> <xsd:element
>>> name="Author" type="xsd:string" minOccurs="1" maxOccurs="2"/>
>>> <xsd:element
>>> name="Date" type="xsd:string" minOccurs="1" maxOccurs="1"/>
>>> <!-- ISBN
>>> element is optional for the sake of testing -->
>>> <xsd:element
>>> name="ISBN" type="xsd:string" minOccurs="0" maxOccurs="1"/>
>>> <xsd:element
>>> name="Publisher" type="xsd:string" minOccurs="1" maxOccurs="1"/>
>>> </xsd:sequence>
>>> </xsd:complexType>
>>> </xsd:element>
>>> </xsd:sequence>
>>> </xsd:complexType>
>>> </xsd:element>
>>> </xsd:schema>
>>>
>>
Platform UI Committer for Common Navigator
http://wiki.eclipse.org/index.php/Common_Navigator_Framework
http://help.eclipse.org/galileo/topic/org.eclipse.platform.d oc.isv/guide/cnf.htm
|
|
|
Re: errors using XSD as plugin, UnknownHostException and NPE [message #64219 is a reply to message #64158] |
Wed, 28 September 2005 18:28 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
This is a multi-part message in MIME format.
--------------010502000104010207030106
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Francis,
Yes, it sounds like a namespace awareness problem.
XSDParser.createDocument is used to create new Documents.
public static Document createDocument()
{
try
{
DocumentBuilderFactory documentBuilderFactory =
DocumentBuilderFactory.newInstance();
documentBuilderFactory.setNamespaceAware(true);
documentBuilderFactory.setValidating(false);
DocumentBuilder documentBuilder =
documentBuilderFactory.newDocumentBuilder();
return documentBuilder.newDocument();
}
catch (ParserConfigurationException exception)
{
XSDPlugin.INSTANCE.log(exception);
return null;
}
}
Or the XSDResourceImpl does it directly:
protected static Document getDocument(InputSource inputSource,
ErrorHandler errorHandler) throws IOException
{
try
{
DocumentBuilderFactory documentBuilderFactory =
DocumentBuilderFactory.newInstance();
documentBuilderFactory.setNamespaceAware(true);
documentBuilderFactory.setValidating(false);
DocumentBuilder documentBuilder =
documentBuilderFactory.newDocumentBuilder();
// Create a catalog with an entity mapping URL for the cached
DTD for XML Schemas and set to into the build.
//
EntityResolver entityResolver = createEntityResolver();
documentBuilder.setEntityResolver(entityResolver);
documentBuilder.setErrorHandler(errorHandler);
Document document = documentBuilder.parse(inputSource);
return document;
}
catch (ParserConfigurationException exception)
{
throw new IOWrappedException(exception);
}
catch (SAXException exception)
{
throw new IOWrappedException(exception);
}
}
Francis Upton wrote:
> Ed,
>
> I have stepped through the code and the xmlns attribute is not present
> in the Element. The element is of type
> org.apache.xerces.dom.ElementNsImpl, and the namespace information is
> provided in fields of that element.
>
> I'm guessing this alteration of the element is caused by the:
> http://xml.org/sax/features/namespaces feature of the Xerces parser,
> which is by default set to true.
>
> See: http://xml.apache.org/xerces2-j/features.html
>
> How are the features controls for Xerces as used by the XSd stuff?
>
> Francis
>
> Ed Merks wrote:
>
>> Francis,
>>
>> I can't duplicate this problem. The prefix map should have been
>> populated by this code in XSDSchemaImpl.reconcileAttributes:
>>
>> Map theQNamePrefixToNamespaceMap =
>> getQNamePrefixToNamespaceMap();
>> theQNamePrefixToNamespaceMap.clear();
>> for (Element currentElement = changedElement; currentElement
>> != null; )
>> {
>> NamedNodeMap attributes = currentElement.getAttributes();
>> for (int i = 0, size = attributes.getLength(); i < size;
>> ++i)
>> {
>> Attr attr = (Attr)attributes.item(i);
>> String name = attr.getNodeName();
>> if (name.startsWith("xmlns"))
>> {
>> String value = attr.getNodeValue();
>> int index = name.indexOf(":");
>> String key = index == -1 ? null : name.substring(index
>> + 1);
>> if (!theQNamePrefixToNamespaceMap.containsKey(key))
>> {
>> theQNamePrefixToNamespaceMap.put(key, value);
>> }
>> }
>> }
>> Node parent = currentElement.getParentNode();
>> if (parent instanceof Element)
>> {
>> currentElement = (Element)parent;
>> }
>> else
>> {
>> break;
>> }
>> }
>>
>> Maybe you could step through that and see why no prefix mappings are
>> being populated.
>>
>>
>> Francis Upton wrote:
>>
>>> Good morning Ed,
>>>
>>> I have resolved the first of the two exceptions. It was caused by
>>> inconsistent xerces jar files from two different versions. Sorry
>>> about troubling you for that, and my punishment is that my
>>> sloppyness will be enshrined here for public view by future
>>> generations.
>>>
>>> However, the 2nd NPE still remains (I copied the stack trace below
>>> this message). In this case, it is trying to get the "schema for
>>> schema", but in the schema being parsed, the
>>> qNamePrefixToNamespaceMap is empty, but the
>>> schemaForSchemaQnamePrefix contains "xsd" which is what I would expect.
>>>
>>> java.lang.NullPointerException
>>> at
>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleNewB aseTypeDefinition(XSDComplexTypeDefinitionImpl.java:2046)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2329)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDModelGroupImpl.adoptContent(XSDModel GroupImpl.java:693)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
>>>
>>> at
>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDModelGroupImpl.handleReconciliation( XSDModelGroupImpl.java:657)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.adoptConte nt(XSDComplexTypeDefinitionImpl.java:2600)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.setContent (XSDComplexTypeDefinitionImpl.java:758)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2240)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.adoptContent(XSDSchemaImp l.java:1763)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
>>>
>>> at
>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.handleReconciliation(XSDS chemaImpl.java:1985)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.changeAttribut e(XSDConcreteComponentImpl.java:1246)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2318)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1219)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElementGen( XSDConcreteComponentImpl.java:2817)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElement(XSD ConcreteComponentImpl.java:2849)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.setElement(XSDSchemaImpl. java:2441)
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:422)
>>> at
>>> org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:536)
>>>
>>> at
>>> org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:502)
>>>
>>> at
>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:431)
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
>>>
>>> at
>>> com.oaklandsw.transform.rep.xml.XsdImportProcessor.importFro mFile(XsdImportProcessor.java:178)
>>>
>>> at
>>> com.oaklandsw.transform.rep.xml.XsdImporter.doImportSubclass (XsdImporter.java:42)
>>>
>>> at
>>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:338)
>>> at
>>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:322)
>>> at
>>> com.oaklandsw.transform.TransformTestBase.importXsdDefinitio n(TransformTestBase.java:1711)
>>>
>>> at
>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1926)
>>>
>>> at
>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1905)
>>>
>>> at
>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1891)
>>>
>>> at
>>> com.oaklandsw.transform.XsdSimpleImportTest.testBasic(XsdSim pleImportTest.java:43)
>>>
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>
>>> at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>
>>> at java.lang.reflect.Method.invoke(Method.java:324)
>>> at junit.framework.TestCase.runTest(TestCase.java:154)
>>> at junit.framework.TestCase.runBare(TestCase.java:127)
>>> at junit.framework.TestResult$1.protect(TestResult.java:106)
>>> at junit.framework.TestResult.runProtected(TestResult.java:124)
>>> at junit.framework.TestResult.run(TestResult.java:109)
>>> at junit.framework.TestCase.run(TestCase.java:118)
>>> at
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:478)
>>>
>>> at
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:344)
>>>
>>> at
>>> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:57)
>>>
>>> at
>>> org.eclipse.pde.internal.junit.runtime.UITestApplication$1.r un(UITestApplication.java:99)
>>>
>>> at
>>> org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
>>> at
>>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
>>>
>>> at
>>> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2844)
>>> at
>>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2575)
>>> at
>>> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1699)
>>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
>>> at
>>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:367)
>>>
>>> at
>>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
>>> at
>>> com.oaklandsw.transform.editor.Editor.runEditor(Editor.java: 2111)
>>> at
>>> com.oaklandsw.transform.editor.Standalone.run(Standalone.jav a:72)
>>> at
>>> org.eclipse.pde.internal.junit.runtime.UITestApplication.run (UITestApplication.java:39)
>>>
>>> at
>>> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
>>>
>>> at
>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
>>>
>>> at
>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
>>>
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>
>>> at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>
>>> at java.lang.reflect.Method.invoke(Method.java:324)
>>> at
>>> org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
>>> at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
>>> at org.eclipse.core.launcher.Main.run(Main.java:973)
>>> at org.eclipse.core.launcher.Main.main(Main.java:948)
>>>
>>>
>>>
>>>
>>>
>>>
>>> Here is the XSD file (which has worked fine in the past):
>>>
>>> <?xml version="1.0" encoding="UTF-8" ?>
>>> <!--
>>> simple xsd document
>>> -->
>>> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>>> targetNamespace="http://www.publishing.org"
>>> xmlns="http://www.publishing.org"
>>> elementFormDefault="qualified">
>>> <xsd:element name="BookCatalogue">
>>> <xsd:complexType>
>>> <xsd:sequence>
>>> <xsd:element name="Book"
>>> minOccurs="1" maxOccurs="unbounded">
>>> <xsd:complexType>
>>> <xsd:sequence>
>>> <xsd:element
>>> name="Title" type="xsd:string" minOccurs="1" maxOccurs="1"/>
>>> <xsd:element
>>> name="Author" type="xsd:string" minOccurs="1" maxOccurs="2"/>
>>> <xsd:element
>>> name="Date" type="xsd:string" minOccurs="1" maxOccurs="1"/>
>>> <!-- ISBN
>>> element is optional for the sake of testing -->
>>> <xsd:element
>>> name="ISBN" type="xsd:string" minOccurs="0" maxOccurs="1"/>
>>> <xsd:element
>>> name="Publisher" type="xsd:string" minOccurs="1" maxOccurs="1"/>
>>> </xsd:sequence>
>>> </xsd:complexType>
>>> </xsd:element>
>>> </xsd:sequence>
>>> </xsd:complexType>
>>> </xsd:element>
>>> </xsd:schema>
>>>
>>
--------------010502000104010207030106
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Francis,<br>
<br>
Yes, it sounds like a namespace awareness problem.
XSDParser.createDocument is used to create new Documents.<br>
<blockquote><small> public static Document createDocument()<br>
{<br>
try<br>
{<br>
DocumentBuilderFactory documentBuilderFactory =
DocumentBuilderFactory.newInstance();<br>
documentBuilderFactory.setNamespaceAware(true);<br>
documentBuilderFactory.setValidating(false);<br>
DocumentBuilder documentBuilder =
documentBuilderFactory.newDocumentBuilder();<br>
return documentBuilder.newDocument();<br>
}<br>
catch (ParserConfigurationException exception)<br>
{<br>
XSDPlugin.INSTANCE.log(exception);<br>
return null;<br>
}<br>
}</small><br>
</blockquote>
Or the XSDResourceImpl does it directly:<br>
<blockquote><small> protected static Document getDocument(InputSource
inputSource, ErrorHandler errorHandler) throws IOException</small><br>
<small> {</small><br>
<small> try</small><br>
<small> {</small><br>
<small> DocumentBuilderFactory documentBuilderFactory =
DocumentBuilderFactory.newInstance();</small><br>
<small> documentBuilderFactory.setNamespaceAware(true);</small><br >
<small> documentBuilderFactory.setValidating(false);</small><br>
<br>
<small> DocumentBuilder documentBuilder =
documentBuilderFactory.newDocumentBuilder();</small><br>
<small> </small><br>
<small> // Create a catalog with an entity mapping URL for the
cached DTD for XML Schemas and set to into the build.</small><br>
<small> //</small><br>
<small> EntityResolver entityResolver = createEntityResolver();</small><br>
<small> documentBuilder.setEntityResolver(entityResolver);</small><br >
<br>
<small> documentBuilder.setErrorHandler(errorHandler);</small><br>
<br>
<small> Document document = documentBuilder.parse(inputSource);</small><br>
<small> return document;</small><br>
<small> }</small><br>
<small> catch (ParserConfigurationException exception)</small><br>
<small> {</small><br>
<small> throw new IOWrappedException(exception);</small><br>
<small> }</small><br>
<small> catch (SAXException exception)</small><br>
<small> {</small><br>
<small> throw new IOWrappedException(exception);</small><br>
<small> }</small><br>
<small> }</small><br>
</blockquote>
<br>
Francis Upton wrote:
<blockquote cite="middhej65$pmd$1@news.eclipse.org" type="cite">Ed,
<br>
<br>
I have stepped through the code and the xmlns attribute is not present
in the Element. The element is of type
org.apache.xerces.dom.ElementNsImpl, and the namespace information is
provided in fields of that element.
<br>
<br>
I'm guessing this alteration of the element is caused by the:
<br>
<a class="moz-txt-link-freetext" href="http://xml.org/sax/features/namespaces">http://xml.org/sax/features/namespaces</a> feature of the Xerces parser,
which is by default set to true.
<br>
<br>
See: <a class="moz-txt-link-freetext" href="http://xml.apache.org/xerces2-j/features.html">http://xml.apache.org/xerces2-j/features.html</a>
<br>
<br>
How are the features controls for Xerces as used by the XSd stuff?
<br>
<br>
Francis
<br>
<br>
Ed Merks wrote:
<br>
<blockquote type="cite">Francis,
<br>
<br>
I can't duplicate this problem. The prefix map should have been
populated by this code in XSDSchemaImpl.reconcileAttributes:
<br>
<br>
Map theQNamePrefixToNamespaceMap =
getQNamePrefixToNamespaceMap();
<br>
theQNamePrefixToNamespaceMap.clear();
<br>
for (Element currentElement = changedElement; currentElement
<br>
!= null; )
<br>
{
<br>
NamedNodeMap attributes = currentElement.getAttributes();
<br>
for (int i = 0, size = attributes.getLength(); i < size;
++i)
<br>
{
<br>
Attr attr = (Attr)attributes.item(i);
<br>
String name = attr.getNodeName();
<br>
if (name.startsWith("xmlns"))
<br>
{
<br>
String value = attr.getNodeValue();
<br>
int index = name.indexOf(":");
<br>
String key = index == -1 ? null : name.substring(index
<br>
+ 1);
<br>
if (!theQNamePrefixToNamespaceMap.containsKey(key))
<br>
{
<br>
theQNamePrefixToNamespaceMap.put(key, value);
<br>
}
<br>
}
<br>
}
<br>
Node parent = currentElement.getParentNode();
<br>
if (parent instanceof Element)
<br>
{
<br>
currentElement = (Element)parent;
<br>
}
<br>
else
<br>
{
<br>
break;
<br>
}
<br>
}
<br>
<br>
Maybe you could step through that and see why no prefix mappings are
being populated.
<br>
<br>
<br>
Francis Upton wrote:
<br>
<br>
<blockquote type="cite">Good morning Ed,
<br>
<br>
I have resolved the first of the two exceptions. It was caused by
inconsistent xerces jar files from two different versions. Sorry about
troubling you for that, and my punishment is that my sloppyness will be
enshrined here for public view by future generations.
<br>
<br>
However, the 2nd NPE still remains (I copied the stack trace below this
message). In this case, it is trying to get the "schema for schema",
but in the schema being parsed, the qNamePrefixToNamespaceMap is empty,
but the schemaForSchemaQnamePrefix contains "xsd" which is what I would
expect.
<br>
<br>
java.lang.NullPointerException
<br>
at
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleNewB aseTypeDefinition(XSDComplexTypeDefinitionImpl.java:2046)
<br>
at
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2329)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
<br>
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
<br>
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
<br>
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
<br>
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
<br>
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
<br>
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
<br>
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
<br>
at
org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
<br>
at
org.eclipse.xsd.impl.XSDModelGroupImpl.adoptContent(XSDModel GroupImpl.java:693)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
<br>
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
<br>
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
<br>
at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
<br>
at
org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
<br>
at
org.eclipse.xsd.impl.XSDModelGroupImpl.handleReconciliation( XSDModelGroupImpl.java:657)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
<br>
at
org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
<br>
at
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.adoptConte nt(XSDComplexTypeDefinitionImpl.java:2600)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
<br>
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
<br>
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
<br>
at
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.setContent (XSDComplexTypeDefinitionImpl.java:758)
<br>
at
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2240)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
<br>
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
<br>
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
<br>
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
<br>
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
<br>
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
<br>
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
<br>
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
<br>
at
org.eclipse.xsd.impl.XSDSchemaImpl.adoptContent(XSDSchemaImp l.java:1763)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
<br>
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
<br>
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
<br>
at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
<br>
at
org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
<br>
at
org.eclipse.xsd.impl.XSDSchemaImpl.handleReconciliation(XSDS chemaImpl.java:1985)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.changeAttribut e(XSDConcreteComponentImpl.java:1246)
<br>
at
org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2318)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1219)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElementGen( XSDConcreteComponentImpl.java:2817)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElement(XSD ConcreteComponentImpl.java:2849)
<br>
at
org.eclipse.xsd.impl.XSDSchemaImpl.setElement(XSDSchemaImpl. java:2441)
<br>
at
org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:422)
<br>
at
org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:536)
<br>
at
org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:502)
<br>
at
org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:431)
<br>
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
<br>
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
<br>
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
<br>
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
<br>
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
<br>
at
com.oaklandsw.transform.rep.xml.XsdImportProcessor.importFro mFile(XsdImportProcessor.java:178)
<br>
at
com.oaklandsw.transform.rep.xml.XsdImporter.doImportSubclass (XsdImporter.java:42)
<br>
at
com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:338)
<br>
at
com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:322)
<br>
at
com.oaklandsw.transform.TransformTestBase.importXsdDefinitio n(TransformTestBase.java:1711)
<br>
at
com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1926)
<br>
at
com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1905)
<br>
at
com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1891)
<br>
at
com.oaklandsw.transform.XsdSimpleImportTest.testBasic(XsdSim pleImportTest.java:43)
<br>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
<br>
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
<br>
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
<br>
at java.lang.reflect.Method.invoke(Method.java:324)
<br>
at junit.framework.TestCase.runTest(TestCase.java:154)
<br>
at junit.framework.TestCase.runBare(TestCase.java:127)
<br>
at junit.framework.TestResult$1.protect(TestResult.java:106)
<br>
at junit.framework.TestResult.runProtected(TestResult.java:124)
<br>
at junit.framework.TestResult.run(TestResult.java:109)
<br>
at junit.framework.TestCase.run(TestCase.java:118)
<br>
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:478)
<br>
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:344)
<br>
at
org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:57)
<br>
at
org.eclipse.pde.internal.junit.runtime.UITestApplication$1.r un(UITestApplication.java:99)
<br>
at
org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
<br>
at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
<br>
at
org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2844)
<br>
at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2575)
<br>
at
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1699)
<br>
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
<br>
&
|
|
|
Re: errors using XSD as plugin, UnknownHostException and NPE [message #64237 is a reply to message #64184] |
Wed, 28 September 2005 18:44 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Francis,
I'm glad to hear it's working. I should have hit send on my other note
before I went to a meeting. ;-)
Francis Upton wrote:
> Ed,
>
> Ok, I found the problem. The SAX parser that is was using was the
> ancient alfraed parser, not the Xerces one. I already had this code
> for the DOM parser.
>
> System.setProperty("javax.xml.parsers.DocumentBuilderFactory ",
>
> "org.apache.xerces.jaxp.DocumentBuilderFactoryImpl");
>
>
> I added this line for the SAX parser:
>
> System.setProperty("javax.xml.parsers.SAXParserFactory",
>
> "org.apache.xerces.jaxp.SAXParserFactoryImpl");
>
>
>
> Thanks for your help.
>
> Francis
>
> Francis Upton wrote:
>
>> Ed,
>>
>> I have stepped through the code and the xmlns attribute is not
>> present in the Element. The element is of type
>> org.apache.xerces.dom.ElementNsImpl, and the namespace information is
>> provided in fields of that element.
>>
>> I'm guessing this alteration of the element is caused by the:
>> http://xml.org/sax/features/namespaces feature of the Xerces parser,
>> which is by default set to true.
>>
>> See: http://xml.apache.org/xerces2-j/features.html
>>
>> How are the features controls for Xerces as used by the XSd stuff?
>>
>> Francis
>>
>> Ed Merks wrote:
>>
>>> Francis,
>>>
>>> I can't duplicate this problem. The prefix map should have been
>>> populated by this code in XSDSchemaImpl.reconcileAttributes:
>>>
>>> Map theQNamePrefixToNamespaceMap =
>>> getQNamePrefixToNamespaceMap();
>>> theQNamePrefixToNamespaceMap.clear();
>>> for (Element currentElement = changedElement; currentElement
>>> != null; )
>>> {
>>> NamedNodeMap attributes = currentElement.getAttributes();
>>> for (int i = 0, size = attributes.getLength(); i < size;
>>> ++i)
>>> {
>>> Attr attr = (Attr)attributes.item(i);
>>> String name = attr.getNodeName();
>>> if (name.startsWith("xmlns"))
>>> {
>>> String value = attr.getNodeValue();
>>> int index = name.indexOf(":");
>>> String key = index == -1 ? null : name.substring(index
>>> + 1);
>>> if (!theQNamePrefixToNamespaceMap.containsKey(key))
>>> {
>>> theQNamePrefixToNamespaceMap.put(key, value);
>>> }
>>> }
>>> }
>>> Node parent = currentElement.getParentNode();
>>> if (parent instanceof Element)
>>> {
>>> currentElement = (Element)parent;
>>> }
>>> else
>>> {
>>> break;
>>> }
>>> }
>>>
>>> Maybe you could step through that and see why no prefix mappings are
>>> being populated.
>>>
>>>
>>> Francis Upton wrote:
>>>
>>>> Good morning Ed,
>>>>
>>>> I have resolved the first of the two exceptions. It was caused by
>>>> inconsistent xerces jar files from two different versions. Sorry
>>>> about troubling you for that, and my punishment is that my
>>>> sloppyness will be enshrined here for public view by future
>>>> generations.
>>>>
>>>> However, the 2nd NPE still remains (I copied the stack trace below
>>>> this message). In this case, it is trying to get the "schema for
>>>> schema", but in the schema being parsed, the
>>>> qNamePrefixToNamespaceMap is empty, but the
>>>> schemaForSchemaQnamePrefix contains "xsd" which is what I would
>>>> expect.
>>>>
>>>> java.lang.NullPointerException
>>>> at
>>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleNewB aseTypeDefinition(XSDComplexTypeDefinitionImpl.java:2046)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2329)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDModelGroupImpl.adoptContent(XSDModel GroupImpl.java:693)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
>>>>
>>>> at
>>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDModelGroupImpl.handleReconciliation( XSDModelGroupImpl.java:657)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.adoptConte nt(XSDComplexTypeDefinitionImpl.java:2600)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.setContent (XSDComplexTypeDefinitionImpl.java:758)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2240)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.adoptContent(XSDSchemaImp l.java:1763)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
>>>>
>>>> at
>>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.handleReconciliation(XSDS chemaImpl.java:1985)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.changeAttribut e(XSDConcreteComponentImpl.java:1246)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2318)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1219)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElementGen( XSDConcreteComponentImpl.java:2817)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElement(XSD ConcreteComponentImpl.java:2849)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.setElement(XSDSchemaImpl. java:2441)
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:422)
>>>>
>>>> at
>>>> org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:536)
>>>>
>>>> at
>>>> org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:502)
>>>>
>>>> at
>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:431)
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
>>>>
>>>> at
>>>> com.oaklandsw.transform.rep.xml.XsdImportProcessor.importFro mFile(XsdImportProcessor.java:178)
>>>>
>>>> at
>>>> com.oaklandsw.transform.rep.xml.XsdImporter.doImportSubclass (XsdImporter.java:42)
>>>>
>>>> at
>>>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:338)
>>>> at
>>>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:322)
>>>> at
>>>> com.oaklandsw.transform.TransformTestBase.importXsdDefinitio n(TransformTestBase.java:1711)
>>>>
>>>> at
>>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1926)
>>>>
>>>> at
>>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1905)
>>>>
>>>> at
>>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1891)
>>>>
>>>> at
>>>> com.oaklandsw.transform.XsdSimpleImportTest.testBasic(XsdSim pleImportTest.java:43)
>>>>
>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>> at
>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>>
>>>> at
>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>>
>>>> at java.lang.reflect.Method.invoke(Method.java:324)
>>>> at junit.framework.TestCase.runTest(TestCase.java:154)
>>>> at junit.framework.TestCase.runBare(TestCase.java:127)
>>>> at junit.framework.TestResult$1.protect(TestResult.java:106)
>>>> at
>>>> junit.framework.TestResult.runProtected(TestResult.java:124)
>>>> at junit.framework.TestResult.run(TestResult.java:109)
>>>> at junit.framework.TestCase.run(TestCase.java:118)
>>>> at
>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:478)
>>>>
>>>> at
>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:344)
>>>>
>>>> at
>>>> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:57)
>>>>
>>>> at
>>>> org.eclipse.pde.internal.junit.runtime.UITestApplication$1.r un(UITestApplication.java:99)
>>>>
>>>> at
>>>> org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
>>>> at
>>>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
>>>>
>>>> at
>>>> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2844)
>>>> at
>>>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2575)
>>>> at
>>>> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1699)
>>>> at
>>>> org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
>>>> at
>>>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:367)
>>>>
>>>> at
>>>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
>>>> at
>>>> com.oaklandsw.transform.editor.Editor.runEditor(Editor.java: 2111)
>>>> at
>>>> com.oaklandsw.transform.editor.Standalone.run(Standalone.jav a:72)
>>>> at
>>>> org.eclipse.pde.internal.junit.runtime.UITestApplication.run (UITestApplication.java:39)
>>>>
>>>> at
>>>> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
>>>>
>>>> at
>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
>>>>
>>>> at
>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
>>>>
>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>> at
>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>>
>>>> at
>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>>
>>>> at java.lang.reflect.Method.invoke(Method.java:324)
>>>> at
>>>> org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
>>>> at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
>>>> at org.eclipse.core.launcher.Main.run(Main.java:973)
>>>> at org.eclipse.core.launcher.Main.main(Main.java:948)
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Here is the XSD file (which has worked fine in the past):
>>>>
>>>> <?xml version="1.0" encoding="UTF-8" ?>
>>>> <!--
>>>> simple xsd document
>>>> -->
>>>> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>>>> targetNamespace="http://www.publishing.org"
>>>> xmlns="http://www.publishing.org"
>>>> elementFormDefault="qualified">
>>>> <xsd:element name="BookCatalogue">
>>>> <xsd:complexType>
>>>> <xsd:sequence>
>>>> <xsd:element name="Book"
>>>> minOccurs="1" maxOccurs="unbounded">
>>>> <xsd:complexType>
>>>> <xsd:sequence>
>>>>
>>>> <xsd:element name="Title" type="xsd:string" minOccurs="1"
>>>> maxOccurs="1"/>
>>>>
>>>> <xsd:element name="Author" type="xsd:string" minOccurs="1"
>>>> maxOccurs="2"/>
>>>>
>>>> <xsd:element name="Date" type="xsd:string" minOccurs="1"
>>>> maxOccurs="1"/>
>>>> <!-- ISBN
>>>> element is optional for the sake of testing -->
>>>>
>>>> <xsd:element name="ISBN" type="xsd:string" minOccurs="0"
>>>> maxOccurs="1"/>
>>>>
>>>> <xsd:element name="Publisher" type="xsd:string" minOccurs="1"
>>>> maxOccurs="1"/>
>>>> </xsd:sequence>
>>>> </xsd:complexType>
>>>> </xsd:element>
>>>> </xsd:sequence>
>>>> </xsd:complexType>
>>>> </xsd:element>
>>>> </xsd:schema>
>>>>
>>>
|
|
|
Re: errors using XSD as plugin, UnknownHostException and NPE [message #596657 is a reply to message #63953] |
Tue, 27 September 2005 18:08 |
Ed Merks Messages: 33264 Registered: July 2009 |
Senior Member |
|
|
Francis,
You aren't putting these jars on the classpath explicitly are you?
I would also expect bundleentry to have a registered protocol handler so
that creating a URL for it would not fail in the way you showed...
Francis Upton wrote:
> I have previously used the wonderful XSD support standalone, using
> xsd.[resource].jar, common.[resource].jar and core.[resource].jar with
> version 2.0.1.
>
> I have since migrated to SWT and RCP (on version 3.1) and am now using
> it as a plug in. I have removed the above jar files and and replaced
> them with these jar files (which of course include quite a bit more
> than XSD):
>
> org.eclipse.core.resources_3.1.0.jar org.eclipse.osgi_3.1.0.jar
> org.eclipse.core.resources.linux_3.1.0.jar
> org.eclipse.swt.gtk.linux.x86_3.1.0.jar
> org.eclipse.core.runtime_3.1.0.jar org.eclipse.ui_3.1.0.jar
> org.eclipse.emf.common_2.1.0.jar org.eclipse.ui.ide_3.1.0.jar
> org.eclipse.emf.ecore_2.1.0.jar
> org.eclipse.ui.views_3.1.0.jar
> org.eclipse.jface_3.1.0.jar org.eclipse.ui.workbench_3.1.0.jar
> org.eclipse.jface.text_3.1.0.jar org.eclipse.xsd_2.1.0.jar
>
>
> I have also added the the following dependent plugins:
>
> Require-Bundle: org.eclipse.jface,
> org.eclipse.jface.text,
> org.eclipse.osgi,
> org.eclipse.swt,
> org.eclipse.ui,
> org.eclipse.core.runtime,
> org.eclipse.osgi.util,
> org.eclipse.osgi.services,
> org.eclipse.ui.views,
> org.eclipse.ui.ide,
> org.eclipse.ui.editors,
> org.eclipse.ui.workbench.texteditor,
> org.junit,
> org.eclipse.emf.common,
> org.eclipse.emf.ecore,
> org.eclipse.xsd,
> org.eclipse.emf.importer,
> org.eclipse.emf.importer.ecore,
> org.eclipse.xsd.ecore.importer
>
> With all this, running the same tests that used to work fine, I'm
> getting the following errors when I try to import an .xsd file.
>
> Any ideas?
>
> Thanks,
>
> Francis
>
>
> !SESSION 2005-09-27 10:50:03.485
> -----------------------------------------------
> eclipse.buildId=unknown
> java.version=1.4.2_05
> java.vendor=Sun Microsystems Inc.
> BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
> Framework arguments: -version 3 -application
> org.eclipse.pde.junit.runtime.uitestapplication -product
> com.oaklandsw.transform.product -pdelaunch -port 34067 -testpluginname
> com.oaklandsw.transform -test
> com.oaklandsw.transform.XsdSimpleImportTest:testBasic
> Command-line arguments: -version 3 -application
> org.eclipse.pde.junit.runtime.uitestapplication -product
> com.oaklandsw.transform.product -data
> /home/francis/junit-workbench-workspace -dev
> file:/home/francis/d/.metadata/.plugins/org.eclipse.pde.core /XsdSimpleImportTest.testBasic/dev.properties
> -pdelaunch -os linux -ws gtk -arch x86 -port 34067 -testpluginname
> com.oaklandsw.transform -test
> com.oaklandsw.transform.XsdSimpleImportTest:testBasic
>
> !ENTRY org.eclipse.ui 4 4 2005-09-27 10:50:11.33
> !MESSAGE Invalid Menu Extension (Path is invalid):
> org.eclipse.ui.edit.text.gotoLastEditPosition
>
> !ENTRY org.eclipse.xsd 2 0 2005-09-27 10:50:14.290
> !MESSAGE bundleentry
> !STACK 0
> java.net.UnknownHostException: bundleentry
> at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:153)
> at java.net.Socket.connect(Socket.java:452)
> at java.net.Socket.connect(Socket.java:402)
> at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
> at sun.net.NetworkClient.openServer(NetworkClient.java:118)
> at sun.net.ftp.FtpClient.openServer(FtpClient.java:423)
> at sun.net.ftp.FtpClient.<init>(FtpClient.java:692)
> at
> sun.net.www.protocol.ftp.FtpURLConnection.connect(FtpURLConn ection.java:175)
>
> at
> sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(Ftp URLConnection.java:257)
>
> at java.net.URL.openStream(URL.java:913)
> at
> org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(U nknown
> Source)
> at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown
> Source)
> at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown
> Source)
> at org.apache.xerces.impl.XMLDTDScannerImpl.startPE(Unknown
> Source)
> at
> org.apache.xerces.impl.XMLDTDScannerImpl.skipSeparator(Unkno wn Source)
> at org.apache.xerces.impl.XMLDTDScannerImpl.scanDecls(Unknown
> Source)
> at
> org.apache.xerces.impl.XMLDTDScannerImpl.scanDTDExternalSubs et(Unknown
> Source)
> at
> org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher. dispatch(Unknown
> Source)
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDo cument(Unknown
> Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
> Source)
> at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
> Source)
> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
> at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown
> Source)
> at
> org.eclipse.xsd.util.XSDResourceImpl.getDocument(XSDResource Impl.java:238)
>
> at
> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:412)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>
> at
> org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:398)
>
> at
> org.eclipse.xsd.impl.XSDImportImpl.importSchema(XSDImportImp l.java:476)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.resolveSchema(XSDSchemaIm pl.java:2120)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.resolveNamedComponent(XSD SchemaImpl.java:2143)
>
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.resolveAttributeDeclarati on(XSDSchemaImpl.java:2168)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.resolveAttribu teDeclaration(XSDConcreteComponentImpl.java:2469)
>
> at
> org.eclipse.xsd.impl.XSDAttributeDeclarationImpl.patch(XSDAt tributeDeclarationImpl.java:203)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
>
> at
> org.eclipse.xsd.impl.XSDAttributeUseImpl.patch(XSDAttributeU seImpl.java:738)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
>
> at
> org.eclipse.xsd.impl.XSDNamedComponentImpl.patch(XSDNamedCom ponentImpl.java:727)
>
> at
> org.eclipse.xsd.impl.XSDTypeDefinitionImpl.patch(XSDTypeDefi nitionImpl.java:249)
>
> at
> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.patch(XSDC omplexTypeDefinitionImpl.java:994)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
>
> at
> org.eclipse.xsd.impl.XSDNamedComponentImpl.patch(XSDNamedCom ponentImpl.java:727)
>
> at
> org.eclipse.xsd.impl.XSDElementDeclarationImpl.patch(XSDElem entDeclarationImpl.java:546)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
>
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1493)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2314)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1219)
>
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:825)
>
> at
> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:489)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
>
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaForSchema(XSDSch emaImpl.java:609)
>
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:420)
> at
> org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:536)
>
> at
> org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:502)
>
> at
> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:431)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
>
> at
> com.oaklandsw.transform.rep.xml.XsdImportProcessor.importFro mFile(XsdImportProcessor.java:178)
>
> at
> com.oaklandsw.transform.rep.xml.XsdImporter.doImportSubclass (XsdImporter.java:42)
>
> at
> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:338)
> at
> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:322)
> at
> com.oaklandsw.transform.TransformTestBase.importXsdDefinitio n(TransformTestBase.java:1711)
>
> at
> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1926)
>
> at
> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1905)
>
> at
> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1891)
>
> at
> com.oaklandsw.transform.XsdSimpleImportTest.testBasic(XsdSim pleImportTest.java:43)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:324)
> at junit.framework.TestCase.runTest(TestCase.java:154)
> at junit.framework.TestCase.runBare(TestCase.java:127)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:118)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:478)
>
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:344)
>
> at
> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:57)
>
> at
> org.eclipse.pde.internal.junit.runtime.UITestApplication$1.r un(UITestApplication.java:99)
>
> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
> at
> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
>
> at
> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2844)
> at
> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2575)
> at
> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1699)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:367)
>
> at
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
> at
> com.oaklandsw.transform.editor.Editor.runEditor(Editor.java: 2111)
> at
> com.oaklandsw.transform.editor.Standalone.run(Standalone.jav a:72)
> at
> org.eclipse.pde.internal.junit.runtime.UITestApplication.run (UITestApplication.java:39)
>
> at
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:324)
> at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
> at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
> at org.eclipse.core.launcher.Main.run(Main.java:973)
> at org.eclipse.core.launcher.Main.main(Main.java:948)
>
> !ENTRY org.eclipse.xsd 2 0 2005-09-27 10:50:14.505
> !MESSAGE
> !STACK 0
> java.lang.NullPointerException
> at
> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleNewB aseTypeDefinition(XSDComplexTypeDefinitionImpl.java:2046)
>
> at
> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2329)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>
> at
> org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>
> at
> org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
>
> at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>
> at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>
> at
> org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
>
> at
> org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>
> at
> org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
>
> at
> org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>
> at
> org.eclipse.xsd.impl.XSDModelGroupImpl.adoptContent(XSDModel GroupImpl.java:693)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
>
> at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>
> at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>
> at
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
>
> at
> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
>
> at
> org.eclipse.xsd.impl.XSDModelGroupImpl.handleReconciliation( XSDModelGroupImpl.java:657)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
>
> at
> org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>
> at
> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.adoptConte nt(XSDComplexTypeDefinitionImpl.java:2600)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>
> at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>
> at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>
> at
> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.setContent (XSDComplexTypeDefinitionImpl.java:758)
>
> at
> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2240)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>
> at
> org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>
> at
> org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
>
> at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>
> at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>
> at
> org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
>
> at
> org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>
> at
> org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.adoptContent(XSDSchemaImp l.java:1763)
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
>
> at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>
> at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>
> at
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
>
> at
> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
>
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.handleReconciliation(XSDS chemaImpl.java:1985)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.changeAttribut e(XSDConcreteComponentImpl.java:1246)
>
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2318)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1219)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElementGen( XSDConcreteComponentImpl.java:2817)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElement(XSD ConcreteComponentImpl.java:2849)
>
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.setElement(XSDSchemaImpl. java:2441)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:422)
> at
> org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:536)
>
> at
> org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:502)
>
> at
> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:431)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
>
> at
> com.oaklandsw.transform.rep.xml.XsdImportProcessor.importFro mFile(XsdImportProcessor.java:178)
>
> at
> com.oaklandsw.transform.rep.xml.XsdImporter.doImportSubclass (XsdImporter.java:42)
>
> at
> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:338)
> at
> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:322)
> at
> com.oaklandsw.transform.TransformTestBase.importXsdDefinitio n(TransformTestBase.java:1711)
>
> at
> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1926)
>
> at
> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1905)
>
> at
> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1891)
>
> at
> com.oaklandsw.transform.XsdSimpleImportTest.testBasic(XsdSim pleImportTest.java:43)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:324)
> at junit.framework.TestCase.runTest(TestCase.java:154)
> at junit.framework.TestCase.runBare(TestCase.java:127)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:118)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:478)
>
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:344)
>
> at
> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:57)
>
> at
> org.eclipse.pde.internal.junit.runtime.UITestApplication$1.r un(UITestApplication.java:99)
>
> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
> at
> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
>
> at
> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2844)
> at
> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2575)
> at
> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1699)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:367)
>
> at
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
> at
> com.oaklandsw.transform.editor.Editor.runEditor(Editor.java: 2111)
> at
> com.oaklandsw.transform.editor.Standalone.run(Standalone.jav a:72)
> at
> org.eclipse.pde.internal.junit.runtime.UITestApplication.run (UITestApplication.java:39)
>
> at
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:324)
> at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
> at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
> at org.eclipse.core.launcher.Main.run(Main.java:973)
> at org.eclipse.core.launcher.Main.main(Main.java:948)
> main ~/junit-workbench-workspace/.metadata>
>
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: errors using XSD as plugin, UnknownHostException and NPE [message #596671 is a reply to message #63982] |
Tue, 27 September 2005 21:32 |
Francis Upton IV Messages: 472 Registered: July 2009 Location: Oakland, CA |
Senior Member |
|
|
Ed Merks wrote:
> Francis,
>
> You aren't putting these jars on the classpath explicitly are you?
> I would also expect bundleentry to have a registered protocol handler so
> that creating a URL for it would not fail in the way you showed...
I have added the jars to the java build path/libraries tab, as I have
always done. Is this not the way to do it?
Regarding the bundleentry thing, here are some of the variable values
from the XSDSchemaImpl.resolveSchema() stack frame:
this:
org.eclipse.xsd.impl.XSDSchemaImpl@1533b2c (element: [xs:schema: null])
(document: [#document: null], schemaLocation:
bundleentry://141/cache/www.w3.org/2001/XMLSchema.xsd, targetNamespace:
http://www.w3.org/2001/XMLSchema, attributeFormDefault: <unset>,
elementFormDefault: qualified, finalDefault: [], blockDefault: [all],
version: 1.0)
xsdImport:
org.eclipse.xsd.impl.XSDImportImpl@4e76b4 (element: [xs:import: null])
(schemaLocation: http://www.w3.org/2001/xml.xsd) (namespace:
http://www.w3.org/XML/1998/namespace)
namespace:
http://www.w3.org/XML/1998/namespace
So it looks like it's trying to resolve something from one of the built
in schemas.
It seems that I have some of my plumbing messed up here, but I'm not
sure how I should fix it.
>
>
> Francis Upton wrote:
>
>> I have previously used the wonderful XSD support standalone, using
>> xsd.[resource].jar, common.[resource].jar and core.[resource].jar with
>> version 2.0.1.
>>
>> I have since migrated to SWT and RCP (on version 3.1) and am now using
>> it as a plug in. I have removed the above jar files and and replaced
>> them with these jar files (which of course include quite a bit more
>> than XSD):
>>
>> org.eclipse.core.resources_3.1.0.jar org.eclipse.osgi_3.1.0.jar
>> org.eclipse.core.resources.linux_3.1.0.jar
>> org.eclipse.swt.gtk.linux.x86_3.1.0.jar
>> org.eclipse.core.runtime_3.1.0.jar org.eclipse.ui_3.1.0.jar
>> org.eclipse.emf.common_2.1.0.jar org.eclipse.ui.ide_3.1.0.jar
>> org.eclipse.emf.ecore_2.1.0.jar
>> org.eclipse.ui.views_3.1.0.jar
>> org.eclipse.jface_3.1.0.jar org.eclipse.ui.workbench_3.1.0.jar
>> org.eclipse.jface.text_3.1.0.jar org.eclipse.xsd_2.1.0.jar
>>
>>
>> I have also added the the following dependent plugins:
>>
>> Require-Bundle: org.eclipse.jface,
>> org.eclipse.jface.text,
>> org.eclipse.osgi,
>> org.eclipse.swt,
>> org.eclipse.ui,
>> org.eclipse.core.runtime,
>> org.eclipse.osgi.util,
>> org.eclipse.osgi.services,
>> org.eclipse.ui.views,
>> org.eclipse.ui.ide,
>> org.eclipse.ui.editors,
>> org.eclipse.ui.workbench.texteditor,
>> org.junit,
>> org.eclipse.emf.common,
>> org.eclipse.emf.ecore,
>> org.eclipse.xsd,
>> org.eclipse.emf.importer,
>> org.eclipse.emf.importer.ecore,
>> org.eclipse.xsd.ecore.importer
>>
>> With all this, running the same tests that used to work fine, I'm
>> getting the following errors when I try to import an .xsd file.
>>
>> Any ideas?
>>
>> Thanks,
>>
>> Francis
>>
>>
>> !SESSION 2005-09-27 10:50:03.485
>> -----------------------------------------------
>> eclipse.buildId=unknown
>> java.version=1.4.2_05
>> java.vendor=Sun Microsystems Inc.
>> BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
>> Framework arguments: -version 3 -application
>> org.eclipse.pde.junit.runtime.uitestapplication -product
>> com.oaklandsw.transform.product -pdelaunch -port 34067 -testpluginname
>> com.oaklandsw.transform -test
>> com.oaklandsw.transform.XsdSimpleImportTest:testBasic
>> Command-line arguments: -version 3 -application
>> org.eclipse.pde.junit.runtime.uitestapplication -product
>> com.oaklandsw.transform.product -data
>> /home/francis/junit-workbench-workspace -dev
>> file:/home/francis/d/.metadata/.plugins/org.eclipse.pde.core /XsdSimpleImportTest.testBasic/dev.properties
>> -pdelaunch -os linux -ws gtk -arch x86 -port 34067 -testpluginname
>> com.oaklandsw.transform -test
>> com.oaklandsw.transform.XsdSimpleImportTest:testBasic
>>
>> !ENTRY org.eclipse.ui 4 4 2005-09-27 10:50:11.33
>> !MESSAGE Invalid Menu Extension (Path is invalid):
>> org.eclipse.ui.edit.text.gotoLastEditPosition
>>
>> !ENTRY org.eclipse.xsd 2 0 2005-09-27 10:50:14.290
>> !MESSAGE bundleentry
>> !STACK 0
>> java.net.UnknownHostException: bundleentry
>> at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:153)
>> at java.net.Socket.connect(Socket.java:452)
>> at java.net.Socket.connect(Socket.java:402)
>> at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
>> at sun.net.NetworkClient.openServer(NetworkClient.java:118)
>> at sun.net.ftp.FtpClient.openServer(FtpClient.java:423)
>> at sun.net.ftp.FtpClient.<init>(FtpClient.java:692)
>> at
>> sun.net.www.protocol.ftp.FtpURLConnection.connect(FtpURLConn ection.java:175)
>>
>> at
>> sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(Ftp URLConnection.java:257)
>>
>> at java.net.URL.openStream(URL.java:913)
>> at
>> org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(U nknown
>> Source)
>> at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown
>> Source)
>> at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown
>> Source)
>> at org.apache.xerces.impl.XMLDTDScannerImpl.startPE(Unknown
>> Source)
>> at
>> org.apache.xerces.impl.XMLDTDScannerImpl.skipSeparator(Unkno wn Source)
>> at org.apache.xerces.impl.XMLDTDScannerImpl.scanDecls(Unknown
>> Source)
>> at
>> org.apache.xerces.impl.XMLDTDScannerImpl.scanDTDExternalSubs et(Unknown
>> Source)
>> at
>> org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher. dispatch(Unknown
>> Source)
>> at
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDo cument(Unknown
>> Source)
>> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>> Source)
>> at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
>> Source)
>> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>> at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
>> at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown
>> Source)
>> at
>> org.eclipse.xsd.util.XSDResourceImpl.getDocument(XSDResource Impl.java:238)
>>
>> at
>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:412)
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>>
>> at
>> org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:398)
>>
>> at
>> org.eclipse.xsd.impl.XSDImportImpl.importSchema(XSDImportImp l.java:476)
>> at
>> org.eclipse.xsd.impl.XSDSchemaImpl.resolveSchema(XSDSchemaIm pl.java:2120)
>> at
>> org.eclipse.xsd.impl.XSDSchemaImpl.resolveNamedComponent(XSD SchemaImpl.java:2143)
>>
>> at
>> org.eclipse.xsd.impl.XSDSchemaImpl.resolveAttributeDeclarati on(XSDSchemaImpl.java:2168)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.resolveAttribu teDeclaration(XSDConcreteComponentImpl.java:2469)
>>
>> at
>> org.eclipse.xsd.impl.XSDAttributeDeclarationImpl.patch(XSDAt tributeDeclarationImpl.java:203)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
>>
>> at
>> org.eclipse.xsd.impl.XSDAttributeUseImpl.patch(XSDAttributeU seImpl.java:738)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
>>
>> at
>> org.eclipse.xsd.impl.XSDNamedComponentImpl.patch(XSDNamedCom ponentImpl.java:727)
>>
>> at
>> org.eclipse.xsd.impl.XSDTypeDefinitionImpl.patch(XSDTypeDefi nitionImpl.java:249)
>>
>> at
>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.patch(XSDC omplexTypeDefinitionImpl.java:994)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
>>
>> at
>> org.eclipse.xsd.impl.XSDNamedComponentImpl.patch(XSDNamedCom ponentImpl.java:727)
>>
>> at
>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.patch(XSDElem entDeclarationImpl.java:546)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
>>
>> at
>> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1493)
>> at
>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2314)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1219)
>>
>> at
>> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:825)
>>
>> at
>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:489)
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
>>
>> at
>> org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaForSchema(XSDSch emaImpl.java:609)
>>
>> at
>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:420)
>> at
>> org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:536)
>>
>> at
>> org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:502)
>>
>> at
>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:431)
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
>>
>> at
>> com.oaklandsw.transform.rep.xml.XsdImportProcessor.importFro mFile(XsdImportProcessor.java:178)
>>
>> at
>> com.oaklandsw.transform.rep.xml.XsdImporter.doImportSubclass (XsdImporter.java:42)
>>
>> at
>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:338)
>> at
>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:322)
>> at
>> com.oaklandsw.transform.TransformTestBase.importXsdDefinitio n(TransformTestBase.java:1711)
>>
>> at
>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1926)
>>
>> at
>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1905)
>>
>> at
>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1891)
>>
>> at
>> com.oaklandsw.transform.XsdSimpleImportTest.testBasic(XsdSim pleImportTest.java:43)
>>
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>
>> at java.lang.reflect.Method.invoke(Method.java:324)
>> at junit.framework.TestCase.runTest(TestCase.java:154)
>> at junit.framework.TestCase.runBare(TestCase.java:127)
>> at junit.framework.TestResult$1.protect(TestResult.java:106)
>> at junit.framework.TestResult.runProtected(TestResult.java:124)
>> at junit.framework.TestResult.run(TestResult.java:109)
>> at junit.framework.TestCase.run(TestCase.java:118)
>> at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:478)
>>
>> at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:344)
>>
>> at
>> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:57)
>>
>> at
>> org.eclipse.pde.internal.junit.runtime.UITestApplication$1.r un(UITestApplication.java:99)
>>
>> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
>> at
>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
>>
>> at
>> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2844)
>> at
>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2575)
>> at
>> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1699)
>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
>> at
>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:367)
>>
>> at
>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
>> at
>> com.oaklandsw.transform.editor.Editor.runEditor(Editor.java: 2111)
>> at
>> com.oaklandsw.transform.editor.Standalone.run(Standalone.jav a:72)
>> at
>> org.eclipse.pde.internal.junit.runtime.UITestApplication.run (UITestApplication.java:39)
>>
>> at
>> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
>>
>> at
>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
>>
>> at
>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
>>
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>
>> at java.lang.reflect.Method.invoke(Method.java:324)
>> at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
>> at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
>> at org.eclipse.core.launcher.Main.run(Main.java:973)
>> at org.eclipse.core.launcher.Main.main(Main.java:948)
>>
>> !ENTRY org.eclipse.xsd 2 0 2005-09-27 10:50:14.505
>> !MESSAGE
>> !STACK 0
>> java.lang.NullPointerException
>> at
>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleNewB aseTypeDefinition(XSDComplexTypeDefinitionImpl.java:2046)
>>
>> at
>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2329)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>
>> at
>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>
>> at
>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>
>> at
>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
>>
>> at
>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>
>> at
>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
>>
>> at
>> org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>
>> at
>> org.eclipse.xsd.impl.XSDModelGroupImpl.adoptContent(XSDModel GroupImpl.java:693)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
>>
>> at
>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
>>
>> at
>> org.eclipse.xsd.impl.XSDModelGroupImpl.handleReconciliation( XSDModelGroupImpl.java:657)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
>>
>> at
>> org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>
>> at
>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.adoptConte nt(XSDComplexTypeDefinitionImpl.java:2600)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>
>> at
>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.setContent (XSDComplexTypeDefinitionImpl.java:758)
>>
>> at
>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2240)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>
>> at
>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>
>> at
>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>
>> at
>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
>>
>> at
>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>
>> at
>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>
>> at
>> org.eclipse.xsd.impl.XSDSchemaImpl.adoptContent(XSDSchemaImp l.java:1763)
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
>>
>> at
>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
>>
>> at
>> org.eclipse.xsd.impl.XSDSchemaImpl.handleReconciliation(XSDS chemaImpl.java:1985)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.changeAttribut e(XSDConcreteComponentImpl.java:1246)
>>
>> at
>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2318)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1219)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElementGen( XSDConcreteComponentImpl.java:2817)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElement(XSD ConcreteComponentImpl.java:2849)
>>
>> at
>> org.eclipse.xsd.impl.XSDSchemaImpl.setElement(XSDSchemaImpl. java:2441)
>> at
>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:422)
>> at
>> org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:536)
>>
>> at
>> org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:502)
>>
>> at
>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:431)
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
>>
>> at
>> com.oaklandsw.transform.rep.xml.XsdImportProcessor.importFro mFile(XsdImportProcessor.java:178)
>>
>> at
>> com.oaklandsw.transform.rep.xml.XsdImporter.doImportSubclass (XsdImporter.java:42)
>>
>> at
>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:338)
>> at
>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:322)
>> at
>> com.oaklandsw.transform.TransformTestBase.importXsdDefinitio n(TransformTestBase.java:1711)
>>
>> at
>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1926)
>>
>> at
>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1905)
>>
>> at
>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1891)
>>
>> at
>> com.oaklandsw.transform.XsdSimpleImportTest.testBasic(XsdSim pleImportTest.java:43)
>>
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>
>> at java.lang.reflect.Method.invoke(Method.java:324)
>> at junit.framework.TestCase.runTest(TestCase.java:154)
>> at junit.framework.TestCase.runBare(TestCase.java:127)
>> at junit.framework.TestResult$1.protect(TestResult.java:106)
>> at junit.framework.TestResult.runProtected(TestResult.java:124)
>> at junit.framework.TestResult.run(TestResult.java:109)
>> at junit.framework.TestCase.run(TestCase.java:118)
>> at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:478)
>>
>> at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:344)
>>
>> at
>> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:57)
>>
>> at
>> org.eclipse.pde.internal.junit.runtime.UITestApplication$1.r un(UITestApplication.java:99)
>>
>> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
>> at
>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
>>
>> at
>> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2844)
>> at
>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2575)
>> at
>> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1699)
>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
>> at
>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:367)
>>
>> at
>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
>> at
>> com.oaklandsw.transform.editor.Editor.runEditor(Editor.java: 2111)
>> at
>> com.oaklandsw.transform.editor.Standalone.run(Standalone.jav a:72)
>> at
>> org.eclipse.pde.internal.junit.runtime.UITestApplication.run (UITestApplication.java:39)
>>
>> at
>> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
>>
>> at
>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
>>
>> at
>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
>>
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>
>> at java.lang.reflect.Method.invoke(Method.java:324)
>> at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
>> at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
>> at org.eclipse.core.launcher.Main.run(Main.java:973)
>> at org.eclipse.core.launcher.Main.main(Main.java:948)
>> main ~/junit-workbench-workspace/.metadata>
>>
>>
Platform UI Committer for Common Navigator
http://wiki.eclipse.org/index.php/Common_Navigator_Framework
http://help.eclipse.org/galileo/topic/org.eclipse.platform.d oc.isv/guide/cnf.htm
|
|
|
Re: errors using XSD as plugin, UnknownHostException and NPE [message #596690 is a reply to message #64007] |
Tue, 27 September 2005 23:24 |
Ed Merks Messages: 33264 Registered: July 2009 |
Senior Member |
|
|
Francis,
No! When running an Eclipse headless invocation you don't put anything
on the classpath except the startup.jar. If you put plugin jars on the
classpath, you'll by pass the normal plugin initialization that is
supposed to happen. In this case you are loading the cached "meta"
schemas from the org.eclipse.xsd plugin, which should normally work
fine, but I'm quite sure the classpath thing is going to mess it up...
Francis Upton wrote:
> Ed Merks wrote:
>
>> Francis,
>>
>> You aren't putting these jars on the classpath explicitly are you?
>> I would also expect bundleentry to have a registered protocol handler
>> so that creating a URL for it would not fail in the way you showed...
>
>
> I have added the jars to the java build path/libraries tab, as I have
> always done. Is this not the way to do it?
>
> Regarding the bundleentry thing, here are some of the variable values
> from the XSDSchemaImpl.resolveSchema() stack frame:
>
> this:
> org.eclipse.xsd.impl.XSDSchemaImpl@1533b2c (element: [xs:schema:
> null]) (document: [#document: null], schemaLocation:
> bundleentry://141/cache/www.w3.org/2001/XMLSchema.xsd,
> targetNamespace: http://www.w3.org/2001/XMLSchema,
> attributeFormDefault: <unset>, elementFormDefault: qualified,
> finalDefault: [], blockDefault: [all], version: 1.0)
>
> xsdImport:
> org.eclipse.xsd.impl.XSDImportImpl@4e76b4 (element: [xs:import: null])
> (schemaLocation: http://www.w3.org/2001/xml.xsd) (namespace:
> http://www.w3.org/XML/1998/namespace)
>
> namespace:
> http://www.w3.org/XML/1998/namespace
>
> So it looks like it's trying to resolve something from one of the
> built in schemas.
>
> It seems that I have some of my plumbing messed up here, but I'm not
> sure how I should fix it.
>
>
>>
>>
>> Francis Upton wrote:
>>
>>> I have previously used the wonderful XSD support standalone, using
>>> xsd.[resource].jar, common.[resource].jar and core.[resource].jar
>>> with version 2.0.1.
>>>
>>> I have since migrated to SWT and RCP (on version 3.1) and am now
>>> using it as a plug in. I have removed the above jar files and and
>>> replaced them with these jar files (which of course include quite a
>>> bit more than XSD):
>>>
>>> org.eclipse.core.resources_3.1.0.jar org.eclipse.osgi_3.1.0.jar
>>> org.eclipse.core.resources.linux_3.1.0.jar
>>> org.eclipse.swt.gtk.linux.x86_3.1.0.jar
>>> org.eclipse.core.runtime_3.1.0.jar org.eclipse.ui_3.1.0.jar
>>> org.eclipse.emf.common_2.1.0.jar
>>> org.eclipse.ui.ide_3.1.0.jar
>>> org.eclipse.emf.ecore_2.1.0.jar
>>> org.eclipse.ui.views_3.1.0.jar
>>> org.eclipse.jface_3.1.0.jar org.eclipse.ui.workbench_3.1.0.jar
>>> org.eclipse.jface.text_3.1.0.jar org.eclipse.xsd_2.1.0.jar
>>>
>>>
>>> I have also added the the following dependent plugins:
>>>
>>> Require-Bundle: org.eclipse.jface,
>>> org.eclipse.jface.text,
>>> org.eclipse.osgi,
>>> org.eclipse.swt,
>>> org.eclipse.ui,
>>> org.eclipse.core.runtime,
>>> org.eclipse.osgi.util,
>>> org.eclipse.osgi.services,
>>> org.eclipse.ui.views,
>>> org.eclipse.ui.ide,
>>> org.eclipse.ui.editors,
>>> org.eclipse.ui.workbench.texteditor,
>>> org.junit,
>>> org.eclipse.emf.common,
>>> org.eclipse.emf.ecore,
>>> org.eclipse.xsd,
>>> org.eclipse.emf.importer,
>>> org.eclipse.emf.importer.ecore,
>>> org.eclipse.xsd.ecore.importer
>>>
>>> With all this, running the same tests that used to work fine, I'm
>>> getting the following errors when I try to import an .xsd file.
>>>
>>> Any ideas?
>>>
>>> Thanks,
>>>
>>> Francis
>>>
>>>
>>> !SESSION 2005-09-27 10:50:03.485
>>> -----------------------------------------------
>>> eclipse.buildId=unknown
>>> java.version=1.4.2_05
>>> java.vendor=Sun Microsystems Inc.
>>> BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
>>> Framework arguments: -version 3 -application
>>> org.eclipse.pde.junit.runtime.uitestapplication -product
>>> com.oaklandsw.transform.product -pdelaunch -port 34067
>>> -testpluginname com.oaklandsw.transform -test
>>> com.oaklandsw.transform.XsdSimpleImportTest:testBasic
>>> Command-line arguments: -version 3 -application
>>> org.eclipse.pde.junit.runtime.uitestapplication -product
>>> com.oaklandsw.transform.product -data
>>> /home/francis/junit-workbench-workspace -dev
>>> file:/home/francis/d/.metadata/.plugins/org.eclipse.pde.core /XsdSimpleImportTest.testBasic/dev.properties
>>> -pdelaunch -os linux -ws gtk -arch x86 -port 34067 -testpluginname
>>> com.oaklandsw.transform -test
>>> com.oaklandsw.transform.XsdSimpleImportTest:testBasic
>>>
>>> !ENTRY org.eclipse.ui 4 4 2005-09-27 10:50:11.33
>>> !MESSAGE Invalid Menu Extension (Path is invalid):
>>> org.eclipse.ui.edit.text.gotoLastEditPosition
>>>
>>> !ENTRY org.eclipse.xsd 2 0 2005-09-27 10:50:14.290
>>> !MESSAGE bundleentry
>>> !STACK 0
>>> java.net.UnknownHostException: bundleentry
>>> at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:153)
>>> at java.net.Socket.connect(Socket.java:452)
>>> at java.net.Socket.connect(Socket.java:402)
>>> at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
>>> at sun.net.NetworkClient.openServer(NetworkClient.java:118)
>>> at sun.net.ftp.FtpClient.openServer(FtpClient.java:423)
>>> at sun.net.ftp.FtpClient.<init>(FtpClient.java:692)
>>> at
>>> sun.net.www.protocol.ftp.FtpURLConnection.connect(FtpURLConn ection.java:175)
>>>
>>> at
>>> sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(Ftp URLConnection.java:257)
>>>
>>> at java.net.URL.openStream(URL.java:913)
>>> at
>>> org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(U nknown
>>> Source)
>>> at
>>> org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
>>> at
>>> org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
>>> at org.apache.xerces.impl.XMLDTDScannerImpl.startPE(Unknown
>>> Source)
>>> at
>>> org.apache.xerces.impl.XMLDTDScannerImpl.skipSeparator(Unkno wn Source)
>>> at
>>> org.apache.xerces.impl.XMLDTDScannerImpl.scanDecls(Unknown Source)
>>> at
>>> org.apache.xerces.impl.XMLDTDScannerImpl.scanDTDExternalSubs et(Unknown
>>> Source)
>>> at
>>> org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher. dispatch(Unknown
>>> Source)
>>> at
>>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDo cument(Unknown
>>> Source)
>>> at
>>> org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>>> at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
>>> Source)
>>> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>>> at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
>>> at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown
>>> Source)
>>> at
>>> org.eclipse.xsd.util.XSDResourceImpl.getDocument(XSDResource Impl.java:238)
>>>
>>> at
>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:412)
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:398)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDImportImpl.importSchema(XSDImportImp l.java:476)
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.resolveSchema(XSDSchemaIm pl.java:2120)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.resolveNamedComponent(XSD SchemaImpl.java:2143)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.resolveAttributeDeclarati on(XSDSchemaImpl.java:2168)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.resolveAttribu teDeclaration(XSDConcreteComponentImpl.java:2469)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDAttributeDeclarationImpl.patch(XSDAt tributeDeclarationImpl.java:203)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDAttributeUseImpl.patch(XSDAttributeU seImpl.java:738)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDNamedComponentImpl.patch(XSDNamedCom ponentImpl.java:727)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDTypeDefinitionImpl.patch(XSDTypeDefi nitionImpl.java:249)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.patch(XSDC omplexTypeDefinitionImpl.java:994)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDNamedComponentImpl.patch(XSDNamedCom ponentImpl.java:727)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.patch(XSDElem entDeclarationImpl.java:546)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1493)
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2314)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1219)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:825)
>>>
>>> at
>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:489)
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaForSchema(XSDSch emaImpl.java:609)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:420)
>>> at
>>> org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:536)
>>>
>>> at
>>> org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:502)
>>>
>>> at
>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:431)
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
>>>
>>> at
>>> com.oaklandsw.transform.rep.xml.XsdImportProcessor.importFro mFile(XsdImportProcessor.java:178)
>>>
>>> at
>>> com.oaklandsw.transform.rep.xml.XsdImporter.doImportSubclass (XsdImporter.java:42)
>>>
>>> at
>>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:338)
>>> at
>>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:322)
>>> at
>>> com.oaklandsw.transform.TransformTestBase.importXsdDefinitio n(TransformTestBase.java:1711)
>>>
>>> at
>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1926)
>>>
>>> at
>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1905)
>>>
>>> at
>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1891)
>>>
>>> at
>>> com.oaklandsw.transform.XsdSimpleImportTest.testBasic(XsdSim pleImportTest.java:43)
>>>
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>
>>> at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>
>>> at java.lang.reflect.Method.invoke(Method.java:324)
>>> at junit.framework.TestCase.runTest(TestCase.java:154)
>>> at junit.framework.TestCase.runBare(TestCase.java:127)
>>> at junit.framework.TestResult$1.protect(TestResult.java:106)
>>> at junit.framework.TestResult.runProtected(TestResult.java:124)
>>> at junit.framework.TestResult.run(TestResult.java:109)
>>> at junit.framework.TestCase.run(TestCase.java:118)
>>> at
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:478)
>>>
>>> at
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:344)
>>>
>>> at
>>> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:57)
>>>
>>> at
>>> org.eclipse.pde.internal.junit.runtime.UITestApplication$1.r un(UITestApplication.java:99)
>>>
>>> at
>>> org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
>>> at
>>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
>>>
>>> at
>>> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2844)
>>> at
>>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2575)
>>> at
>>> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1699)
>>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
>>> at
>>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:367)
>>>
>>> at
>>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
>>> at
>>> com.oaklandsw.transform.editor.Editor.runEditor(Editor.java: 2111)
>>> at
>>> com.oaklandsw.transform.editor.Standalone.run(Standalone.jav a:72)
>>> at
>>> org.eclipse.pde.internal.junit.runtime.UITestApplication.run (UITestApplication.java:39)
>>>
>>> at
>>> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
>>>
>>> at
>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
>>>
>>> at
>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
>>>
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>
>>> at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>
>>> at java.lang.reflect.Method.invoke(Method.java:324)
>>> at
>>> org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
>>> at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
>>> at org.eclipse.core.launcher.Main.run(Main.java:973)
>>> at org.eclipse.core.launcher.Main.main(Main.java:948)
>>>
>>> !ENTRY org.eclipse.xsd 2 0 2005-09-27 10:50:14.505
>>> !MESSAGE
>>> !STACK 0
>>> java.lang.NullPointerException
>>> at
>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleNewB aseTypeDefinition(XSDComplexTypeDefinitionImpl.java:2046)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2329)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDModelGroupImpl.adoptContent(XSDModel GroupImpl.java:693)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
>>>
>>> at
>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDModelGroupImpl.handleReconciliation( XSDModelGroupImpl.java:657)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.adoptConte nt(XSDComplexTypeDefinitionImpl.java:2600)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.setContent (XSDComplexTypeDefinitionImpl.java:758)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2240)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.adoptContent(XSDSchemaImp l.java:1763)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
>>>
>>> at
>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.handleReconciliation(XSDS chemaImpl.java:1985)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.changeAttribut e(XSDConcreteComponentImpl.java:1246)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2318)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1219)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElementGen( XSDConcreteComponentImpl.java:2817)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElement(XSD ConcreteComponentImpl.java:2849)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.setElement(XSDSchemaImpl. java:2441)
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:422)
>>> at
>>> org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:536)
>>>
>>> at
>>> org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:502)
>>>
>>> at
>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:431)
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
>>>
>>> at
>>> com.oaklandsw.transform.rep.xml.XsdImportProcessor.importFro mFile(XsdImportProcessor.java:178)
>>>
>>> at
>>> com.oaklandsw.transform.rep.xml.XsdImporter.doImportSubclass (XsdImporter.java:42)
>>>
>>> at
>>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:338)
>>> at
>>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:322)
>>> at
>>> com.oaklandsw.transform.TransformTestBase.importXsdDefinitio n(TransformTestBase.java:1711)
>>>
>>> at
>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1926)
>>>
>>> at
>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1905)
>>>
>>> at
>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1891)
>>>
>>> at
>>> com.oaklandsw.transform.XsdSimpleImportTest.testBasic(XsdSim pleImportTest.java:43)
>>>
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>
>>> at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>
>>> at java.lang.reflect.Method.invoke(Method.java:324)
>>> at junit.framework.TestCase.runTest(TestCase.java:154)
>>> at junit.framework.TestCase.runBare(TestCase.java:127)
>>> at junit.framework.TestResult$1.protect(TestResult.java:106)
>>> at junit.framework.TestResult.runProtected(TestResult.java:124)
>>> at junit.framework.TestResult.run(TestResult.java:109)
>>> at junit.framework.TestCase.run(TestCase.java:118)
>>> at
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:478)
>>>
>>> at
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:344)
>>>
>>> at
>>> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:57)
>>>
>>> at
>>> org.eclipse.pde.internal.junit.runtime.UITestApplication$1.r un(UITestApplication.java:99)
>>>
>>> at
>>> org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
>>> at
>>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
>>>
>>> at
>>> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2844)
>>> at
>>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2575)
>>> at
>>> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1699)
>>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
>>> at
>>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:367)
>>>
>>> at
>>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
>>> at
>>> com.oaklandsw.transform.editor.Editor.runEditor(Editor.java: 2111)
>>> at
>>> com.oaklandsw.transform.editor.Standalone.run(Standalone.jav a:72)
>>> at
>>> org.eclipse.pde.internal.junit.runtime.UITestApplication.run (UITestApplication.java:39)
>>>
>>> at
>>> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
>>>
>>> at
>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
>>>
>>> at
>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
>>>
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>
>>> at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>
>>> at java.lang.reflect.Method.invoke(Method.java:324)
>>> at
>>> org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
>>> at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
>>> at org.eclipse.core.launcher.Main.run(Main.java:973)
>>> at org.eclipse.core.launcher.Main.main(Main.java:948)
>>> main ~/junit-workbench-workspace/.metadata>
>>>
>>>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: errors using XSD as plugin, UnknownHostException and NPE [message #596701 is a reply to message #64033] |
Wed, 28 September 2005 06:21 |
Francis Upton IV Messages: 472 Registered: July 2009 Location: Oakland, CA |
Senior Member |
|
|
Ed,
I'm still confused. First, I'm not executing headless; this is an RCP
application which is created from a plugin as a product. There is
nothing the class of the plugin - here is the manifest.mf:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Oakland Software Data Mapper
Bundle-SymbolicName: com.oaklandsw.transform; singleton:=true
Bundle-Version: 1.0.0
Bundle-Activator: com.oaklandsw.transform.editor.TransformPlugin
Bundle-Localization: plugin
Require-Bundle: org.eclipse.jface,
org.eclipse.jface.text,
org.eclipse.osgi,
org.eclipse.swt,
org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.osgi.util,
org.eclipse.osgi.services,
org.eclipse.ui.views,
org.eclipse.ui.ide,
org.eclipse.ui.editors,
org.eclipse.ui.workbench.texteditor,
org.junit,
org.eclipse.emf.common,
org.eclipse.emf.ecore,
org.eclipse.xsd,
org.eclipse.emf.importer,
org.eclipse.emf.importer.ecore,
org.eclipse.xsd.ecore.importer
Eclipse-AutoStart: true
I have the jars for all of the eclipse stuff (including SWT, jface,
runtime, emf, xsd) in my java build path (Project -> Properties -> Java
BuildPath -> Library) so that my code can compile, but I don't think
this puts things in the classpath when the plugin is being executed.
I still don't know what to do to fix the problem. Thanks for your
patience with me if I'm missing something obvious.
Francis
Ed Merks wrote:
> Francis,
>
> No! When running an Eclipse headless invocation you don't put anything
> on the classpath except the startup.jar. If you put plugin jars on the
> classpath, you'll by pass the normal plugin initialization that is
> supposed to happen. In this case you are loading the cached "meta"
> schemas from the org.eclipse.xsd plugin, which should normally work
> fine, but I'm quite sure the classpath thing is going to mess it up...
>
>
> Francis Upton wrote:
>
>> Ed Merks wrote:
>>
>>> Francis,
>>>
>>> You aren't putting these jars on the classpath explicitly are you?
>>> I would also expect bundleentry to have a registered protocol handler
>>> so that creating a URL for it would not fail in the way you showed...
>>
>>
>>
>> I have added the jars to the java build path/libraries tab, as I have
>> always done. Is this not the way to do it?
>>
>> Regarding the bundleentry thing, here are some of the variable values
>> from the XSDSchemaImpl.resolveSchema() stack frame:
>>
>> this:
>> org.eclipse.xsd.impl.XSDSchemaImpl@1533b2c (element: [xs:schema:
>> null]) (document: [#document: null], schemaLocation:
>> bundleentry://141/cache/www.w3.org/2001/XMLSchema.xsd,
>> targetNamespace: http://www.w3.org/2001/XMLSchema,
>> attributeFormDefault: <unset>, elementFormDefault: qualified,
>> finalDefault: [], blockDefault: [all], version: 1.0)
>>
>> xsdImport:
>> org.eclipse.xsd.impl.XSDImportImpl@4e76b4 (element: [xs:import: null])
>> (schemaLocation: http://www.w3.org/2001/xml.xsd) (namespace:
>> http://www.w3.org/XML/1998/namespace)
>>
>> namespace:
>> http://www.w3.org/XML/1998/namespace
>>
>> So it looks like it's trying to resolve something from one of the
>> built in schemas.
>>
>> It seems that I have some of my plumbing messed up here, but I'm not
>> sure how I should fix it.
>>
>>
>>>
>>>
>>> Francis Upton wrote:
>>>
>>>> I have previously used the wonderful XSD support standalone, using
>>>> xsd.[resource].jar, common.[resource].jar and core.[resource].jar
>>>> with version 2.0.1.
>>>>
>>>> I have since migrated to SWT and RCP (on version 3.1) and am now
>>>> using it as a plug in. I have removed the above jar files and and
>>>> replaced them with these jar files (which of course include quite a
>>>> bit more than XSD):
>>>>
>>>> org.eclipse.core.resources_3.1.0.jar org.eclipse.osgi_3.1.0.jar
>>>> org.eclipse.core.resources.linux_3.1.0.jar
>>>> org.eclipse.swt.gtk.linux.x86_3.1.0.jar
>>>> org.eclipse.core.runtime_3.1.0.jar org.eclipse.ui_3.1.0.jar
>>>> org.eclipse.emf.common_2.1.0.jar
>>>> org.eclipse.ui.ide_3.1.0.jar
>>>> org.eclipse.emf.ecore_2.1.0.jar
>>>> org.eclipse.ui.views_3.1.0.jar
>>>> org.eclipse.jface_3.1.0.jar org.eclipse.ui.workbench_3.1.0.jar
>>>> org.eclipse.jface.text_3.1.0.jar org.eclipse.xsd_2.1.0.jar
>>>>
>>>>
>>>> I have also added the the following dependent plugins:
>>>>
>>>> Require-Bundle: org.eclipse.jface,
>>>> org.eclipse.jface.text,
>>>> org.eclipse.osgi,
>>>> org.eclipse.swt,
>>>> org.eclipse.ui,
>>>> org.eclipse.core.runtime,
>>>> org.eclipse.osgi.util,
>>>> org.eclipse.osgi.services,
>>>> org.eclipse.ui.views,
>>>> org.eclipse.ui.ide,
>>>> org.eclipse.ui.editors,
>>>> org.eclipse.ui.workbench.texteditor,
>>>> org.junit,
>>>> org.eclipse.emf.common,
>>>> org.eclipse.emf.ecore,
>>>> org.eclipse.xsd,
>>>> org.eclipse.emf.importer,
>>>> org.eclipse.emf.importer.ecore,
>>>> org.eclipse.xsd.ecore.importer
>>>>
>>>> With all this, running the same tests that used to work fine, I'm
>>>> getting the following errors when I try to import an .xsd file.
>>>>
>>>> Any ideas?
>>>>
>>>> Thanks,
>>>>
>>>> Francis
>>>>
>>>>
>>>> !SESSION 2005-09-27 10:50:03.485
>>>> -----------------------------------------------
>>>> eclipse.buildId=unknown
>>>> java.version=1.4.2_05
>>>> java.vendor=Sun Microsystems Inc.
>>>> BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
>>>> Framework arguments: -version 3 -application
>>>> org.eclipse.pde.junit.runtime.uitestapplication -product
>>>> com.oaklandsw.transform.product -pdelaunch -port 34067
>>>> -testpluginname com.oaklandsw.transform -test
>>>> com.oaklandsw.transform.XsdSimpleImportTest:testBasic
>>>> Command-line arguments: -version 3 -application
>>>> org.eclipse.pde.junit.runtime.uitestapplication -product
>>>> com.oaklandsw.transform.product -data
>>>> /home/francis/junit-workbench-workspace -dev
>>>> file:/home/francis/d/.metadata/.plugins/org.eclipse.pde.core /XsdSimpleImportTest.testBasic/dev.properties
>>>> -pdelaunch -os linux -ws gtk -arch x86 -port 34067 -testpluginname
>>>> com.oaklandsw.transform -test
>>>> com.oaklandsw.transform.XsdSimpleImportTest:testBasic
>>>>
>>>> !ENTRY org.eclipse.ui 4 4 2005-09-27 10:50:11.33
>>>> !MESSAGE Invalid Menu Extension (Path is invalid):
>>>> org.eclipse.ui.edit.text.gotoLastEditPosition
>>>>
>>>> !ENTRY org.eclipse.xsd 2 0 2005-09-27 10:50:14.290
>>>> !MESSAGE bundleentry
>>>> !STACK 0
>>>> java.net.UnknownHostException: bundleentry
>>>> at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:153)
>>>> at java.net.Socket.connect(Socket.java:452)
>>>> at java.net.Socket.connect(Socket.java:402)
>>>> at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
>>>> at sun.net.NetworkClient.openServer(NetworkClient.java:118)
>>>> at sun.net.ftp.FtpClient.openServer(FtpClient.java:423)
>>>> at sun.net.ftp.FtpClient.<init>(FtpClient.java:692)
>>>> at
>>>> sun.net.www.protocol.ftp.FtpURLConnection.connect(FtpURLConn ection.java:175)
>>>>
>>>> at
>>>> sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(Ftp URLConnection.java:257)
>>>>
>>>> at java.net.URL.openStream(URL.java:913)
>>>> at
>>>> org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(U nknown
>>>> Source)
>>>> at
>>>> org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
>>>> at
>>>> org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
>>>> at org.apache.xerces.impl.XMLDTDScannerImpl.startPE(Unknown
>>>> Source)
>>>> at
>>>> org.apache.xerces.impl.XMLDTDScannerImpl.skipSeparator(Unkno wn Source)
>>>> at
>>>> org.apache.xerces.impl.XMLDTDScannerImpl.scanDecls(Unknown Source)
>>>> at
>>>> org.apache.xerces.impl.XMLDTDScannerImpl.scanDTDExternalSubs et(Unknown
>>>> Source)
>>>> at
>>>> org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher. dispatch(Unknown
>>>> Source)
>>>> at
>>>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDo cument(Unknown
>>>> Source)
>>>> at
>>>> org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>>>> at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
>>>> Source)
>>>> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>>>> at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
>>>> at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown
>>>> Source)
>>>> at
>>>> org.eclipse.xsd.util.XSDResourceImpl.getDocument(XSDResource Impl.java:238)
>>>>
>>>> at
>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:412)
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:398)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDImportImpl.importSchema(XSDImportImp l.java:476)
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.resolveSchema(XSDSchemaIm pl.java:2120)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.resolveNamedComponent(XSD SchemaImpl.java:2143)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.resolveAttributeDeclarati on(XSDSchemaImpl.java:2168)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.resolveAttribu teDeclaration(XSDConcreteComponentImpl.java:2469)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDAttributeDeclarationImpl.patch(XSDAt tributeDeclarationImpl.java:203)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDAttributeUseImpl.patch(XSDAttributeU seImpl.java:738)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDNamedComponentImpl.patch(XSDNamedCom ponentImpl.java:727)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDTypeDefinitionImpl.patch(XSDTypeDefi nitionImpl.java:249)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.patch(XSDC omplexTypeDefinitionImpl.java:994)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDNamedComponentImpl.patch(XSDNamedCom ponentImpl.java:727)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.patch(XSDElem entDeclarationImpl.java:546)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1493)
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2314)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1219)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:825)
>>>>
>>>> at
>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:489)
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaForSchema(XSDSch emaImpl.java:609)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:420)
>>>> at
>>>> org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:536)
>>>>
>>>> at
>>>> org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:502)
>>>>
>>>> at
>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:431)
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
>>>>
>>>> at
>>>> com.oaklandsw.transform.rep.xml.XsdImportProcessor.importFro mFile(XsdImportProcessor.java:178)
>>>>
>>>> at
>>>> com.oaklandsw.transform.rep.xml.XsdImporter.doImportSubclass (XsdImporter.java:42)
>>>>
>>>> at
>>>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:338)
>>>> at
>>>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:322)
>>>> at
>>>> com.oaklandsw.transform.TransformTestBase.importXsdDefinitio n(TransformTestBase.java:1711)
>>>>
>>>> at
>>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1926)
>>>>
>>>> at
>>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1905)
>>>>
>>>> at
>>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1891)
>>>>
>>>> at
>>>> com.oaklandsw.transform.XsdSimpleImportTest.testBasic(XsdSim pleImportTest.java:43)
>>>>
>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>> at
>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>>
>>>> at
>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>>
>>>> at java.lang.reflect.Method.invoke(Method.java:324)
>>>> at junit.framework.TestCase.runTest(TestCase.java:154)
>>>> at junit.framework.TestCase.runBare(TestCase.java:127)
>>>> at junit.framework.TestResult$1.protect(TestResult.java:106)
>>>> at junit.framework.TestResult.runProtected(TestResult.java:124)
>>>> at junit.framework.TestResult.run(TestResult.java:109)
>>>> at junit.framework.TestCase.run(TestCase.java:118)
>>>> at
>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:478)
>>>>
>>>> at
>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:344)
>>>>
>>>> at
>>>> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:57)
>>>>
>>>> at
>>>> org.eclipse.pde.internal.junit.runtime.UITestApplication$1.r un(UITestApplication.java:99)
>>>>
>>>> at
>>>> org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
>>>> at
>>>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
>>>>
>>>> at
>>>> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2844)
>>>> at
>>>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2575)
>>>> at
>>>> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1699)
>>>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
>>>> at
>>>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:367)
>>>>
>>>> at
>>>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
>>>> at
>>>> com.oaklandsw.transform.editor.Editor.runEditor(Editor.java: 2111)
>>>> at
>>>> com.oaklandsw.transform.editor.Standalone.run(Standalone.jav a:72)
>>>> at
>>>> org.eclipse.pde.internal.junit.runtime.UITestApplication.run (UITestApplication.java:39)
>>>>
>>>> at
>>>> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
>>>>
>>>> at
>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
>>>>
>>>> at
>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
>>>>
>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>> at
>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>>
>>>> at
>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>>
>>>> at java.lang.reflect.Method.invoke(Method.java:324)
>>>> at
>>>> org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
>>>> at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
>>>> at org.eclipse.core.launcher.Main.run(Main.java:973)
>>>> at org.eclipse.core.launcher.Main.main(Main.java:948)
>>>>
>>>> !ENTRY org.eclipse.xsd 2 0 2005-09-27 10:50:14.505
>>>> !MESSAGE
>>>> !STACK 0
>>>> java.lang.NullPointerException
>>>> at
>>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleNewB aseTypeDefinition(XSDComplexTypeDefinitionImpl.java:2046)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2329)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDModelGroupImpl.adoptContent(XSDModel GroupImpl.java:693)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
>>>>
>>>> at
>>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDModelGroupImpl.handleReconciliation( XSDModelGroupImpl.java:657)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.adoptConte nt(XSDComplexTypeDefinitionImpl.java:2600)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.setContent (XSDComplexTypeDefinitionImpl.java:758)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2240)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.adoptContent(XSDSchemaImp l.java:1763)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
>>>>
>>>> at
>>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.handleReconciliation(XSDS chemaImpl.java:1985)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.changeAttribut e(XSDConcreteComponentImpl.java:1246)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2318)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1219)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElementGen( XSDConcreteComponentImpl.java:2817)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElement(XSD ConcreteComponentImpl.java:2849)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.setElement(XSDSchemaImpl. java:2441)
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:422)
>>>> at
>>>> org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:536)
>>>>
>>>> at
>>>> org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:502)
>>>>
>>>> at
>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:431)
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
>>>>
>>>> at
>>>> com.oaklandsw.transform.rep.xml.XsdImportProcessor.importFro mFile(XsdImportProcessor.java:178)
>>>>
>>>> at
>>>> com.oaklandsw.transform.rep.xml.XsdImporter.doImportSubclass (XsdImporter.java:42)
>>>>
>>>> at
>>>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:338)
>>>> at
>>>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:322)
>>>> at
>>>> com.oaklandsw.transform.TransformTestBase.importXsdDefinitio n(TransformTestBase.java:1711)
>>>>
>>>> at
>>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1926)
>>>>
>>>> at
>>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1905)
>>>>
>>>> at
>>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1891)
>>>>
>>>> at
>>>> com.oaklandsw.transform.XsdSimpleImportTest.testBasic(XsdSim pleImportTest.java:43)
>>>>
>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>> at
>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>>
>>>> at
>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>>
>>>> at java.lang.reflect.Method.invoke(Method.java:324)
>>>> at junit.framework.TestCase.runTest(TestCase.java:154)
>>>> at junit.framework.TestCase.runBare(TestCase.java:127)
>>>> at junit.framework.TestResult$1.protect(TestResult.java:106)
>>>> at junit.framework.TestResult.runProtected(TestResult.java:124)
>>>> at junit.framework.TestResult.run(TestResult.java:109)
>>>> at junit.framework.TestCase.run(TestCase.java:118)
>>>> at
>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:478)
>>>>
>>>> at
>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:344)
>>>>
>>>> at
>>>> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:57)
>>>>
>>>> at
>>>> org.eclipse.pde.internal.junit.runtime.UITestApplication$1.r un(UITestApplication.java:99)
>>>>
>>>> at
>>>> org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
>>>> at
>>>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
>>>>
>>>> at
>>>> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2844)
>>>> at
>>>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2575)
>>>> at
>>>> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1699)
>>>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
>>>> at
>>>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:367)
>>>>
>>>> at
>>>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
>>>> at
>>>> com.oaklandsw.transform.editor.Editor.runEditor(Editor.java: 2111)
>>>> at
>>>> com.oaklandsw.transform.editor.Standalone.run(Standalone.jav a:72)
>>>> at
>>>> org.eclipse.pde.internal.junit.runtime.UITestApplication.run (UITestApplication.java:39)
>>>>
>>>> at
>>>> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
>>>>
>>>> at
>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
>>>>
>>>> at
>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
>>>>
>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>> at
>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>>
>>>> at
>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>>
>>>> at java.lang.reflect.Method.invoke(Method.java:324)
>>>> at
>>>> org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
>>>> at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
>>>> at org.eclipse.core.launcher.Main.run(Main.java:973)
>>>> at org.eclipse.core.launcher.Main.main(Main.java:948)
>>>> main ~/junit-workbench-workspace/.metadata>
>>>>
>>>>
Platform UI Committer for Common Navigator
http://wiki.eclipse.org/index.php/Common_Navigator_Framework
http://help.eclipse.org/galileo/topic/org.eclipse.platform.d oc.isv/guide/cnf.htm
|
|
|
Re: errors using XSD as plugin, UnknownHostException and NPE [message #596710 is a reply to message #64057] |
Wed, 28 September 2005 09:28 |
Francis Upton IV Messages: 472 Registered: July 2009 Location: Oakland, CA |
Senior Member |
|
|
Ed,
I hope you disregarded my previous post. I'm no longer confused about
the classpath issue and have removed all of the org.eclipse.* from the
build path libraries, as I can see now that they come in with the
plugins if the dependencies are correctly declared.
I built everything clean, deleted my run configurations, and yet I still
get exactly the same problem.
It looks like getDocument() is being called to parse:
http://www.w3.org/2001/xml.xsd It has been called a couple of other
times previously (and successfully) to parse documents where the URI
scheme is "bundled".
However, in the failing call, the parser tries to open the URL:
" file://bundleentry://141/cache/www.w3.org/2001/datatypes.dtd"
which goes to the FTP client and then fails because of the invalid host
on bundleentry. Seems like this URL is bad.
This same error and stacktrace has appeared before, in the tools.emf
newsgroup, with the title "XSD metamodel: Error trying to load xsd
resources into the resourceset." on 3 Jun 05. The resolution of the
problem was not posted.
Can you give me some hints to debug this?
Thanks,
Francis
Francis Upton wrote:
> Ed,
>
> I'm still confused. First, I'm not executing headless; this is an RCP
> application which is created from a plugin as a product. There is
> nothing the class of the plugin - here is the manifest.mf:
>
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Oakland Software Data Mapper
> Bundle-SymbolicName: com.oaklandsw.transform; singleton:=true
> Bundle-Version: 1.0.0
> Bundle-Activator: com.oaklandsw.transform.editor.TransformPlugin
> Bundle-Localization: plugin
> Require-Bundle: org.eclipse.jface,
> org.eclipse.jface.text,
> org.eclipse.osgi,
> org.eclipse.swt,
> org.eclipse.ui,
> org.eclipse.core.runtime,
> org.eclipse.osgi.util,
> org.eclipse.osgi.services,
> org.eclipse.ui.views,
> org.eclipse.ui.ide,
> org.eclipse.ui.editors,
> org.eclipse.ui.workbench.texteditor,
> org.junit,
> org.eclipse.emf.common,
> org.eclipse.emf.ecore,
> org.eclipse.xsd,
> org.eclipse.emf.importer,
> org.eclipse.emf.importer.ecore,
> org.eclipse.xsd.ecore.importer
> Eclipse-AutoStart: true
>
> I have the jars for all of the eclipse stuff (including SWT, jface,
> runtime, emf, xsd) in my java build path (Project -> Properties -> Java
> BuildPath -> Library) so that my code can compile, but I don't think
> this puts things in the classpath when the plugin is being executed.
>
> I still don't know what to do to fix the problem. Thanks for your
> patience with me if I'm missing something obvious.
>
> Francis
>
> Ed Merks wrote:
>
>> Francis,
>>
>> No! When running an Eclipse headless invocation you don't put
>> anything on the classpath except the startup.jar. If you put plugin
>> jars on the classpath, you'll by pass the normal plugin initialization
>> that is supposed to happen. In this case you are loading the cached
>> "meta" schemas from the org.eclipse.xsd plugin, which should normally
>> work fine, but I'm quite sure the classpath thing is going to mess it
>> up...
>>
>>
>> Francis Upton wrote:
>>
>>> Ed Merks wrote:
>>>
>>>> Francis,
>>>>
>>>> You aren't putting these jars on the classpath explicitly are you?
>>>> I would also expect bundleentry to have a registered protocol
>>>> handler so that creating a URL for it would not fail in the way you
>>>> showed...
>>>
>>>
>>>
>>>
>>> I have added the jars to the java build path/libraries tab, as I have
>>> always done. Is this not the way to do it?
>>>
>>> Regarding the bundleentry thing, here are some of the variable values
>>> from the XSDSchemaImpl.resolveSchema() stack frame:
>>>
>>> this:
>>> org.eclipse.xsd.impl.XSDSchemaImpl@1533b2c (element: [xs:schema:
>>> null]) (document: [#document: null], schemaLocation:
>>> bundleentry://141/cache/www.w3.org/2001/XMLSchema.xsd,
>>> targetNamespace: http://www.w3.org/2001/XMLSchema,
>>> attributeFormDefault: <unset>, elementFormDefault: qualified,
>>> finalDefault: [], blockDefault: [all], version: 1.0)
>>>
>>> xsdImport:
>>> org.eclipse.xsd.impl.XSDImportImpl@4e76b4 (element: [xs:import:
>>> null]) (schemaLocation: http://www.w3.org/2001/xml.xsd) (namespace:
>>> http://www.w3.org/XML/1998/namespace)
>>>
>>> namespace:
>>> http://www.w3.org/XML/1998/namespace
>>>
>>> So it looks like it's trying to resolve something from one of the
>>> built in schemas.
>>>
>>> It seems that I have some of my plumbing messed up here, but I'm not
>>> sure how I should fix it.
>>>
>>>
>>>>
>>>>
>>>> Francis Upton wrote:
>>>>
>>>>> I have previously used the wonderful XSD support standalone, using
>>>>> xsd.[resource].jar, common.[resource].jar and core.[resource].jar
>>>>> with version 2.0.1.
>>>>>
>>>>> I have since migrated to SWT and RCP (on version 3.1) and am now
>>>>> using it as a plug in. I have removed the above jar files and and
>>>>> replaced them with these jar files (which of course include quite a
>>>>> bit more than XSD):
>>>>>
>>>>> org.eclipse.core.resources_3.1.0.jar org.eclipse.osgi_3.1.0.jar
>>>>> org.eclipse.core.resources.linux_3.1.0.jar
>>>>> org.eclipse.swt.gtk.linux.x86_3.1.0.jar
>>>>> org.eclipse.core.runtime_3.1.0.jar org.eclipse.ui_3.1.0.jar
>>>>> org.eclipse.emf.common_2.1.0.jar
>>>>> org.eclipse.ui.ide_3.1.0.jar
>>>>> org.eclipse.emf.ecore_2.1.0.jar
>>>>> org.eclipse.ui.views_3.1.0.jar
>>>>> org.eclipse.jface_3.1.0.jar org.eclipse.ui.workbench_3.1.0.jar
>>>>> org.eclipse.jface.text_3.1.0.jar org.eclipse.xsd_2.1.0.jar
>>>>>
>>>>>
>>>>> I have also added the the following dependent plugins:
>>>>>
>>>>> Require-Bundle: org.eclipse.jface,
>>>>> org.eclipse.jface.text,
>>>>> org.eclipse.osgi,
>>>>> org.eclipse.swt,
>>>>> org.eclipse.ui,
>>>>> org.eclipse.core.runtime,
>>>>> org.eclipse.osgi.util,
>>>>> org.eclipse.osgi.services,
>>>>> org.eclipse.ui.views,
>>>>> org.eclipse.ui.ide,
>>>>> org.eclipse.ui.editors,
>>>>> org.eclipse.ui.workbench.texteditor,
>>>>> org.junit,
>>>>> org.eclipse.emf.common,
>>>>> org.eclipse.emf.ecore,
>>>>> org.eclipse.xsd,
>>>>> org.eclipse.emf.importer,
>>>>> org.eclipse.emf.importer.ecore,
>>>>> org.eclipse.xsd.ecore.importer
>>>>>
>>>>> With all this, running the same tests that used to work fine, I'm
>>>>> getting the following errors when I try to import an .xsd file.
>>>>>
>>>>> Any ideas?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Francis
>>>>>
>>>>>
>>>>> !SESSION 2005-09-27 10:50:03.485
>>>>> -----------------------------------------------
>>>>> eclipse.buildId=unknown
>>>>> java.version=1.4.2_05
>>>>> java.vendor=Sun Microsystems Inc.
>>>>> BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
>>>>> Framework arguments: -version 3 -application
>>>>> org.eclipse.pde.junit.runtime.uitestapplication -product
>>>>> com.oaklandsw.transform.product -pdelaunch -port 34067
>>>>> -testpluginname com.oaklandsw.transform -test
>>>>> com.oaklandsw.transform.XsdSimpleImportTest:testBasic
>>>>> Command-line arguments: -version 3 -application
>>>>> org.eclipse.pde.junit.runtime.uitestapplication -product
>>>>> com.oaklandsw.transform.product -data
>>>>> /home/francis/junit-workbench-workspace -dev
>>>>> file:/home/francis/d/.metadata/.plugins/org.eclipse.pde.core /XsdSimpleImportTest.testBasic/dev.properties
>>>>> -pdelaunch -os linux -ws gtk -arch x86 -port 34067 -testpluginname
>>>>> com.oaklandsw.transform -test
>>>>> com.oaklandsw.transform.XsdSimpleImportTest:testBasic
>>>>>
>>>>> !ENTRY org.eclipse.ui 4 4 2005-09-27 10:50:11.33
>>>>> !MESSAGE Invalid Menu Extension (Path is invalid):
>>>>> org.eclipse.ui.edit.text.gotoLastEditPosition
>>>>>
>>>>> !ENTRY org.eclipse.xsd 2 0 2005-09-27 10:50:14.290
>>>>> !MESSAGE bundleentry
>>>>> !STACK 0
>>>>> java.net.UnknownHostException: bundleentry
>>>>> at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:153)
>>>>> at java.net.Socket.connect(Socket.java:452)
>>>>> at java.net.Socket.connect(Socket.java:402)
>>>>> at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
>>>>> at sun.net.NetworkClient.openServer(NetworkClient.java:118)
>>>>> at sun.net.ftp.FtpClient.openServer(FtpClient.java:423)
>>>>> at sun.net.ftp.FtpClient.<init>(FtpClient.java:692)
>>>>> at
>>>>> sun.net.www.protocol.ftp.FtpURLConnection.connect(FtpURLConn ection.java:175)
>>>>>
>>>>> at
>>>>> sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(Ftp URLConnection.java:257)
>>>>>
>>>>> at java.net.URL.openStream(URL.java:913)
>>>>> at
>>>>> org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(U nknown
>>>>> Source)
>>>>> at
>>>>> org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
>>>>> at
>>>>> org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
>>>>> at org.apache.xerces.impl.XMLDTDScannerImpl.startPE(Unknown
>>>>> Source)
>>>>> at
>>>>> org.apache.xerces.impl.XMLDTDScannerImpl.skipSeparator(Unkno wn Source)
>>>>> at
>>>>> org.apache.xerces.impl.XMLDTDScannerImpl.scanDecls(Unknown Source)
>>>>> at
>>>>> org.apache.xerces.impl.XMLDTDScannerImpl.scanDTDExternalSubs et(Unknown
>>>>> Source)
>>>>> at
>>>>> org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher. dispatch(Unknown
>>>>> Source)
>>>>> at
>>>>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDo cument(Unknown
>>>>> Source)
>>>>> at
>>>>> org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>>>>> at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
>>>>> Source)
>>>>> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>>>>> at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
>>>>> at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown
>>>>> Source)
>>>>> at
>>>>> org.eclipse.xsd.util.XSDResourceImpl.getDocument(XSDResource Impl.java:238)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:412)
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:398)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDImportImpl.importSchema(XSDImportImp l.java:476)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.resolveSchema(XSDSchemaIm pl.java:2120)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.resolveNamedComponent(XSD SchemaImpl.java:2143)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.resolveAttributeDeclarati on(XSDSchemaImpl.java:2168)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.resolveAttribu teDeclaration(XSDConcreteComponentImpl.java:2469)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDAttributeDeclarationImpl.patch(XSDAt tributeDeclarationImpl.java:203)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDAttributeUseImpl.patch(XSDAttributeU seImpl.java:738)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDNamedComponentImpl.patch(XSDNamedCom ponentImpl.java:727)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDTypeDefinitionImpl.patch(XSDTypeDefi nitionImpl.java:249)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.patch(XSDC omplexTypeDefinitionImpl.java:994)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDNamedComponentImpl.patch(XSDNamedCom ponentImpl.java:727)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.patch(XSDElem entDeclarationImpl.java:546)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:526)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1493)
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2314)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1219)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:825)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:489)
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaForSchema(XSDSch emaImpl.java:609)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:420)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:536)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:502)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:431)
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
>>>>>
>>>>> at
>>>>> com.oaklandsw.transform.rep.xml.XsdImportProcessor.importFro mFile(XsdImportProcessor.java:178)
>>>>>
>>>>> at
>>>>> com.oaklandsw.transform.rep.xml.XsdImporter.doImportSubclass (XsdImporter.java:42)
>>>>>
>>>>> at
>>>>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:338)
>>>>> at
>>>>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:322)
>>>>> at
>>>>> com.oaklandsw.transform.TransformTestBase.importXsdDefinitio n(TransformTestBase.java:1711)
>>>>>
>>>>> at
>>>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1926)
>>>>>
>>>>> at
>>>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1905)
>>>>>
>>>>> at
>>>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1891)
>>>>>
>>>>> at
>>>>> com.oaklandsw.transform.XsdSimpleImportTest.testBasic(XsdSim pleImportTest.java:43)
>>>>>
>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>> at
>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>>>
>>>>> at
>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>>>
>>>>> at java.lang.reflect.Method.invoke(Method.java:324)
>>>>> at junit.framework.TestCase.runTest(TestCase.java:154)
>>>>> at junit.framework.TestCase.runBare(TestCase.java:127)
>>>>> at junit.framework.TestResult$1.protect(TestResult.java:106)
>>>>> at
>>>>> junit.framework.TestResult.runProtected(TestResult.java:124)
>>>>> at junit.framework.TestResult.run(TestResult.java:109)
>>>>> at junit.framework.TestCase.run(TestCase.java:118)
>>>>> at
>>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:478)
>>>>>
>>>>> at
>>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:344)
>>>>>
>>>>> at
>>>>> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:57)
>>>>>
>>>>> at
>>>>> org.eclipse.pde.internal.junit.runtime.UITestApplication$1.r un(UITestApplication.java:99)
>>>>>
>>>>> at
>>>>> org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
>>>>> at
>>>>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
>>>>>
>>>>> at
>>>>> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2844)
>>>>> at
>>>>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2575)
>>>>> at
>>>>> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1699)
>>>>> at
>>>>> org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
>>>>> at
>>>>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:367)
>>>>>
>>>>> at
>>>>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
>>>>> at
>>>>> com.oaklandsw.transform.editor.Editor.runEditor(Editor.java: 2111)
>>>>> at
>>>>> com.oaklandsw.transform.editor.Standalone.run(Standalone.jav a:72)
>>>>> at
>>>>> org.eclipse.pde.internal.junit.runtime.UITestApplication.run (UITestApplication.java:39)
>>>>>
>>>>> at
>>>>> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
>>>>>
>>>>> at
>>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
>>>>>
>>>>> at
>>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
>>>>>
>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>> at
>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>>>
>>>>> at
>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>>>
>>>>> at java.lang.reflect.Method.invoke(Method.java:324)
>>>>> at
>>>>> org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
>>>>> at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
>>>>> at org.eclipse.core.launcher.Main.run(Main.java:973)
>>>>> at org.eclipse.core.launcher.Main.main(Main.java:948)
>>>>>
>>>>> !ENTRY org.eclipse.xsd 2 0 2005-09-27 10:50:14.505
>>>>> !MESSAGE
>>>>> !STACK 0
>>>>> java.lang.NullPointerException
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleNewB aseTypeDefinition(XSDComplexTypeDefinitionImpl.java:2046)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2329)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDModelGroupImpl.adoptContent(XSDModel GroupImpl.java:693)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDModelGroupImpl.handleReconciliation( XSDModelGroupImpl.java:657)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.adoptConte nt(XSDComplexTypeDefinitionImpl.java:2600)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.setContent (XSDComplexTypeDefinitionImpl.java:758)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2240)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.adoptContent(XSDSchemaImp l.java:1763)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.handleReconciliation(XSDS chemaImpl.java:1985)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.changeAttribut e(XSDConcreteComponentImpl.java:1246)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2318)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1219)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElementGen( XSDConcreteComponentImpl.java:2817)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElement(XSD ConcreteComponentImpl.java:2849)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.setElement(XSDSchemaImpl. java:2441)
>>>>> at
>>>>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:422)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:536)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:502)
>>>>>
>>>>> at
>>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:431)
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
>>>>>
>>>>> at
>>>>> com.oaklandsw.transform.rep.xml.XsdImportProcessor.importFro mFile(XsdImportProcessor.java:178)
>>>>>
>>>>> at
>>>>> com.oaklandsw.transform.rep.xml.XsdImporter.doImportSubclass (XsdImporter.java:42)
>>>>>
>>>>> at
>>>>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:338)
>>>>> at
>>>>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:322)
>>>>> at
>>>>> com.oaklandsw.transform.TransformTestBase.importXsdDefinitio n(TransformTestBase.java:1711)
>>>>>
>>>>> at
>>>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1926)
>>>>>
>>>>> at
>>>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1905)
>>>>>
>>>>> at
>>>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1891)
>>>>>
>>>>> at
>>>>> com.oaklandsw.transform.XsdSimpleImportTest.testBasic(XsdSim pleImportTest.java:43)
>>>>>
>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>> at
>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>>>
>>>>> at
>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>>>
>>>>> at java.lang.reflect.Method.invoke(Method.java:324)
>>>>> at junit.framework.TestCase.runTest(TestCase.java:154)
>>>>> at junit.framework.TestCase.runBare(TestCase.java:127)
>>>>> at junit.framework.TestResult$1.protect(TestResult.java:106)
>>>>> at
>>>>> junit.framework.TestResult.runProtected(TestResult.java:124)
>>>>> at junit.framework.TestResult.run(TestResult.java:109)
>>>>> at junit.framework.TestCase.run(TestCase.java:118)
>>>>> at
>>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:478)
>>>>>
>>>>> at
>>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:344)
>>>>>
>>>>> at
>>>>> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:57)
>>>>>
>>>>> at
>>>>> org.eclipse.pde.internal.junit.runtime.UITestApplication$1.r un(UITestApplication.java:99)
>>>>>
>>>>> at
>>>>> org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
>>>>> at
>>>>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
>>>>>
>>>>> at
>>>>> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2844)
>>>>> at
>>>>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2575)
>>>>> at
>>>>> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1699)
>>>>> at
>>>>> org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
>>>>> at
>>>>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:367)
>>>>>
>>>>> at
>>>>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
>>>>> at
>>>>> com.oaklandsw.transform.editor.Editor.runEditor(Editor.java: 2111)
>>>>> at
>>>>> com.oaklandsw.transform.editor.Standalone.run(Standalone.jav a:72)
>>>>> at
>>>>> org.eclipse.pde.internal.junit.runtime.UITestApplication.run (UITestApplication.java:39)
>>>>>
>>>>> at
>>>>> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
>>>>>
>>>>> at
>>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
>>>>>
>>>>> at
>>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
>>>>>
>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>> at
>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>>>
>>>>> at
>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>>>
>>>>> at java.lang.reflect.Method.invoke(Method.java:324)
>>>>> at
>>>>> org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
>>>>> at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
>>>>> at org.eclipse.core.launcher.Main.run(Main.java:973)
>>>>> at org.eclipse.core.launcher.Main.main(Main.java:948)
>>>>> main ~/junit-workbench-workspace/.metadata>
>>>>>
>>>>>
Platform UI Committer for Common Navigator
http://wiki.eclipse.org/index.php/Common_Navigator_Framework
http://help.eclipse.org/galileo/topic/org.eclipse.platform.d oc.isv/guide/cnf.htm
|
|
|
Re: errors using XSD as plugin, UnknownHostException and NPE [message #596714 is a reply to message #64081] |
Wed, 28 September 2005 10:19 |
Francis Upton IV Messages: 472 Registered: July 2009 Location: Oakland, CA |
Senior Member |
|
|
Good morning Ed,
I have resolved the first of the two exceptions. It was caused by
inconsistent xerces jar files from two different versions. Sorry about
troubling you for that, and my punishment is that my sloppyness will be
enshrined here for public view by future generations.
However, the 2nd NPE still remains (I copied the stack trace below this
message). In this case, it is trying to get the "schema for schema",
but in the schema being parsed, the qNamePrefixToNamespaceMap is empty,
but the schemaForSchemaQnamePrefix contains "xsd" which is what I would
expect.
java.lang.NullPointerException
at
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleNewB aseTypeDefinition(XSDComplexTypeDefinitionImpl.java:2046)
at
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2329)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
at
org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
at
org.eclipse.xsd.impl.XSDModelGroupImpl.adoptContent(XSDModel GroupImpl.java:693)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
at
org.eclipse.xsd.impl.XSDModelGroupImpl.handleReconciliation( XSDModelGroupImpl.java:657)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
at
org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
at
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.adoptConte nt(XSDComplexTypeDefinitionImpl.java:2600)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
at
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.setContent (XSDComplexTypeDefinitionImpl.java:758)
at
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2240)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
at
org.eclipse.xsd.impl.XSDSchemaImpl.adoptContent(XSDSchemaImp l.java:1763)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
at
org.eclipse.xsd.impl.XSDSchemaImpl.handleReconciliation(XSDS chemaImpl.java:1985)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.changeAttribut e(XSDConcreteComponentImpl.java:1246)
at
org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2318)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1219)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElementGen( XSDConcreteComponentImpl.java:2817)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElement(XSD ConcreteComponentImpl.java:2849)
at
org.eclipse.xsd.impl.XSDSchemaImpl.setElement(XSDSchemaImpl. java:2441)
at
org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:422)
at
org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:536)
at
org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:502)
at
org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:431)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
at
com.oaklandsw.transform.rep.xml.XsdImportProcessor.importFro mFile(XsdImportProcessor.java:178)
at
com.oaklandsw.transform.rep.xml.XsdImporter.doImportSubclass (XsdImporter.java:42)
at
com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:338)
at
com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:322)
at
com.oaklandsw.transform.TransformTestBase.importXsdDefinitio n(TransformTestBase.java:1711)
at
com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1926)
at
com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1905)
at
com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1891)
at
com.oaklandsw.transform.XsdSimpleImportTest.testBasic(XsdSim pleImportTest.java:43)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:478)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:344)
at
org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:57)
at
org.eclipse.pde.internal.junit.runtime.UITestApplication$1.r un(UITestApplication.java:99)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
at
org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2844)
at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2575)
at
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1699)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:367)
at
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
at
com.oaklandsw.transform.editor.Editor.runEditor(Editor.java: 2111)
at
com.oaklandsw.transform.editor.Standalone.run(Standalone.jav a:72)
at
org.eclipse.pde.internal.junit.runtime.UITestApplication.run (UITestApplication.java:39)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
at org.eclipse.core.launcher.Main.run(Main.java:973)
at org.eclipse.core.launcher.Main.main(Main.java:948)
Here is the XSD file (which has worked fine in the past):
<?xml version="1.0" encoding="UTF-8" ?>
<!--
simple xsd document
-->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.publishing.org"
xmlns="http://www.publishing.org"
elementFormDefault="qualified">
<xsd:element name="BookCatalogue">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Book" minOccurs="1"
maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element
name="Title" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element
name="Author" type="xsd:string" minOccurs="1" maxOccurs="2"/>
<xsd:element
name="Date" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<!-- ISBN
element is optional for the sake of testing -->
<xsd:element
name="ISBN" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element
name="Publisher" type="xsd:string" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
Platform UI Committer for Common Navigator
http://wiki.eclipse.org/index.php/Common_Navigator_Framework
http://help.eclipse.org/galileo/topic/org.eclipse.platform.d oc.isv/guide/cnf.htm
|
|
|
Re: errors using XSD as plugin, UnknownHostException and NPE [message #596726 is a reply to message #64105] |
Wed, 28 September 2005 11:41 |
Ed Merks Messages: 33264 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
--------------010901020603010302050600
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Francis,
I can't duplicate this problem. The prefix map should have been
populated by this code in XSDSchemaImpl.reconcileAttributes:
Map theQNamePrefixToNamespaceMap = getQNamePrefixToNamespaceMap();
theQNamePrefixToNamespaceMap.clear();
for (Element currentElement = changedElement; currentElement
!= null; )
{
NamedNodeMap attributes = currentElement.getAttributes();
for (int i = 0, size = attributes.getLength(); i < size; ++i)
{
Attr attr = (Attr)attributes.item(i);
String name = attr.getNodeName();
if (name.startsWith("xmlns"))
{
String value = attr.getNodeValue();
int index = name.indexOf(":");
String key = index == -1 ? null : name.substring(index
+ 1);
if (!theQNamePrefixToNamespaceMap.containsKey(key))
{
theQNamePrefixToNamespaceMap.put(key, value);
}
}
}
Node parent = currentElement.getParentNode();
if (parent instanceof Element)
{
currentElement = (Element)parent;
}
else
{
break;
}
}
Maybe you could step through that and see why no prefix mappings are
being populated.
Francis Upton wrote:
> Good morning Ed,
>
> I have resolved the first of the two exceptions. It was caused by
> inconsistent xerces jar files from two different versions. Sorry
> about troubling you for that, and my punishment is that my sloppyness
> will be enshrined here for public view by future generations.
>
> However, the 2nd NPE still remains (I copied the stack trace below
> this message). In this case, it is trying to get the "schema for
> schema", but in the schema being parsed, the qNamePrefixToNamespaceMap
> is empty, but the schemaForSchemaQnamePrefix contains "xsd" which is
> what I would expect.
>
> java.lang.NullPointerException
> at
> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleNewB aseTypeDefinition(XSDComplexTypeDefinitionImpl.java:2046)
>
> at
> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2329)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>
> at
> org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>
> at
> org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
>
> at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>
> at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>
> at
> org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
>
> at
> org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>
> at
> org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
>
> at
> org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>
> at
> org.eclipse.xsd.impl.XSDModelGroupImpl.adoptContent(XSDModel GroupImpl.java:693)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
>
> at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>
> at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>
> at
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
>
> at
> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
>
> at
> org.eclipse.xsd.impl.XSDModelGroupImpl.handleReconciliation( XSDModelGroupImpl.java:657)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
>
> at
> org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>
> at
> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.adoptConte nt(XSDComplexTypeDefinitionImpl.java:2600)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>
> at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>
> at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>
> at
> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.setContent (XSDComplexTypeDefinitionImpl.java:758)
>
> at
> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2240)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>
> at
> org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>
> at
> org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
>
> at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>
> at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>
> at
> org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
>
> at
> org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>
> at
> org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.adoptContent(XSDSchemaImp l.java:1763)
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
>
> at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>
> at
> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>
> at
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
>
> at
> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
>
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.handleReconciliation(XSDS chemaImpl.java:1985)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.changeAttribut e(XSDConcreteComponentImpl.java:1246)
>
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2318)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1219)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElementGen( XSDConcreteComponentImpl.java:2817)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElement(XSD ConcreteComponentImpl.java:2849)
>
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.setElement(XSDSchemaImpl. java:2441)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:422)
> at
> org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:536)
>
> at
> org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:502)
>
> at
> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:431)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
>
> at
> com.oaklandsw.transform.rep.xml.XsdImportProcessor.importFro mFile(XsdImportProcessor.java:178)
>
> at
> com.oaklandsw.transform.rep.xml.XsdImporter.doImportSubclass (XsdImporter.java:42)
>
> at
> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:338)
> at
> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:322)
> at
> com.oaklandsw.transform.TransformTestBase.importXsdDefinitio n(TransformTestBase.java:1711)
>
> at
> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1926)
>
> at
> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1905)
>
> at
> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1891)
>
> at
> com.oaklandsw.transform.XsdSimpleImportTest.testBasic(XsdSim pleImportTest.java:43)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:324)
> at junit.framework.TestCase.runTest(TestCase.java:154)
> at junit.framework.TestCase.runBare(TestCase.java:127)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:118)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:478)
>
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:344)
>
> at
> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:57)
>
> at
> org.eclipse.pde.internal.junit.runtime.UITestApplication$1.r un(UITestApplication.java:99)
>
> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
> at
> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
>
> at
> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2844)
> at
> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2575)
> at
> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1699)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:367)
>
> at
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
> at
> com.oaklandsw.transform.editor.Editor.runEditor(Editor.java: 2111)
> at
> com.oaklandsw.transform.editor.Standalone.run(Standalone.jav a:72)
> at
> org.eclipse.pde.internal.junit.runtime.UITestApplication.run (UITestApplication.java:39)
>
> at
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:324)
> at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
> at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
> at org.eclipse.core.launcher.Main.run(Main.java:973)
> at org.eclipse.core.launcher.Main.main(Main.java:948)
>
>
>
>
>
>
> Here is the XSD file (which has worked fine in the past):
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <!--
> simple xsd document
> -->
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> targetNamespace="http://www.publishing.org"
> xmlns="http://www.publishing.org"
> elementFormDefault="qualified">
> <xsd:element name="BookCatalogue">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="Book"
> minOccurs="1" maxOccurs="unbounded">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element
> name="Title" type="xsd:string" minOccurs="1" maxOccurs="1"/>
> <xsd:element
> name="Author" type="xsd:string" minOccurs="1" maxOccurs="2"/>
> <xsd:element
> name="Date" type="xsd:string" minOccurs="1" maxOccurs="1"/>
> <!-- ISBN
> element is optional for the sake of testing -->
> <xsd:element
> name="ISBN" type="xsd:string" minOccurs="0" maxOccurs="1"/>
> <xsd:element
> name="Publisher" type="xsd:string" minOccurs="1" maxOccurs="1"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> </xsd:schema>
>
--------------010901020603010302050600
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Francis,<br>
<br>
I can't duplicate this problem. The prefix map should have been
populated by this code in XSDSchemaImpl.reconcileAttributes:<br>
<blockquote><small> Map theQNamePrefixToNamespaceMap =
getQNamePrefixToNamespaceMap();</small><br>
<small> theQNamePrefixToNamespaceMap.clear();</small><br>
<small> for (Element currentElement = changedElement;
currentElement != null; ) </small><br>
<small> {</small><br>
<small> NamedNodeMap attributes =
currentElement.getAttributes(); </small><br>
<small> for (int i = 0, size = attributes.getLength(); i <
size; ++i)</small><br>
<small> {</small><br>
<small> Attr attr = (Attr)attributes.item(i);</small><br>
<small> String name = attr.getNodeName();</small><br>
<small> if (name.startsWith("xmlns"))</small><br>
<small> {</small><br>
<small> String value = attr.getNodeValue();</small><br>
<small> int index = name.indexOf(":");</small><br>
<small> String key = index == -1 ? null :
name.substring(index + 1);</small><br>
<small> if
(!theQNamePrefixToNamespaceMap.containsKey(key)) </small><br>
<small> {</small><br>
<small> theQNamePrefixToNamespaceMap.put(key, value);</small><br>
<small> }</small><br>
<small> }</small><br>
<small> }</small><br>
<small> Node parent = currentElement.getParentNode(); </small><br>
<small> if (parent instanceof Element)</small><br>
<small> {</small><br>
<small> currentElement = (Element)parent;</small><br>
<small> }</small><br>
<small> else</small><br>
<small> {</small><br>
<small> break;</small><br>
<small> }</small><br>
<small> } </small><br>
</blockquote>
Maybe you could step through that and see why no prefix mappings are
being populated.<br>
<br>
<br>
Francis Upton wrote:
<blockquote cite="middhdqo7$jbk$1@news.eclipse.org" type="cite">Good
morning Ed,
<br>
<br>
I have resolved the first of the two exceptions. It was caused by
inconsistent xerces jar files from two different versions. Sorry about
troubling you for that, and my punishment is that my sloppyness will be
enshrined here for public view by future generations.
<br>
<br>
However, the 2nd NPE still remains (I copied the stack trace below this
message). In this case, it is trying to get the "schema for schema",
but in the schema being parsed, the qNamePrefixToNamespaceMap is empty,
but the schemaForSchemaQnamePrefix contains "xsd" which is what I would
expect.
<br>
<br>
java.lang.NullPointerException
<br>
at
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleNewB aseTypeDefinition(XSDComplexTypeDefinitionImpl.java:2046)
<br>
at
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2329)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
<br>
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
<br>
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
<br>
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
<br>
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
<br>
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
<br>
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
<br>
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
<br>
at
org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
<br>
at
org.eclipse.xsd.impl.XSDModelGroupImpl.adoptContent(XSDModel GroupImpl.java:693)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
<br>
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
<br>
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
<br>
at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
<br>
at
org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
<br>
at
org.eclipse.xsd.impl.XSDModelGroupImpl.handleReconciliation( XSDModelGroupImpl.java:657)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
<br>
at
org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
<br>
at
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.adoptConte nt(XSDComplexTypeDefinitionImpl.java:2600)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
<br>
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
<br>
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
<br>
at
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.setContent (XSDComplexTypeDefinitionImpl.java:758)
<br>
at
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2240)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
<br>
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
<br>
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
<br>
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
<br>
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
<br>
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
<br>
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
<br>
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
<br>
at
org.eclipse.xsd.impl.XSDSchemaImpl.adoptContent(XSDSchemaImp l.java:1763)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
<br>
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
<br>
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
<br>
at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
<br>
at
org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
<br>
at
org.eclipse.xsd.impl.XSDSchemaImpl.handleReconciliation(XSDS chemaImpl.java:1985)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.changeAttribut e(XSDConcreteComponentImpl.java:1246)
<br>
at
org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2318)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1219)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElementGen( XSDConcreteComponentImpl.java:2817)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElement(XSD ConcreteComponentImpl.java:2849)
<br>
at
org.eclipse.xsd.impl.XSDSchemaImpl.setElement(XSDSchemaImpl. java:2441)
<br>
at
org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:422)
<br>
at
org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:536)
<br>
at
org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:502)
<br>
at
org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:431)
<br>
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
<br>
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
<br>
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
<br>
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
<br>
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
<br>
at
com.oaklandsw.transform.rep.xml.XsdImportProcessor.importFro mFile(XsdImportProcessor.java:178)
<br>
at
com.oaklandsw.transform.rep.xml.XsdImporter.doImportSubclass (XsdImporter.java:42)
<br>
at
com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:338)
<br>
at
com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:322)
<br>
at
com.oaklandsw.transform.TransformTestBase.importXsdDefinitio n(TransformTestBase.java:1711)
<br>
at
com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1926)
<br>
at
com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1905)
<br>
at
com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1891)
<br>
at
com.oaklandsw.transform.XsdSimpleImportTest.testBasic(XsdSim pleImportTest.java:43)
<br>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
<br>
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
<br>
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
<br>
at java.lang.reflect.Method.invoke(Method.java:324)
<br>
at junit.framework.TestCase.runTest(TestCase.java:154)
<br>
at junit.framework.TestCase.runBare(TestCase.java:127)
<br>
at junit.framework.TestResult$1.protect(TestResult.java:106)
<br>
at junit.framework.TestResult.runProtected(TestResult.java:124)
<br>
at junit.framework.TestResult.run(TestResult.java:109)
<br>
at junit.framework.TestCase.run(TestCase.java:118)
<br>
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:478)
<br>
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:344)
<br>
at
org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:57)
<br>
at
org.eclipse.pde.internal.junit.runtime.UITestApplication$1.r un(UITestApplication.java:99)
<br>
at
org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
<br>
at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
<br>
at
org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2844)
<br>
at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2575)
<br>
at
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1699)
<br>
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
<br>
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:367)
<br>
at
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
<br>
at
com.oaklandsw.transform.editor.Editor.runEditor(Editor.java: 2111)
<br>
at
com.oaklandsw.transform.editor.Standalone.run(Standalone.jav a:72)
<br>
at
org.eclipse.pde.internal.junit.runtime.UITestApplication.run (UITestApplication.java:39)
<br>
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
<br>
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
<br>
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
<br>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
<br>
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
<br>
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
<br>
at java.lang.reflect.Method.invoke(Method.java:324)
<br>
at
org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
<br>
at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
<br>
at org.eclipse.core.launcher.Main.run(Main.java:973)
<br>
at org.eclipse.core.launcher.Main.main(Main.java:948)
<br>
<br>
<br>
<br>
<br>
<br>
<br>
Here is the XSD file (which has worked fine in the past):
<br>
<br>
<?xml version="1.0" encoding="UTF-8" ?>
<br>
<!--
<br>
simple xsd document
<br>
-->
<br>
<xsd:schema xmlns:xsd=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a>
<br>
targetNamespace=<a class="moz-txt-link-rfc2396E" href="http://www.publishing.org">"http://www.publishing.org"</a>
<br>
xmlns=<a class="moz-txt-link-rfc2396E" href="http://www.publishing.org">"http://www.publishing.org"</a>
<br>
elementFormDefault="qualified">
<br>
<xsd:element name="BookCatalogue">
<br>
<xsd:complexType>
<br>
<xsd:sequence>
<br>
<xsd:element name="Book"
minOccurs="1" maxOccurs="unbounded">
<br>
<xsd:complexType>
<br>
<xsd:sequence>
<br>
<xsd:element
name="Title" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<br>
<xsd:element
name="Author" type="xsd:string" minOccurs="1" maxOccurs="2"/>
<br>
<xsd:element
name="Date" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<br>
<!-- ISBN
element is optional for the sake of testing -->
<br>
<xsd:element
name="ISBN" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<br>
<xsd:element
name="Publisher" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<br>
</xsd:sequence>
<br>
</xsd:complexType>
<br>
</xsd:element>
<br>
</xsd:sequence>
<br>
</xsd:complexType>
<br>
</xsd:element>
<br>
</xsd:schema>
<br>
<br>
</blockquote>
<br>
</body>
</html>
--------------010901020603010302050600--
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: errors using XSD as plugin, UnknownHostException and NPE [message #596742 is a reply to message #64134] |
Wed, 28 September 2005 17:16 |
Francis Upton IV Messages: 472 Registered: July 2009 Location: Oakland, CA |
Senior Member |
|
|
Ed,
I have stepped through the code and the xmlns attribute is not present
in the Element. The element is of type
org.apache.xerces.dom.ElementNsImpl, and the namespace information is
provided in fields of that element.
I'm guessing this alteration of the element is caused by the:
http://xml.org/sax/features/namespaces feature of the Xerces parser,
which is by default set to true.
See: http://xml.apache.org/xerces2-j/features.html
How are the features controls for Xerces as used by the XSd stuff?
Francis
Ed Merks wrote:
> Francis,
>
> I can't duplicate this problem. The prefix map should have been
> populated by this code in XSDSchemaImpl.reconcileAttributes:
>
> Map theQNamePrefixToNamespaceMap = getQNamePrefixToNamespaceMap();
> theQNamePrefixToNamespaceMap.clear();
> for (Element currentElement = changedElement; currentElement
> != null; )
> {
> NamedNodeMap attributes = currentElement.getAttributes();
> for (int i = 0, size = attributes.getLength(); i < size; ++i)
> {
> Attr attr = (Attr)attributes.item(i);
> String name = attr.getNodeName();
> if (name.startsWith("xmlns"))
> {
> String value = attr.getNodeValue();
> int index = name.indexOf(":");
> String key = index == -1 ? null : name.substring(index
> + 1);
> if (!theQNamePrefixToNamespaceMap.containsKey(key))
> {
> theQNamePrefixToNamespaceMap.put(key, value);
> }
> }
> }
> Node parent = currentElement.getParentNode();
> if (parent instanceof Element)
> {
> currentElement = (Element)parent;
> }
> else
> {
> break;
> }
> }
>
> Maybe you could step through that and see why no prefix mappings are
> being populated.
>
>
> Francis Upton wrote:
>
>> Good morning Ed,
>>
>> I have resolved the first of the two exceptions. It was caused by
>> inconsistent xerces jar files from two different versions. Sorry
>> about troubling you for that, and my punishment is that my sloppyness
>> will be enshrined here for public view by future generations.
>>
>> However, the 2nd NPE still remains (I copied the stack trace below
>> this message). In this case, it is trying to get the "schema for
>> schema", but in the schema being parsed, the qNamePrefixToNamespaceMap
>> is empty, but the schemaForSchemaQnamePrefix contains "xsd" which is
>> what I would expect.
>>
>> java.lang.NullPointerException
>> at
>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleNewB aseTypeDefinition(XSDComplexTypeDefinitionImpl.java:2046)
>>
>> at
>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2329)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>
>> at
>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>
>> at
>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>
>> at
>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
>>
>> at
>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>
>> at
>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
>>
>> at
>> org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>
>> at
>> org.eclipse.xsd.impl.XSDModelGroupImpl.adoptContent(XSDModel GroupImpl.java:693)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
>>
>> at
>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
>>
>> at
>> org.eclipse.xsd.impl.XSDModelGroupImpl.handleReconciliation( XSDModelGroupImpl.java:657)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
>>
>> at
>> org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>
>> at
>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.adoptConte nt(XSDComplexTypeDefinitionImpl.java:2600)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>
>> at
>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.setContent (XSDComplexTypeDefinitionImpl.java:758)
>>
>> at
>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2240)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>
>> at
>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>
>> at
>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>
>> at
>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
>>
>> at
>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>
>> at
>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>
>> at
>> org.eclipse.xsd.impl.XSDSchemaImpl.adoptContent(XSDSchemaImp l.java:1763)
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
>>
>> at
>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
>>
>> at
>> org.eclipse.xsd.impl.XSDSchemaImpl.handleReconciliation(XSDS chemaImpl.java:1985)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.changeAttribut e(XSDConcreteComponentImpl.java:1246)
>>
>> at
>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2318)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1219)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElementGen( XSDConcreteComponentImpl.java:2817)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElement(XSD ConcreteComponentImpl.java:2849)
>>
>> at
>> org.eclipse.xsd.impl.XSDSchemaImpl.setElement(XSDSchemaImpl. java:2441)
>> at
>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:422)
>> at
>> org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:536)
>>
>> at
>> org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:502)
>>
>> at
>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:431)
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
>>
>> at
>> com.oaklandsw.transform.rep.xml.XsdImportProcessor.importFro mFile(XsdImportProcessor.java:178)
>>
>> at
>> com.oaklandsw.transform.rep.xml.XsdImporter.doImportSubclass (XsdImporter.java:42)
>>
>> at
>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:338)
>> at
>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:322)
>> at
>> com.oaklandsw.transform.TransformTestBase.importXsdDefinitio n(TransformTestBase.java:1711)
>>
>> at
>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1926)
>>
>> at
>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1905)
>>
>> at
>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1891)
>>
>> at
>> com.oaklandsw.transform.XsdSimpleImportTest.testBasic(XsdSim pleImportTest.java:43)
>>
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>
>> at java.lang.reflect.Method.invoke(Method.java:324)
>> at junit.framework.TestCase.runTest(TestCase.java:154)
>> at junit.framework.TestCase.runBare(TestCase.java:127)
>> at junit.framework.TestResult$1.protect(TestResult.java:106)
>> at junit.framework.TestResult.runProtected(TestResult.java:124)
>> at junit.framework.TestResult.run(TestResult.java:109)
>> at junit.framework.TestCase.run(TestCase.java:118)
>> at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:478)
>>
>> at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:344)
>>
>> at
>> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:57)
>>
>> at
>> org.eclipse.pde.internal.junit.runtime.UITestApplication$1.r un(UITestApplication.java:99)
>>
>> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
>> at
>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
>>
>> at
>> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2844)
>> at
>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2575)
>> at
>> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1699)
>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
>> at
>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:367)
>>
>> at
>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
>> at
>> com.oaklandsw.transform.editor.Editor.runEditor(Editor.java: 2111)
>> at
>> com.oaklandsw.transform.editor.Standalone.run(Standalone.jav a:72)
>> at
>> org.eclipse.pde.internal.junit.runtime.UITestApplication.run (UITestApplication.java:39)
>>
>> at
>> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
>>
>> at
>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
>>
>> at
>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
>>
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>
>> at java.lang.reflect.Method.invoke(Method.java:324)
>> at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
>> at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
>> at org.eclipse.core.launcher.Main.run(Main.java:973)
>> at org.eclipse.core.launcher.Main.main(Main.java:948)
>>
>>
>>
>>
>>
>>
>> Here is the XSD file (which has worked fine in the past):
>>
>> <?xml version="1.0" encoding="UTF-8" ?>
>> <!--
>> simple xsd document
>> -->
>> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>> targetNamespace="http://www.publishing.org"
>> xmlns="http://www.publishing.org"
>> elementFormDefault="qualified">
>> <xsd:element name="BookCatalogue">
>> <xsd:complexType>
>> <xsd:sequence>
>> <xsd:element name="Book"
>> minOccurs="1" maxOccurs="unbounded">
>> <xsd:complexType>
>> <xsd:sequence>
>> <xsd:element
>> name="Title" type="xsd:string" minOccurs="1" maxOccurs="1"/>
>> <xsd:element
>> name="Author" type="xsd:string" minOccurs="1" maxOccurs="2"/>
>> <xsd:element
>> name="Date" type="xsd:string" minOccurs="1" maxOccurs="1"/>
>> <!-- ISBN
>> element is optional for the sake of testing -->
>> <xsd:element
>> name="ISBN" type="xsd:string" minOccurs="0" maxOccurs="1"/>
>> <xsd:element
>> name="Publisher" type="xsd:string" minOccurs="1" maxOccurs="1"/>
>> </xsd:sequence>
>> </xsd:complexType>
>> </xsd:element>
>> </xsd:sequence>
>> </xsd:complexType>
>> </xsd:element>
>> </xsd:schema>
>>
>
Platform UI Committer for Common Navigator
http://wiki.eclipse.org/index.php/Common_Navigator_Framework
http://help.eclipse.org/galileo/topic/org.eclipse.platform.d oc.isv/guide/cnf.htm
|
|
|
Re: errors using XSD as plugin, UnknownHostException and NPE [message #596751 is a reply to message #64158] |
Wed, 28 September 2005 17:41 |
Francis Upton IV Messages: 472 Registered: July 2009 Location: Oakland, CA |
Senior Member |
|
|
Ed,
Ok, I found the problem. The SAX parser that is was using was the
ancient alfraed parser, not the Xerces one. I already had this code for
the DOM parser.
System.setProperty("javax.xml.parsers.DocumentBuilderFactory ",
"org.apache.xerces.jaxp.DocumentBuilderFactoryImpl");
I added this line for the SAX parser:
System.setProperty("javax.xml.parsers.SAXParserFactory",
"org.apache.xerces.jaxp.SAXParserFactoryImpl");
Thanks for your help.
Francis
Francis Upton wrote:
> Ed,
>
> I have stepped through the code and the xmlns attribute is not present
> in the Element. The element is of type
> org.apache.xerces.dom.ElementNsImpl, and the namespace information is
> provided in fields of that element.
>
> I'm guessing this alteration of the element is caused by the:
> http://xml.org/sax/features/namespaces feature of the Xerces parser,
> which is by default set to true.
>
> See: http://xml.apache.org/xerces2-j/features.html
>
> How are the features controls for Xerces as used by the XSd stuff?
>
> Francis
>
> Ed Merks wrote:
>
>> Francis,
>>
>> I can't duplicate this problem. The prefix map should have been
>> populated by this code in XSDSchemaImpl.reconcileAttributes:
>>
>> Map theQNamePrefixToNamespaceMap =
>> getQNamePrefixToNamespaceMap();
>> theQNamePrefixToNamespaceMap.clear();
>> for (Element currentElement = changedElement; currentElement
>> != null; )
>> {
>> NamedNodeMap attributes = currentElement.getAttributes();
>> for (int i = 0, size = attributes.getLength(); i < size; ++i)
>> {
>> Attr attr = (Attr)attributes.item(i);
>> String name = attr.getNodeName();
>> if (name.startsWith("xmlns"))
>> {
>> String value = attr.getNodeValue();
>> int index = name.indexOf(":");
>> String key = index == -1 ? null : name.substring(index
>> + 1);
>> if (!theQNamePrefixToNamespaceMap.containsKey(key))
>> {
>> theQNamePrefixToNamespaceMap.put(key, value);
>> }
>> }
>> }
>> Node parent = currentElement.getParentNode();
>> if (parent instanceof Element)
>> {
>> currentElement = (Element)parent;
>> }
>> else
>> {
>> break;
>> }
>> }
>>
>> Maybe you could step through that and see why no prefix mappings are
>> being populated.
>>
>>
>> Francis Upton wrote:
>>
>>> Good morning Ed,
>>>
>>> I have resolved the first of the two exceptions. It was caused by
>>> inconsistent xerces jar files from two different versions. Sorry
>>> about troubling you for that, and my punishment is that my sloppyness
>>> will be enshrined here for public view by future generations.
>>>
>>> However, the 2nd NPE still remains (I copied the stack trace below
>>> this message). In this case, it is trying to get the "schema for
>>> schema", but in the schema being parsed, the
>>> qNamePrefixToNamespaceMap is empty, but the
>>> schemaForSchemaQnamePrefix contains "xsd" which is what I would expect.
>>>
>>> java.lang.NullPointerException
>>> at
>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleNewB aseTypeDefinition(XSDComplexTypeDefinitionImpl.java:2046)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2329)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDModelGroupImpl.adoptContent(XSDModel GroupImpl.java:693)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
>>>
>>> at
>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDModelGroupImpl.handleReconciliation( XSDModelGroupImpl.java:657)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.adoptConte nt(XSDComplexTypeDefinitionImpl.java:2600)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.setContent (XSDComplexTypeDefinitionImpl.java:758)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2240)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.adoptContent(XSDSchemaImp l.java:1763)
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
>>>
>>> at
>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.handleReconciliation(XSDS chemaImpl.java:1985)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.changeAttribut e(XSDConcreteComponentImpl.java:1246)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2318)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1219)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElementGen( XSDConcreteComponentImpl.java:2817)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElement(XSD ConcreteComponentImpl.java:2849)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.setElement(XSDSchemaImpl. java:2441)
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:422)
>>> at
>>> org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:536)
>>>
>>> at
>>> org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:502)
>>>
>>> at
>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:431)
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
>>>
>>> at
>>> com.oaklandsw.transform.rep.xml.XsdImportProcessor.importFro mFile(XsdImportProcessor.java:178)
>>>
>>> at
>>> com.oaklandsw.transform.rep.xml.XsdImporter.doImportSubclass (XsdImporter.java:42)
>>>
>>> at
>>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:338)
>>> at
>>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:322)
>>> at
>>> com.oaklandsw.transform.TransformTestBase.importXsdDefinitio n(TransformTestBase.java:1711)
>>>
>>> at
>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1926)
>>>
>>> at
>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1905)
>>>
>>> at
>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1891)
>>>
>>> at
>>> com.oaklandsw.transform.XsdSimpleImportTest.testBasic(XsdSim pleImportTest.java:43)
>>>
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>
>>> at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>
>>> at java.lang.reflect.Method.invoke(Method.java:324)
>>> at junit.framework.TestCase.runTest(TestCase.java:154)
>>> at junit.framework.TestCase.runBare(TestCase.java:127)
>>> at junit.framework.TestResult$1.protect(TestResult.java:106)
>>> at junit.framework.TestResult.runProtected(TestResult.java:124)
>>> at junit.framework.TestResult.run(TestResult.java:109)
>>> at junit.framework.TestCase.run(TestCase.java:118)
>>> at
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:478)
>>>
>>> at
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:344)
>>>
>>> at
>>> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:57)
>>>
>>> at
>>> org.eclipse.pde.internal.junit.runtime.UITestApplication$1.r un(UITestApplication.java:99)
>>>
>>> at
>>> org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
>>> at
>>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
>>>
>>> at
>>> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2844)
>>> at
>>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2575)
>>> at
>>> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1699)
>>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
>>> at
>>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:367)
>>>
>>> at
>>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
>>> at
>>> com.oaklandsw.transform.editor.Editor.runEditor(Editor.java: 2111)
>>> at
>>> com.oaklandsw.transform.editor.Standalone.run(Standalone.jav a:72)
>>> at
>>> org.eclipse.pde.internal.junit.runtime.UITestApplication.run (UITestApplication.java:39)
>>>
>>> at
>>> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
>>>
>>> at
>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
>>>
>>> at
>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
>>>
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>
>>> at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>
>>> at java.lang.reflect.Method.invoke(Method.java:324)
>>> at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
>>> at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
>>> at org.eclipse.core.launcher.Main.run(Main.java:973)
>>> at org.eclipse.core.launcher.Main.main(Main.java:948)
>>>
>>>
>>>
>>>
>>>
>>>
>>> Here is the XSD file (which has worked fine in the past):
>>>
>>> <?xml version="1.0" encoding="UTF-8" ?>
>>> <!--
>>> simple xsd document
>>> -->
>>> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>>> targetNamespace="http://www.publishing.org"
>>> xmlns="http://www.publishing.org"
>>> elementFormDefault="qualified">
>>> <xsd:element name="BookCatalogue">
>>> <xsd:complexType>
>>> <xsd:sequence>
>>> <xsd:element name="Book"
>>> minOccurs="1" maxOccurs="unbounded">
>>> <xsd:complexType>
>>> <xsd:sequence>
>>> <xsd:element
>>> name="Title" type="xsd:string" minOccurs="1" maxOccurs="1"/>
>>> <xsd:element
>>> name="Author" type="xsd:string" minOccurs="1" maxOccurs="2"/>
>>> <xsd:element
>>> name="Date" type="xsd:string" minOccurs="1" maxOccurs="1"/>
>>> <!-- ISBN
>>> element is optional for the sake of testing -->
>>> <xsd:element
>>> name="ISBN" type="xsd:string" minOccurs="0" maxOccurs="1"/>
>>> <xsd:element
>>> name="Publisher" type="xsd:string" minOccurs="1" maxOccurs="1"/>
>>> </xsd:sequence>
>>> </xsd:complexType>
>>> </xsd:element>
>>> </xsd:sequence>
>>> </xsd:complexType>
>>> </xsd:element>
>>> </xsd:schema>
>>>
>>
Platform UI Committer for Common Navigator
http://wiki.eclipse.org/index.php/Common_Navigator_Framework
http://help.eclipse.org/galileo/topic/org.eclipse.platform.d oc.isv/guide/cnf.htm
|
|
|
Re: errors using XSD as plugin, UnknownHostException and NPE [message #596759 is a reply to message #64158] |
Wed, 28 September 2005 18:28 |
Ed Merks Messages: 33264 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
--------------010502000104010207030106
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Francis,
Yes, it sounds like a namespace awareness problem.
XSDParser.createDocument is used to create new Documents.
public static Document createDocument()
{
try
{
DocumentBuilderFactory documentBuilderFactory =
DocumentBuilderFactory.newInstance();
documentBuilderFactory.setNamespaceAware(true);
documentBuilderFactory.setValidating(false);
DocumentBuilder documentBuilder =
documentBuilderFactory.newDocumentBuilder();
return documentBuilder.newDocument();
}
catch (ParserConfigurationException exception)
{
XSDPlugin.INSTANCE.log(exception);
return null;
}
}
Or the XSDResourceImpl does it directly:
protected static Document getDocument(InputSource inputSource,
ErrorHandler errorHandler) throws IOException
{
try
{
DocumentBuilderFactory documentBuilderFactory =
DocumentBuilderFactory.newInstance();
documentBuilderFactory.setNamespaceAware(true);
documentBuilderFactory.setValidating(false);
DocumentBuilder documentBuilder =
documentBuilderFactory.newDocumentBuilder();
// Create a catalog with an entity mapping URL for the cached
DTD for XML Schemas and set to into the build.
//
EntityResolver entityResolver = createEntityResolver();
documentBuilder.setEntityResolver(entityResolver);
documentBuilder.setErrorHandler(errorHandler);
Document document = documentBuilder.parse(inputSource);
return document;
}
catch (ParserConfigurationException exception)
{
throw new IOWrappedException(exception);
}
catch (SAXException exception)
{
throw new IOWrappedException(exception);
}
}
Francis Upton wrote:
> Ed,
>
> I have stepped through the code and the xmlns attribute is not present
> in the Element. The element is of type
> org.apache.xerces.dom.ElementNsImpl, and the namespace information is
> provided in fields of that element.
>
> I'm guessing this alteration of the element is caused by the:
> http://xml.org/sax/features/namespaces feature of the Xerces parser,
> which is by default set to true.
>
> See: http://xml.apache.org/xerces2-j/features.html
>
> How are the features controls for Xerces as used by the XSd stuff?
>
> Francis
>
> Ed Merks wrote:
>
>> Francis,
>>
>> I can't duplicate this problem. The prefix map should have been
>> populated by this code in XSDSchemaImpl.reconcileAttributes:
>>
>> Map theQNamePrefixToNamespaceMap =
>> getQNamePrefixToNamespaceMap();
>> theQNamePrefixToNamespaceMap.clear();
>> for (Element currentElement = changedElement; currentElement
>> != null; )
>> {
>> NamedNodeMap attributes = currentElement.getAttributes();
>> for (int i = 0, size = attributes.getLength(); i < size;
>> ++i)
>> {
>> Attr attr = (Attr)attributes.item(i);
>> String name = attr.getNodeName();
>> if (name.startsWith("xmlns"))
>> {
>> String value = attr.getNodeValue();
>> int index = name.indexOf(":");
>> String key = index == -1 ? null : name.substring(index
>> + 1);
>> if (!theQNamePrefixToNamespaceMap.containsKey(key))
>> {
>> theQNamePrefixToNamespaceMap.put(key, value);
>> }
>> }
>> }
>> Node parent = currentElement.getParentNode();
>> if (parent instanceof Element)
>> {
>> currentElement = (Element)parent;
>> }
>> else
>> {
>> break;
>> }
>> }
>>
>> Maybe you could step through that and see why no prefix mappings are
>> being populated.
>>
>>
>> Francis Upton wrote:
>>
>>> Good morning Ed,
>>>
>>> I have resolved the first of the two exceptions. It was caused by
>>> inconsistent xerces jar files from two different versions. Sorry
>>> about troubling you for that, and my punishment is that my
>>> sloppyness will be enshrined here for public view by future
>>> generations.
>>>
>>> However, the 2nd NPE still remains (I copied the stack trace below
>>> this message). In this case, it is trying to get the "schema for
>>> schema", but in the schema being parsed, the
>>> qNamePrefixToNamespaceMap is empty, but the
>>> schemaForSchemaQnamePrefix contains "xsd" which is what I would expect.
>>>
>>> java.lang.NullPointerException
>>> at
>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleNewB aseTypeDefinition(XSDComplexTypeDefinitionImpl.java:2046)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2329)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDModelGroupImpl.adoptContent(XSDModel GroupImpl.java:693)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
>>>
>>> at
>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDModelGroupImpl.handleReconciliation( XSDModelGroupImpl.java:657)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.adoptConte nt(XSDComplexTypeDefinitionImpl.java:2600)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.setContent (XSDComplexTypeDefinitionImpl.java:758)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2240)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.adoptContent(XSDSchemaImp l.java:1763)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>
>>> at
>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
>>>
>>> at
>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.handleReconciliation(XSDS chemaImpl.java:1985)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.changeAttribut e(XSDConcreteComponentImpl.java:1246)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2318)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1219)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElementGen( XSDConcreteComponentImpl.java:2817)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElement(XSD ConcreteComponentImpl.java:2849)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.setElement(XSDSchemaImpl. java:2441)
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:422)
>>> at
>>> org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:536)
>>>
>>> at
>>> org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:502)
>>>
>>> at
>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:431)
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
>>>
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
>>>
>>> at
>>> com.oaklandsw.transform.rep.xml.XsdImportProcessor.importFro mFile(XsdImportProcessor.java:178)
>>>
>>> at
>>> com.oaklandsw.transform.rep.xml.XsdImporter.doImportSubclass (XsdImporter.java:42)
>>>
>>> at
>>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:338)
>>> at
>>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:322)
>>> at
>>> com.oaklandsw.transform.TransformTestBase.importXsdDefinitio n(TransformTestBase.java:1711)
>>>
>>> at
>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1926)
>>>
>>> at
>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1905)
>>>
>>> at
>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1891)
>>>
>>> at
>>> com.oaklandsw.transform.XsdSimpleImportTest.testBasic(XsdSim pleImportTest.java:43)
>>>
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>
>>> at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>
>>> at java.lang.reflect.Method.invoke(Method.java:324)
>>> at junit.framework.TestCase.runTest(TestCase.java:154)
>>> at junit.framework.TestCase.runBare(TestCase.java:127)
>>> at junit.framework.TestResult$1.protect(TestResult.java:106)
>>> at junit.framework.TestResult.runProtected(TestResult.java:124)
>>> at junit.framework.TestResult.run(TestResult.java:109)
>>> at junit.framework.TestCase.run(TestCase.java:118)
>>> at
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:478)
>>>
>>> at
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:344)
>>>
>>> at
>>> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:57)
>>>
>>> at
>>> org.eclipse.pde.internal.junit.runtime.UITestApplication$1.r un(UITestApplication.java:99)
>>>
>>> at
>>> org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
>>> at
>>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
>>>
>>> at
>>> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2844)
>>> at
>>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2575)
>>> at
>>> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1699)
>>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
>>> at
>>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:367)
>>>
>>> at
>>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
>>> at
>>> com.oaklandsw.transform.editor.Editor.runEditor(Editor.java: 2111)
>>> at
>>> com.oaklandsw.transform.editor.Standalone.run(Standalone.jav a:72)
>>> at
>>> org.eclipse.pde.internal.junit.runtime.UITestApplication.run (UITestApplication.java:39)
>>>
>>> at
>>> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
>>>
>>> at
>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
>>>
>>> at
>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
>>>
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>
>>> at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>
>>> at java.lang.reflect.Method.invoke(Method.java:324)
>>> at
>>> org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
>>> at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
>>> at org.eclipse.core.launcher.Main.run(Main.java:973)
>>> at org.eclipse.core.launcher.Main.main(Main.java:948)
>>>
>>>
>>>
>>>
>>>
>>>
>>> Here is the XSD file (which has worked fine in the past):
>>>
>>> <?xml version="1.0" encoding="UTF-8" ?>
>>> <!--
>>> simple xsd document
>>> -->
>>> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>>> targetNamespace="http://www.publishing.org"
>>> xmlns="http://www.publishing.org"
>>> elementFormDefault="qualified">
>>> <xsd:element name="BookCatalogue">
>>> <xsd:complexType>
>>> <xsd:sequence>
>>> <xsd:element name="Book"
>>> minOccurs="1" maxOccurs="unbounded">
>>> <xsd:complexType>
>>> <xsd:sequence>
>>> <xsd:element
>>> name="Title" type="xsd:string" minOccurs="1" maxOccurs="1"/>
>>> <xsd:element
>>> name="Author" type="xsd:string" minOccurs="1" maxOccurs="2"/>
>>> <xsd:element
>>> name="Date" type="xsd:string" minOccurs="1" maxOccurs="1"/>
>>> <!-- ISBN
>>> element is optional for the sake of testing -->
>>> <xsd:element
>>> name="ISBN" type="xsd:string" minOccurs="0" maxOccurs="1"/>
>>> <xsd:element
>>> name="Publisher" type="xsd:string" minOccurs="1" maxOccurs="1"/>
>>> </xsd:sequence>
>>> </xsd:complexType>
>>> </xsd:element>
>>> </xsd:sequence>
>>> </xsd:complexType>
>>> </xsd:element>
>>> </xsd:schema>
>>>
>>
--------------010502000104010207030106
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Francis,<br>
<br>
Yes, it sounds like a namespace awareness problem.
XSDParser.createDocument is used to create new Documents.<br>
<blockquote><small> public static Document createDocument()<br>
{<br>
try<br>
{<br>
DocumentBuilderFactory documentBuilderFactory =
DocumentBuilderFactory.newInstance();<br>
documentBuilderFactory.setNamespaceAware(true);<br>
documentBuilderFactory.setValidating(false);<br>
DocumentBuilder documentBuilder =
documentBuilderFactory.newDocumentBuilder();<br>
return documentBuilder.newDocument();<br>
}<br>
catch (ParserConfigurationException exception)<br>
{<br>
XSDPlugin.INSTANCE.log(exception);<br>
return null;<br>
}<br>
}</small><br>
</blockquote>
Or the XSDResourceImpl does it directly:<br>
<blockquote><small> protected static Document getDocument(InputSource
inputSource, ErrorHandler errorHandler) throws IOException</small><br>
<small> {</small><br>
<small> try</small><br>
<small> {</small><br>
<small> DocumentBuilderFactory documentBuilderFactory =
DocumentBuilderFactory.newInstance();</small><br>
<small> documentBuilderFactory.setNamespaceAware(true);</small><br >
<small> documentBuilderFactory.setValidating(false);</small><br>
<br>
<small> DocumentBuilder documentBuilder =
documentBuilderFactory.newDocumentBuilder();</small><br>
<small> </small><br>
<small> // Create a catalog with an entity mapping URL for the
cached DTD for XML Schemas and set to into the build.</small><br>
<small> //</small><br>
<small> EntityResolver entityResolver = createEntityResolver();</small><br>
<small> documentBuilder.setEntityResolver(entityResolver);</small><br >
<br>
<small> documentBuilder.setErrorHandler(errorHandler);</small><br>
<br>
<small> Document document = documentBuilder.parse(inputSource);</small><br>
<small> return document;</small><br>
<small> }</small><br>
<small> catch (ParserConfigurationException exception)</small><br>
<small> {</small><br>
<small> throw new IOWrappedException(exception);</small><br>
<small> }</small><br>
<small> catch (SAXException exception)</small><br>
<small> {</small><br>
<small> throw new IOWrappedException(exception);</small><br>
<small> }</small><br>
<small> }</small><br>
</blockquote>
<br>
Francis Upton wrote:
<blockquote cite="middhej65$pmd$1@news.eclipse.org" type="cite">Ed,
<br>
<br>
I have stepped through the code and the xmlns attribute is not present
in the Element. The element is of type
org.apache.xerces.dom.ElementNsImpl, and the namespace information is
provided in fields of that element.
<br>
<br>
I'm guessing this alteration of the element is caused by the:
<br>
<a class="moz-txt-link-freetext" href="http://xml.org/sax/features/namespaces">http://xml.org/sax/features/namespaces</a> feature of the Xerces parser,
which is by default set to true.
<br>
<br>
See: <a class="moz-txt-link-freetext" href="http://xml.apache.org/xerces2-j/features.html">http://xml.apache.org/xerces2-j/features.html</a>
<br>
<br>
How are the features controls for Xerces as used by the XSd stuff?
<br>
<br>
Francis
<br>
<br>
Ed Merks wrote:
<br>
<blockquote type="cite">Francis,
<br>
<br>
I can't duplicate this problem. The prefix map should have been
populated by this code in XSDSchemaImpl.reconcileAttributes:
<br>
<br>
Map theQNamePrefixToNamespaceMap =
getQNamePrefixToNamespaceMap();
<br>
theQNamePrefixToNamespaceMap.clear();
<br>
for (Element currentElement = changedElement; currentElement
<br>
!= null; )
<br>
{
<br>
NamedNodeMap attributes = currentElement.getAttributes();
<br>
for (int i = 0, size = attributes.getLength(); i < size;
++i)
<br>
{
<br>
Attr attr = (Attr)attributes.item(i);
<br>
String name = attr.getNodeName();
<br>
if (name.startsWith("xmlns"))
<br>
{
<br>
String value = attr.getNodeValue();
<br>
int index = name.indexOf(":");
<br>
String key = index == -1 ? null : name.substring(index
<br>
+ 1);
<br>
if (!theQNamePrefixToNamespaceMap.containsKey(key))
<br>
{
<br>
theQNamePrefixToNamespaceMap.put(key, value);
<br>
}
<br>
}
<br>
}
<br>
Node parent = currentElement.getParentNode();
<br>
if (parent instanceof Element)
<br>
{
<br>
currentElement = (Element)parent;
<br>
}
<br>
else
<br>
{
<br>
break;
<br>
}
<br>
}
<br>
<br>
Maybe you could step through that and see why no prefix mappings are
being populated.
<br>
<br>
<br>
Francis Upton wrote:
<br>
<br>
<blockquote type="cite">Good morning Ed,
<br>
<br>
I have resolved the first of the two exceptions. It was caused by
inconsistent xerces jar files from two different versions. Sorry about
troubling you for that, and my punishment is that my sloppyness will be
enshrined here for public view by future generations.
<br>
<br>
However, the 2nd NPE still remains (I copied the stack trace below this
message). In this case, it is trying to get the "schema for schema",
but in the schema being parsed, the qNamePrefixToNamespaceMap is empty,
but the schemaForSchemaQnamePrefix contains "xsd" which is what I would
expect.
<br>
<br>
java.lang.NullPointerException
<br>
at
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleNewB aseTypeDefinition(XSDComplexTypeDefinitionImpl.java:2046)
<br>
at
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2329)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
<br>
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
<br>
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
<br>
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
<br>
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
<br>
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
<br>
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
<br>
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
<br>
at
org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
<br>
at
org.eclipse.xsd.impl.XSDModelGroupImpl.adoptContent(XSDModel GroupImpl.java:693)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
<br>
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
<br>
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
<br>
at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
<br>
at
org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
<br>
at
org.eclipse.xsd.impl.XSDModelGroupImpl.handleReconciliation( XSDModelGroupImpl.java:657)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
<br>
at
org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
<br>
at
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.adoptConte nt(XSDComplexTypeDefinitionImpl.java:2600)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
<br>
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
<br>
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
<br>
at
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.setContent (XSDComplexTypeDefinitionImpl.java:758)
<br>
at
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2240)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
<br>
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
<br>
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
<br>
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
<br>
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
<br>
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
<br>
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
<br>
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
<br>
at
org.eclipse.xsd.impl.XSDSchemaImpl.adoptContent(XSDSchemaImp l.java:1763)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
<br>
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
<br>
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
<br>
at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
<br>
at
org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
<br>
at
org.eclipse.xsd.impl.XSDSchemaImpl.handleReconciliation(XSDS chemaImpl.java:1985)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.changeAttribut e(XSDConcreteComponentImpl.java:1246)
<br>
at
org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2318)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1219)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElementGen( XSDConcreteComponentImpl.java:2817)
<br>
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElement(XSD ConcreteComponentImpl.java:2849)
<br>
at
org.eclipse.xsd.impl.XSDSchemaImpl.setElement(XSDSchemaImpl. java:2441)
<br>
at
org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:422)
<br>
at
org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:536)
<br>
at
org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:502)
<br>
at
org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:431)
<br>
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
<br>
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
<br>
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
<br>
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
<br>
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
<br>
at
com.oaklandsw.transform.rep.xml.XsdImportProcessor.importFro mFile(XsdImportProcessor.java:178)
<br>
at
com.oaklandsw.transform.rep.xml.XsdImporter.doImportSubclass (XsdImporter.java:42)
<br>
at
com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:338)
<br>
at
com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:322)
<br>
at
com.oaklandsw.transform.TransformTestBase.importXsdDefinitio n(TransformTestBase.java:1711)
<br>
at
com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1926)
<br>
at
com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1905)
<br>
at
com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1891)
<br>
at
com.oaklandsw.transform.XsdSimpleImportTest.testBasic(XsdSim pleImportTest.java:43)
<br>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
<br>
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
<br>
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
<br>
at java.lang.reflect.Method.invoke(Method.java:324)
<br>
at junit.framework.TestCase.runTest(TestCase.java:154)
<br>
at junit.framework.TestCase.runBare(TestCase.java:127)
<br>
at junit.framework.TestResult$1.protect(TestResult.java:106)
<br>
at junit.framework.TestResult.runProtected(TestResult.java:124)
<br>
at junit.framework.TestResult.run(TestResult.java:109)
<br>
at junit.framework.TestCase.run(TestCase.java:118)
<br>
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:478)
<br>
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:344)
<br>
at
org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:57)
<br>
at
org.eclipse.pde.internal.junit.runtime.UITestApplication$1.r un(UITestApplication.java:99)
<br>
at
org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
<br>
at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
<br>
at
org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2844)
<br>
at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2575)
<br>
at
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1699)
<br>
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
<br>
at
o
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: errors using XSD as plugin, UnknownHostException and NPE [message #596769 is a reply to message #64184] |
Wed, 28 September 2005 18:44 |
Ed Merks Messages: 33264 Registered: July 2009 |
Senior Member |
|
|
Francis,
I'm glad to hear it's working. I should have hit send on my other note
before I went to a meeting. ;-)
Francis Upton wrote:
> Ed,
>
> Ok, I found the problem. The SAX parser that is was using was the
> ancient alfraed parser, not the Xerces one. I already had this code
> for the DOM parser.
>
> System.setProperty("javax.xml.parsers.DocumentBuilderFactory ",
>
> "org.apache.xerces.jaxp.DocumentBuilderFactoryImpl");
>
>
> I added this line for the SAX parser:
>
> System.setProperty("javax.xml.parsers.SAXParserFactory",
>
> "org.apache.xerces.jaxp.SAXParserFactoryImpl");
>
>
>
> Thanks for your help.
>
> Francis
>
> Francis Upton wrote:
>
>> Ed,
>>
>> I have stepped through the code and the xmlns attribute is not
>> present in the Element. The element is of type
>> org.apache.xerces.dom.ElementNsImpl, and the namespace information is
>> provided in fields of that element.
>>
>> I'm guessing this alteration of the element is caused by the:
>> http://xml.org/sax/features/namespaces feature of the Xerces parser,
>> which is by default set to true.
>>
>> See: http://xml.apache.org/xerces2-j/features.html
>>
>> How are the features controls for Xerces as used by the XSd stuff?
>>
>> Francis
>>
>> Ed Merks wrote:
>>
>>> Francis,
>>>
>>> I can't duplicate this problem. The prefix map should have been
>>> populated by this code in XSDSchemaImpl.reconcileAttributes:
>>>
>>> Map theQNamePrefixToNamespaceMap =
>>> getQNamePrefixToNamespaceMap();
>>> theQNamePrefixToNamespaceMap.clear();
>>> for (Element currentElement = changedElement; currentElement
>>> != null; )
>>> {
>>> NamedNodeMap attributes = currentElement.getAttributes();
>>> for (int i = 0, size = attributes.getLength(); i < size;
>>> ++i)
>>> {
>>> Attr attr = (Attr)attributes.item(i);
>>> String name = attr.getNodeName();
>>> if (name.startsWith("xmlns"))
>>> {
>>> String value = attr.getNodeValue();
>>> int index = name.indexOf(":");
>>> String key = index == -1 ? null : name.substring(index
>>> + 1);
>>> if (!theQNamePrefixToNamespaceMap.containsKey(key))
>>> {
>>> theQNamePrefixToNamespaceMap.put(key, value);
>>> }
>>> }
>>> }
>>> Node parent = currentElement.getParentNode();
>>> if (parent instanceof Element)
>>> {
>>> currentElement = (Element)parent;
>>> }
>>> else
>>> {
>>> break;
>>> }
>>> }
>>>
>>> Maybe you could step through that and see why no prefix mappings are
>>> being populated.
>>>
>>>
>>> Francis Upton wrote:
>>>
>>>> Good morning Ed,
>>>>
>>>> I have resolved the first of the two exceptions. It was caused by
>>>> inconsistent xerces jar files from two different versions. Sorry
>>>> about troubling you for that, and my punishment is that my
>>>> sloppyness will be enshrined here for public view by future
>>>> generations.
>>>>
>>>> However, the 2nd NPE still remains (I copied the stack trace below
>>>> this message). In this case, it is trying to get the "schema for
>>>> schema", but in the schema being parsed, the
>>>> qNamePrefixToNamespaceMap is empty, but the
>>>> schemaForSchemaQnamePrefix contains "xsd" which is what I would
>>>> expect.
>>>>
>>>> java.lang.NullPointerException
>>>> at
>>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleNewB aseTypeDefinition(XSDComplexTypeDefinitionImpl.java:2046)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2329)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDModelGroupImpl.adoptContent(XSDModel GroupImpl.java:693)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
>>>>
>>>> at
>>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDModelGroupImpl.handleReconciliation( XSDModelGroupImpl.java:657)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementContent sChanged(XSDConcreteComponentImpl.java:473)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDParticleImpl.reconcileContents(XSDPa rticleImpl.java:664)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.adoptConte nt(XSDComplexTypeDefinitionImpl.java:2600)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.setContent (XSDComplexTypeDefinitionImpl.java:758)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.handleReco nciliation(XSDComplexTypeDefinitionImpl.java:2240)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.adoptContent( XSDElementDeclarationImpl.java:1456)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1182)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.eNotify(XSDEl ementDeclarationImpl.java:1380)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.setAnonymousT ypeDefinition(XSDElementDeclarationImpl.java:1765)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.handleReconci liation(XSDElementDeclarationImpl.java:1229)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.reconcileCont ents(XSDElementDeclarationImpl.java:1175)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.elementChanged (XSDConcreteComponentImpl.java:411)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.adoptContent(X SDConcreteComponentImpl.java:1360)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.adoptContent(XSDSchemaImp l.java:1763)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1139)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:113)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dis patch(NotificationChainImpl.java:101)
>>>>
>>>> at
>>>> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
>>>>
>>>> at
>>>> org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 99)
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setListContent AndOrder(XSDConcreteComponentImpl.java:2094)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.handleReconciliation(XSDS chemaImpl.java:1985)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcileConte nts(XSDConcreteComponentImpl.java:1032)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.reconcile(XSDC oncreteComponentImpl.java:966)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.changeAttribut e(XSDConcreteComponentImpl.java:1246)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2318)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1219)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElementGen( XSDConcreteComponentImpl.java:2817)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.setElement(XSD ConcreteComponentImpl.java:2849)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.setElement(XSDSchemaImpl. java:2441)
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.createSchema(XSDSchemaImp l.java:422)
>>>>
>>>> at
>>>> org.eclipse.xsd.util.XSDResourceImpl.handleSchemaElement(XSD ResourceImpl.java:536)
>>>>
>>>> at
>>>> org.eclipse.xsd.util.XSDResourceImpl.findSchemas(XSDResource Impl.java:502)
>>>>
>>>> at
>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:431)
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:977)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:832)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
>>>>
>>>> at
>>>> com.oaklandsw.transform.rep.xml.XsdImportProcessor.importFro mFile(XsdImportProcessor.java:178)
>>>>
>>>> at
>>>> com.oaklandsw.transform.rep.xml.XsdImporter.doImportSubclass (XsdImporter.java:42)
>>>>
>>>> at
>>>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:338)
>>>> at
>>>> com.oaklandsw.transform.editor.Importer.doImport(Importer.ja va:322)
>>>> at
>>>> com.oaklandsw.transform.TransformTestBase.importXsdDefinitio n(TransformTestBase.java:1711)
>>>>
>>>> at
>>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1926)
>>>>
>>>> at
>>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1905)
>>>>
>>>> at
>>>> com.oaklandsw.transform.TransformTestBase.testXsdImport(Tran sformTestBase.java:1891)
>>>>
>>>> at
>>>> com.oaklandsw.transform.XsdSimpleImportTest.testBasic(XsdSim pleImportTest.java:43)
>>>>
>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>> at
>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>>
>>>> at
>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>>
>>>> at java.lang.reflect.Method.invoke(Method.java:324)
>>>> at junit.framework.TestCase.runTest(TestCase.java:154)
>>>> at junit.framework.TestCase.runBare(TestCase.java:127)
>>>> at junit.framework.TestResult$1.protect(TestResult.java:106)
>>>> at
>>>> junit.framework.TestResult.runProtected(TestResult.java:124)
>>>> at junit.framework.TestResult.run(TestResult.java:109)
>>>> at junit.framework.TestCase.run(TestCase.java:118)
>>>> at
>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:478)
>>>>
>>>> at
>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:344)
>>>>
>>>> at
>>>> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:57)
>>>>
>>>> at
>>>> org.eclipse.pde.internal.junit.runtime.UITestApplication$1.r un(UITestApplication.java:99)
>>>>
>>>> at
>>>> org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
>>>> at
>>>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
>>>>
>>>> at
>>>> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2844)
>>>> at
>>>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2575)
>>>> at
>>>> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1699)
>>>> at
>>>> org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
>>>> at
>>>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:367)
>>>>
>>>> at
>>>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
>>>> at
>>>> com.oaklandsw.transform.editor.Editor.runEditor(Editor.java: 2111)
>>>> at
>>>> com.oaklandsw.transform.editor.Standalone.run(Standalone.jav a:72)
>>>> at
>>>> org.eclipse.pde.internal.junit.runtime.UITestApplication.run (UITestApplication.java:39)
>>>>
>>>> at
>>>> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
>>>>
>>>> at
>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
>>>>
>>>> at
>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
>>>>
>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>> at
>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>>>>
>>>> at
>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>>>>
>>>> at java.lang.reflect.Method.invoke(Method.java:324)
>>>> at
>>>> org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
>>>> at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
>>>> at org.eclipse.core.launcher.Main.run(Main.java:973)
>>>> at org.eclipse.core.launcher.Main.main(Main.java:948)
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Here is the XSD file (which has worked fine in the past):
>>>>
>>>> <?xml version="1.0" encoding="UTF-8" ?>
>>>> <!--
>>>> simple xsd document
>>>> -->
>>>> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>>>> targetNamespace="http://www.publishing.org"
>>>> xmlns="http://www.publishing.org"
>>>> elementFormDefault="qualified">
>>>> <xsd:element name="BookCatalogue">
>>>> <xsd:complexType>
>>>> <xsd:sequence>
>>>> <xsd:element name="Book"
>>>> minOccurs="1" maxOccurs="unbounded">
>>>> <xsd:complexType>
>>>> <xsd:sequence>
>>>>
>>>> <xsd:element name="Title" type="xsd:string" minOccurs="1"
>>>> maxOccurs="1"/>
>>>>
>>>> <xsd:element name="Author" type="xsd:string" minOccurs="1"
>>>> maxOccurs="2"/>
>>>>
>>>> <xsd:element name="Date" type="xsd:string" minOccurs="1"
>>>> maxOccurs="1"/>
>>>> <!-- ISBN
>>>> element is optional for the sake of testing -->
>>>>
>>>> <xsd:element name="ISBN" type="xsd:string" minOccurs="0"
>>>> maxOccurs="1"/>
>>>>
>>>> <xsd:element name="Publisher" type="xsd:string" minOccurs="1"
>>>> maxOccurs="1"/>
>>>> </xsd:sequence>
>>>> </xsd:complexType>
>>>> </xsd:element>
>>>> </xsd:sequence>
>>>> </xsd:complexType>
>>>> </xsd:element>
>>>> </xsd:schema>
>>>>
>>>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Goto Forum:
Current Time: Mon Dec 30 16:29:58 GMT 2024
Powered by FUDForum. Page generated in 0.06896 seconds
|