2 Replies Latest reply on Feb 19, 2006 1:37 PM by Michael Congdon

    JDOM parsing XML as <HTML/> empty document

    Michael Congdon Newbie

      I have installed a minimal JBoss 4.0.3SP1 server and have added just the minimal amount of components to run our needs (i.e. for data source, Web Apps and not much else).

      When I try to parse an XML document using standard JDOM SAXBuilder code (this has been running successfully years on other app servers), it now parses the document incorrectly. When I print out rootElement.toString(), it says that it's just "" (I can't get brackets to work in this posting, but that actually should be openBracketHTML/closeBracket). However, the XML document is quite large.

      When I run this from the command line using the same JDK 1.5 and all of the exact same configuration as the JBoss server (i.e. CLASSPATH entries), it runs just fine. It also runs fine in a different install of JBoss 4.0.3SP1 I have. But on the machine where I did the minimal install and added just a few resources for deployment, it doesn't work. Did I overlook something?

      It even has the same failing behavior when I explicitly create a new SAXBuilder(String driverClass) passing in "org.apache.xerces.parsers.SAXParser".

      Here are some key CLASSPATH points:
      No extra XML parsers are in CLASSPATH besides <JBOSS_HOME>/lib/endorsed/xercesImpl.jar
      jdom.jar (1.0 built Sept '04) is in /deploy/ROOT.war/WEB-INF/lib

      Any ideas?

      Thanks in advance,