[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[eclipse-dev] XML Parsing In an Eclipse 3.0 Plugin
|
Hello,
I am trying to implement a plugin that utilizes JAXP in J2SE 1.4. I
need to validate the XML using XML Schema. I am using the method
defined on sun's website
"http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JAXPDOM8.html".
In order to run a stand-alone application which utilizes XML Schema in
the way sun defines I needed to use Xercese 2.6 and utilize the
"-
Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.Documen
tBuilderFactoryImpl" JVM argument. When I run an eclipse workbench
using the same code, with all xercese jars added and the document
builder factory argument set, the runtime workbench crashes and the
following exception is generated:
!SESSION Jan 20, 2004 21:31:07.999
---------------------------------------------
java.version=1.4.1_01
java.vendor=Apple Computer, Inc.
BootLoader constants: OS=macosx, ARCH=ppc, WS=carbon, NL=en_US
Command-line arguments: -pdelaunch -dev bin -os macosx -ws carbon -arch
ppc -nl en_US
!ENTRY org.eclipse.core.runtime 4 13 Jan 20, 2004 21:31:08.01
!MESSAGE Unable to locate application extension: null
!STACK 0
java.lang.RuntimeException: Unable to locate application extension: null
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActiva
tor.java:205)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:
85)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.eclipse.core.launcher.Main.basicRun(Main.java:279)
at org.eclipse.core.launcher.Main.run(Main.java:742)
at org.eclipse.core.launcher.Main.main(Main.java:581)
If I don't include the document parser factory flag, then I receive the
following exception :
java.lang.IllegalArgumentException: No attributes are implemented
at
org.apache.crimson.jaxp.DocumentBuilderFactoryImpl.setAttribute(Document
BuilderFactoryImpl.java:93)
.
.
.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorA
ccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCons
tructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:306)
at java.lang.Class.newInstance(Class.java:259)
at
org.eclipse.core.internal.registry.ConfigurationElement.createExecutable
Extension(ConfigurationElement.java:143)
at
org.eclipse.core.internal.registry.ConfigurationElement.createExecutable
Extension(ConfigurationElement.java:125)
at
org.eclipse.core.internal.registry.ConfigurationElement.createExecutable
Extension(ConfigurationElement.java:114)
at
org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.
java:153)
at
org.eclipse.ui.internal.dialogs.WorkbenchWizardElement.createExecutableE
xtension(WorkbenchWizardElement.java:96)
at
org.eclipse.ui.internal.ide.NewWizardShortcutAction.run(NewWizardShortcu
tAction.java:67)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:842)
at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(Ac
tionContributionItem.java:509)
at
org.eclipse.jface.action.ActionContributionItem.access$2(ActionContribut
ionItem.java:461)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionCont
ributionItem.java:408)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1050)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2202)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1914)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1506)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1482)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:
246)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:139)
at
org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:47)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActiva
tor.java:226)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:
85)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.eclipse.core.launcher.Main.basicRun(Main.java:279)
at org.eclipse.core.launcher.Main.run(Main.java:742)
at org.eclipse.core.launcher.Main.main(Main.java:581)
The three attributes in question seem to be:
http://java.sun.com/xml/jaxp/properties/schemaLanguage
http://www.w3.org/2001/XMLSchema
http://java.sun.com/xml/jaxp/properties/schemaSource
If the IBM version of Xercese is the only version that is available, is
there a way to utilize it to check schema? If not, is there an
alternative JAXP compatible parser that will run inside of eclipse?
Your help is greatly appreciated.
------------------------------------------------------------------------
--------------------------
Marc Boorshtein
Software Engineer, Octet String
marc.boorshtein@xxxxxxxxxxxxxxx