[jdom-interest] Unhelpful exception due to namespace problems
Kevin Lentle
kevin.lentle at virgin.net
Sat Jan 13 13:16:59 PST 2001
Hi All,
Got an odd exception whilst using JDOM, listed at the end of the mail (sorry
about the format but it's from VisualAge).
After a bit of debugging I tracked it down to a mis-spelling in the
namespace attribute of the root. Instead of "xmlns:Metalised" I had
"xmlns:Metalsed", but the rest of the XML used the correct spelling. As soon
as I fixed the spelling the problem went away.
A more informative exception would be greatly appreciated. I'd fix it
myself, but I'm not using CVS and not sure how to go about posting the fix
without it.
Regards,
Kev.
PS If anyone has ideas on using CVS & VisualAge without constantly
exporting/importing source, etc, please let me know.
Now for the exception....
--------- UNCAUGHT EXCEPTION ---------
org.jdom.JDOMException: null: null
at org.jdom.input.DOMBuilder.build(DOMBuilder.java:194)
at org.jdom.input.DOMBuilder.build(DOMBuilder.java:216)
at xmltree.JDomTreeModel.getJDomTreeModel1(JDomTreeModel.java:59)
at xmltree.JDomTreeModel.connPtoP1SetTarget(JDomTreeModel.java:39)
at xmltree.JDomTreeModel.initConnections(JDomTreeModel.java:152)
at xmltree.JDomTreeModel.initialize(JDomTreeModel.java:166)
at xmltree.JDomTreeModel.<init>(JDomTreeModel.java:23)
at xmltree.JDomTreeModel.main(JDomTreeModel.java:180)
Root cause: java.lang.NullPointerException
at org.jdom.input.DOMBuilder.buildTree(DOMBuilder.java:338)
at org.jdom.input.DOMBuilder.buildTree(DOMBuilder.java:296)
at org.jdom.input.DOMBuilder.build(DOMBuilder.java:191)
at org.jdom.input.DOMBuilder.build(DOMBuilder.java:216)
at xmltree.JDomTreeModel.getJDomTreeModel1(JDomTreeModel.java:59)
at xmltree.JDomTreeModel.connPtoP1SetTarget(JDomTreeModel.java:39)
at xmltree.JDomTreeModel.initConnections(JDomTreeModel.java:152)
at xmltree.JDomTreeModel.initialize(JDomTreeModel.java:166)
at xmltree.JDomTreeModel.<init>(JDomTreeModel.java:23)
at xmltree.JDomTreeModel.main(JDomTreeModel.java:180)
--------- UNCAUGHT EXCEPTION ---------
java.lang.NullPointerException
at dev.metalised.xmltree.JDomTreeModel.getRoot(JDomTreeModel.java:86)
at javax.swing.JTree.setModel(Unknown Source)
at xmltree.JDomTreeModel.connPtoP1SetTarget(JDomTreeModel.java:39)
at xmltree.JDomTreeModel.initConnections(JDomTreeModel.java:152)
at xmltree.JDomTreeModel.initialize(JDomTreeModel.java:166)
at xmltree.JDomTreeModel.<init>(JDomTreeModel.java:23)
at xmltree.JDomTreeModel.main(JDomTreeModel.java:180)
More information about the jdom-interest
mailing list