Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » NoClassDefFoundError - org/apache/xerces/parsers/AbstractDOMParser
NoClassDefFoundError - org/apache/xerces/parsers/AbstractDOMParser [message #84978] Mon, 30 June 2003 02:30 Go to next message
Eclipse UserFriend
Originally posted by: samfra02.aut.ac.nz

We are trying to create a Java XML editor that uses the Apache Xerces
parser. On debugging the application as a Run-time Workbench, I am getting
the error below:

Unhandled exception caught in event loop.
Reason:
org/apache/xerces/parsers/AbstractDOMParser

From stepping through the code I have found that the exception is a due to
a java.lang.NoClassDefFoundError (id=49) error. This is being generated
when I am trying to create a class (aquillaDOMParser) that imports
org.apache.xerces.parsers.DOMParser. aquillaDOMParser should later
instantiate a DOMParser but it doesn't even complete creating
aquillaDOMParser before the above error is generated so not sure why this
error is occuring.

After looking through the newsgroups I have found a number of problems
that seemed related. Based on these I have tried adding
D:\eclipse\plugins\org.apache.xerces_4.0.7\xercesImpl.jar and
D:\eclipse\plugins\org.apache.xerces_4.0.7\xmlParserAPIs.jar to the
classpath and to the JAVA_OPTS -bootclasspath environment variable, both
without any change. I have also tried replacing the Eclipse Xerces jars
with those downloaded from the Apache website but this caused a error in
the Debug UI.

I am running Eclipse 2.1.0 on Windows 2000 using j2sdk1.4.1_01 as my VM.

Thanks
Re: NoClassDefFoundError - org/apache/xerces/parsers/AbstractDOMParser [message #85236 is a reply to message #84978] Mon, 30 June 2003 12:42 Go to previous messageGo to next message
Asaf is currently offline AsafFriend
Messages: 59
Registered: July 2009
Member
Hello. The problem you trying to handle is very common. I have fresh
sulotion for it, yet, you must underestand solution otherwise you will meet
it again with other jars. I assume you developing plugin project which is
you XML editor. I also have remark regarding XML editor, but let's do it in
the end.

So here is the deal: Eclipse distincts between the definitions are required
for Compiling the project and the defintions are required to run it.
Is it bug or just a very bad feature ??? I don't know probably something to
hand OTI group handle with.

So I believe that the definitions for compiling your project are ok since
you are in stage of running it. You probably add external jar to project to
compile.
Lets talk about running and debbuging.

When you debug or run go to "Run" menu and choose "Debug" option.
The screen you is opened in "Arguments" tab. You will see Text box labels as
"VM Arguments"
suppose you xerces.jar located at D:/MyJars/xerces.jar enter in text box
next string:

-Xbootclasspath/p D:/MyJars/xerces.jar

if there are any jars or classpath are required (classes) at run time add
them too.
Press "Applay" button and then "Debug".
That should do the work.

Some advice about XML editor:
You can build the EditorPart for it, but trying to extend the eclipse
ResourceNavigate to show XML files detailed like java files with IMethod,
IField is not such easy task since ResourceNavigate is not general to extend
to types. How ever you can create your navigator I am not sure about the
behavior of projects in it and all other free meals you get with eclipse
ResourceNavigator.
Even more: jdt plugin has its own navigator which is the package explorer.
Some of code is internal , not everything has resources.
Here is the thread about "Create IMethod like to diffrent extensions than
*.java" I copy the content:

( this came from: John Arthorne <John_Arthorne@oti.com_>
EclipseCorner )

This is not possible in the current navigator view. However, there are
discussions going on right now on how to extend the navigator to make it
more generic and extensible. See the plan item bug report for more
details:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=36961


Asaf wrote:
> Hi group. I have 2 questions
> I which to create in resource navigator and package navigator to
specified
> files a kind of IMethod , IField childs in the navigator tree such
double
> click them create the event in the editor (not java editor)
>
> 1) What kind of extension I should create to extend the Resource and
Package
> navigators to be able to show the files I want to detail (like jdt does
for
> *.java sources)
>
> 2) Do I extend exist Resource Navigator ? How can I trace resources I
want
> to create the spacial children for ?
> how do I handle changes in editor such tree is reloaded ?, How
Resource
> Navigator gets the list of resources form workbanch ? .... well it was
more
> than 2 quistions, but its is actualy same quistion ;-)
>
> Many thanks lads,
> Asaf
>
>

That's all, hope you are in better shape now ;-)
Asaf

