Problems with JDOM

Discussion in 'XML' started by Andrew, Dec 8, 2003.

  1. Andrew

    Andrew Guest

    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.
    Andrew, Dec 8, 2003
    #1
    1. Advertising

  2. 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.
    Christophe Vanfleteren, Dec 8, 2003
    #2
    1. Advertising

  3. (Andrew) writes in article <> 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.
    Keith A. Lewis, Dec 8, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Wendy S
    Replies:
    1
    Views:
    6,332
    Darren Davison
    Aug 5, 2003
  2. Andrew

    Problems with JDOM

    Andrew, Dec 8, 2003, in forum: Java
    Replies:
    3
    Views:
    432
    Keith A. Lewis
    Dec 8, 2003
  3. Bernd Oninger
    Replies:
    4
    Views:
    12,207
    GIMME
    Jun 21, 2004
  4. Tinker
    Replies:
    4
    Views:
    5,264
    Harry Bosch
    Oct 9, 2005
  5. Bernd Oninger
    Replies:
    3
    Views:
    2,864
    GIMME
    Jun 21, 2004
Loading...

Share This Page