Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Exception while loading properties from an xml file

807589Oct 2 2008 — edited Oct 3 2008
Hi all,
I've got a problem while loading properties from an XML file:
java.lang.ClassCastException: org.apache.xerces.dom.DeferredCommentImpl cannot be cast to org.w3c.dom.Element
ERROR - Cannot load properties from the specified file <./conf/login.prop> java.lang.ClassCastException: org.apache.xerces.dom.DeferredCommentImpl cannot be cast to org.w3c.dom.Element

	at java.util.XMLUtils.importProperties(XMLUtils.java:97)
	at java.util.XMLUtils.load(XMLUtils.java:69)
	at java.util.Properties.loadFromXML(Properties.java:852)
	at g2.utility.HRPMProperties.<init>(HRPMProperties.java:78)
	at g2.utility.HRPMProperties.getInstance(HRPMProperties.java:94)
	at g2.gui.workers.ApplicationSwingWorker.<init>(ApplicationSwingWorker.java:36)
	at g2.main.Main.main(Main.java:37)
but this code worked before, and I've got the xerces and xercesImpl packages in the classpath, anyone can give me an hint on how to fix the problem?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 31 2008
Added on Oct 2 2008
10 comments
1,642 views