Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Problems with JDOM

Reply
Thread Tools

Problems with JDOM

 
 
Andrew
Guest
Posts: n/a
 
      12-08-2003
I am having some problems with JDOM in Builder 9 version. I ve
actually used all the latest JDOM libraries but it seems that the
RunTime environment keeps giving me JDOMExceptions whetever I do.

When I am using a SAXBuilder from the org.jdom.input.SAXBuilder like:
SAXBuilder builder = new SAXBuilder();
builder.build(new File("file.xml"));

and then try to make another builder in the same program :

SAXBuilder builder2 = new SAXBuilder();
builder.build(new File("file2.xml"));

I get a JDOMException error. What I basically want to do is to parse
more than one xml files in memory in the same application. Why is
there a problem ???


Any help would be very much appreciated

Andrew


P.S: I also get an exception when compiling using the "standard" sun
compilers.
 
Reply With Quote
 
 
 
 
Christophe Vanfleteren
Guest
Posts: n/a
 
      12-08-2003
Andrew wrote:

> I am having some problems with JDOM in Builder 9 version. I ve
> actually used all the latest JDOM libraries but it seems that the
> RunTime environment keeps giving me JDOMExceptions whetever I do.
>
> When I am using a SAXBuilder from the org.jdom.input.SAXBuilder like:
> SAXBuilder builder = new SAXBuilder();
> builder.build(new File("file.xml"));
>
> and then try to make another builder in the same program :
>
> SAXBuilder builder2 = new SAXBuilder();
> builder.build(new File("file2.xml"));

^^^^^^^

Could this be your problem? You are reusing the first builder. Or is it just
a copy/paste error?

And in the future, you might want to show the exact error you're getting.
Most of the time, that will make things clearer for us.

> I get a JDOMException error. What I basically want to do is to parse
> more than one xml files in memory in the same application. Why is
> there a problem ???
>
>
> Any help would be very much appreciated
>
> Andrew
>
>
> P.S: I also get an exception when compiling using the "standard" sun
> compilers.


 
Reply With Quote
 
 
 
 
Keith A. Lewis
Guest
Posts: n/a
 
      12-08-2003
http://www.velocityreviews.com/forums/(E-Mail Removed) (Andrew) writes in article <(E-Mail Removed) > dated 7 Dec 2003 17:40:30 -0800:
>I am having some problems with JDOM in Builder 9 version. I ve
>actually used all the latest JDOM libraries but it seems that the
>RunTime environment keeps giving me JDOMExceptions whetever I do.
>
>When I am using a SAXBuilder from the org.jdom.input.SAXBuilder like:
>SAXBuilder builder = new SAXBuilder();
>builder.build(new File("file.xml"));
>
>and then try to make another builder in the same program :
>
>SAXBuilder builder2 = new SAXBuilder();
>builder.build(new File("file2.xml"));
>
>I get a JDOMException error. What I basically want to do is to parse
>more than one xml files in memory in the same application. Why is
>there a problem ???


I don't have that problem. And my app re-uses the same SAXBuilder object
hundreds of times (sequentially, not concurrently). The only other
difference is that I pass in StringReader objects instead of File, but that
shouldn't matter.

>P.S: I also get an exception when compiling using the "standard" sun
>compilers.


That's a second problem I don't have.

It might be easier to help you if you post the entire text of the exceptions
(both compiler and runtime).

--Keith Lewis klewis {at} mitre.org
The above may not (yet) represent the opinions of my employer.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
java.lang.NoSuchMethodError: org.jdom.Element: method getParent()Lorg/jdom/Element Tinker Java 4 10-09-2005 03:12 PM
JDOM: java.lang.NoClassDefFoundError: org/jdom/Content Bernd Oninger Java 4 06-21-2004 09:08 PM
JDOM: java.lang.NoClassDefFoundError: org/jdom/Content Bernd Oninger XML 3 06-21-2004 09:08 PM
Problems with JDOM Andrew Java 3 12-08-2003 06:41 PM
Help with JDOM, turn org.jdom.Document -> org.w3c.dom.Document? Wendy S Java 1 08-04-2003 11:48 PM



Advertisments