JDOME: Could not load default SAX parser

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Osoascam
    New Member
    • Feb 2007
    • 21

    JDOME: Could not load default SAX parser

    Hi! I'm trying to do a simple JDOM example, as I have to uste it for a homework... The thing is, it just doesn't work...

    See, this is the code:

    Code:
    public class Ejemplo 
    {
    
      public static void main(String[] args) 
      {
       try 
       {
          SAXBuilder builder=new SAXBuilder(true); 
          
          Document doc=builder.build(new File("liga.xml")); //here's where it signals the error
     .
     .
     .
    And here's the Exception

    org.jdom.JDOMEx ception: Could not load default SAX parser: org.apache.xerc es.par
    sers.SAXParser: SAX2 driver class org.apache.xerc es.parsers.SAXP arser not found:
    org.apache.xerc es.parsers.SAXP arser
    at org.jdom.input. SAXBuilder.crea teParser(SAXBui lder.java:581)
    at org.jdom.input. SAXBuilder.buil d(SAXBuilder.ja va:424)
    at org.jdom.input. SAXBuilder.buil d(SAXBuilder.ja va:810)
    at org.jdom.input. SAXBuilder.buil d(SAXBuilder.ja va:789)
    at Ejemplo.main(Ej emplo.java:15)
    Caused by: java.lang.Class NotFoundExcepti on: org.apache.xerc es.parsers.SAXP arser

    I just don't know what's wrong... Is it that I don't have the JDOM right?
  • Osoascam
    New Member
    • Feb 2007
    • 21

    #2
    Hi! I'm trying to do a simple JDOM example, as I have to uste it for a homework... The thing is, it just doesn't work...

    See, this is the code:

    Code:
    public class Ejemplo 
    {
    
      public static void main(String[] args) 
      {
       try 
       {
          SAXBuilder builder=new SAXBuilder(true); 
          
          Document doc=builder.build(new File("liga.xml")); //here's where it signals the error
     .
     .
     .
    And here's the Exception

    org.jdom.JDOMEx ception: Could not load default SAX parser: org.apache.xerc es.par
    sers.SAXParser: SAX2 driver class org.apache.xerc es.parsers.SAXP arser not found:
    org.apache.xerc es.parsers.SAXP arser
    at org.jdom.input. SAXBuilder.crea teParser(SAXBui lder.java:581)
    at org.jdom.input. SAXBuilder.buil d(SAXBuilder.ja va:424)
    at org.jdom.input. SAXBuilder.buil d(SAXBuilder.ja va:810)
    at org.jdom.input. SAXBuilder.buil d(SAXBuilder.ja va:789)
    at Ejemplo.main(Ej emplo.java:15)
    Caused by: java.lang.Class NotFoundExcepti on: org.apache.xerc es.parsers.SAXP arser

    I just don't know what's wrong... Is it that I don't have the JDOM right?

    Comment

    Working...