"sam_storm" <samfra02@aut.ac.nz> wrote in message
news:bdo7cq$o81$1@rogue.oti.com...
> We are trying to create a Java XML editor that uses the Apache Xerces
> parser. On debugging the application as a Run-time Workbench, I am getting
> the error below:
>
> Unhandled exception caught in event loop.
> Reason:
> org/apache/xerces/parsers/AbstractDOMParser
>
> From stepping through the code I have found that the exception is a due to
> a java.lang.NoClassDefFoundError (id=49) error. This is being generated
> when I am trying to create a class (aquillaDOMParser) that imports
> org.apache.xerces.parsers.DOMParser. aquillaDOMParser should later
> instantiate a DOMParser but it doesn't even complete creating
> aquillaDOMParser before the above error is generated so not sure why this
> error is occuring.
>
> After looking through the newsgroups I have found a number of problems
> that seemed related. Based on these I have tried adding
> D:\eclipse\plugins\org.apache.xerces_4.0.7\xercesImpl.jar and
> D:\eclipse\plugins\org.apache.xerces_4.0.7\xmlParserAPIs.jar to the
> classpath and to the JAVA_OPTS -bootclasspath environment variable, both
> without any change. I have also tried replacing the Eclipse Xerces jars
> with those downloaded from the Apache website but this caused a error in
> the Debug UI.
>
> I am running Eclipse 2.1.0 on Windows 2000 using j2sdk1.4.1_01 as my VM.
>
> Thanks
>
>
Re: NoClassDefFoundError - org/apache/xerces/parsers/AbstractDOMParser [message #85917 is a reply to message #85236] Mon, 30 June 2003 21:14 Go to previous message
Eclipse UserFriend
Originally posted by: samfra02.aut.ac.nz

Hi all,

problem has been solved - many thanks Asaf. One thing I had to do to
Asaf's solution was to modify the statement entered in the VM Arguments
field by adding a semi-colon after the /p option - see below.

-Xbootclasspath/p:D:/MyJars/xerces.jar

Again, many thanks

Sam

Asaf wrote:

> Hello. The problem you trying to handle is very common. I have fresh
> sulotion for it, yet, you must underestand solution otherwise you will meet
> it again with other jars. I assume you developing plugin project which is
> you XML editor. I also have remark regarding XML editor, but let's do it in
> the end.

> So here is the deal: Eclipse distincts between the definitions are required
> for Compiling the project and the defintions are required to run it.
> Is it bug or just a very bad feature ??? I don't know probably something to
> hand OTI group handle with.

> So I believe that the definitions for compiling your project are ok since
> you are in stage of running it. You probably add external jar to project to
> compile.
> Lets talk about running and debbuging.

> When you debug or run go to "Run" menu and choose "Debug" option.
> The screen you is opened in "Arguments" tab. You will see Text box labels as
> "VM Arguments"
> suppose you xerces.jar located at D:/MyJars/xerces.jar enter in text box
> next string:

> -Xbootclasspath/p D:/MyJars/xerces.jar

> if there are any jars or classpath are required (classes) at run time add
> them too.
> Press "Applay" button and then "Debug".
> That should do the work.

> Some advice about XML editor:
> You can build the EditorPart for it, but trying to extend the eclipse
> ResourceNavigate to show XML files detailed like java files with IMethod,
> IField is not such easy task since ResourceNavigate is not general to extend
> to types. How ever you can create your navigator I am not sure about the
> behavior of projects in it and all other free meals you get with eclipse
> ResourceNavigator.
> Even more: jdt plugin has its own navigator which is the package explorer.
> Some of code is internal , not everything has resources.
> Here is the thread about "Create IMethod like to diffrent extensions than
> *.java" I copy the content:

> ( this came from: John Arthorne <John_Arthorne@oti.com_>
> EclipseCorner )

> This is not possible in the current navigator view. However, there are
> discussions going on right now on how to extend the navigator to make it
> more generic and extensible. See the plan item bug report for more
> details:

> https://bugs.eclipse.org/bugs/show_bug.cgi?id=36961


> Asaf wrote:
> > Hi group. I have 2 questions
> > I which to create in resource navigator and package navigator to
> specified
> > files a kind of IMethod , IField childs in the navigator tree such
> double
> > click them create the event in the editor (not java editor)
> >
> > 1) What kind of extension I should create to extend the Resource and
> Package
> > navigators to be able to show the files I want to detail (like jdt does
> for
> > *.java sources)
> >
> > 2) Do I extend exist Resource Navigator ? How can I trace resources I
> want
> > to create the spacial children for ?
> > how do I handle changes in editor such tree is reloaded ?, How
> Resource
> > Navigator gets the list of resources form workbanch ? .... well it was
> more
> > than 2 quistions, but its is actualy same quistion ;-)
> >
> > Many thanks lads,
> > Asaf
> >
> >

> That's all, hope you are in better shape now ;-)
> Asaf

> "sam_storm" <samfra02@aut.ac.nz> wrote in message
> news:bdo7cq$o81$1@rogue.oti.com...
> > We are trying to create a Java XML editor that uses the Apache Xerces
> > parser. On debugging the application as a Run-time Workbench, I am getting
> > the error below:
> >
> > Unhandled exception caught in event loop.
> > Reason:
> > org/apache/xerces/parsers/AbstractDOMParser
> >
> > From stepping through the code I have found that the exception is a due to
> > a java.lang.NoClassDefFoundError (id=49) error. This is being generated
> > when I am trying to create a class (aquillaDOMParser) that imports
> > org.apache.xerces.parsers.DOMParser. aquillaDOMParser should later
> > instantiate a DOMParser but it doesn't even complete creating
> > aquillaDOMParser before the above error is generated so not sure why this
> > error is occuring.
> >
> > After looking through the newsgroups I have found a number of problems
> > that seemed related. Based on these I have tried adding
> > D:\eclipse\plugins\org.apache.xerces_4.0.7\xercesImpl.jar and
> > D:\eclipse\plugins\org.apache.xerces_4.0.7\xmlParserAPIs.jar to the
> > classpath and to the JAVA_OPTS -bootclasspath environment variable, both
> > without any change. I have also tried replacing the Eclipse Xerces jars
> > with those downloaded from the Apache website but this caused a error in
> > the Debug UI.
> >
> > I am running Eclipse 2.1.0 on Windows 2000 using j2sdk1.4.1_01 as my VM.
> >
> > Thanks
> >
> >
Previous Topic:Newbie question re:/.classpath files
Next Topic:make the Ftp/WebDav API open to public
Goto Forum:
  


Current Time: Thu Dec 26 19:26:48 GMT 2024

Powered by FUDForum. Page generated in 0.03984 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top