Class org/w3c/dom/traversal/NodeIterator violates loader constraints [message #79793] |
Thu, 03 March 2005 09:59  |
Eclipse User |
|
|
|
hi everyone,
i develop xsl transformation support for wtp using eclipse 3.1M5 and
latest WTP Milestone.
My xsl transformation support includes a xpath evaluation view. for
xpath evaluation i used the underlying dom provided by the wtp xml editor.
the xpath evaluation is done using org.apache.xpath.XPathAPI :
....
XObject xObject = XPathAPI.eval( contextElement, expr);
NodeImpl node;
ArrayList xpathResult = new ArrayList();
Document document =
(Document)contextElement.getOwnerDocument().cloneNode( false);
Element root = document.createElement( "xpath-result");
document.appendChild( root);
boolean odd = false;
switch( xObject.getType())
{
case XObject.CLASS_NODESET :
{
StringBuffer sb = new StringBuffer();
NodeIterator nodeIterator = xObject.nodeset();
while(
(node=(NodeImpl)nodeIterator.nextNode())!=null)
....
using the last WTP Milestone everything works fine but the latest
milestone results in linkage errors (last line of source snippet, method
call nodeIterator.nextNode())
!ENTRY org.eclipse.ui 4 0 2005-03-03 15:48:48.504
!MESSAGE Class org/w3c/dom/traversal/NodeIterator violates loader
constraints
!STACK 0
java.lang.LinkageError: Class org/w3c/dom/traversal/NodeIterator
violates loader constraints
at
com.orangevolt.xslt.views.XPathNavigator$XPathAction.run(XPa thNavigator.java:138)
at
com.orangevolt.xslt.views.XPathNavigator$1.keyReleased(XPath Navigator.java:378)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:127)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:842)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:866)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:851)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:879)
at org.eclipse.swt.widgets.Text.sendKeyEvent(Text.java:1134)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:875)
at org.eclipse.swt.widgets.Widget.wmKeyUp(Widget.java:1554)
at org.eclipse.swt.widgets.Control.WM_KEYUP(Control.java:3337)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3054 )
at org.eclipse.swt.widgets.Text.windowProc(Text.java:1742)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:3480 )
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:16 19)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2539)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1612)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1578)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:293)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:144)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:102)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:228)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:333)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:150)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:268 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:260)
at org.eclipse.core.launcher.Main.run(Main.java:887)
at org.eclipse.core.launcher.Main.main(Main.java:871)
knows somebody whats happen ?
thanks for helping me,
lars
|
|
|
|
|
Re: Class org/w3c/dom/traversal/NodeIterator violates loader constraints [message #81514 is a reply to message #79923] |
Tue, 08 March 2005 20:58  |
Eclipse User |
|
|
|
On Thu, 03 Mar 2005 19:02:30 +0100, lars gersmann <lars.gersmann@gmail.com> wrote:
>
> i got the same error again.
>
Lars, be sure you use -clean when invoking Eclipse after those jars are deleted ... I lose track of the details, but its amazing what's cached by Eclipse.
Are you running on JDK 1.5 (5.0) by any chance? If so, you might try 1.4?
If that doesn't solve the problem, can you prepare a small plugin that I could install in a fresh install of WTP and observe the error? (And, attach it to a bug you open -- wst.xml componenet is fine).
I was hoping that we'd not have this problem on 3.1 stream, though its been a big problem in the past.
On the 3.1 stream, which uses OSGI, the order of priority to loading classes is PPS, "(Java)Platform", "Prereqs", "Self".
This should avoid the problem of "conflicting NodeIterators" you are having, but to claim that actually assumes all players use the Eclipse plugin class loaders. If you are providing your own (via the previously-but-no-longer-recommened Thread.setContextClassLoader) that might be the source of the problem (and, though I haven't checked recently, I suspect we still use this setContextClassLoader incorrectly in a few spots of our WTP code).
I'm hoping you might have a clear and easy to reproduce case that shows the class loading error even with PPS, and if so, we'll be able to dig in and give concrete advice on how to solve.
Thanks.
|
|
|
Powered by
FUDForum. Page generated in 0.03796 seconds