commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Heger <oliver.he...@oliver-heger.de>
Subject Re: [configuration] AbstractMethodError trying to save XML
Date Sat, 24 May 2008 19:42:41 GMT
Pilar schrieb:
> Hi, I've got this exception message while I'm trying to execute these piece
> of code:
> 
>         xml_config = new XMLConfiguration();
>         
>         xml_config.setRootElementName("Ship");
>         
>         xml_config.setProperty("Class", ship.getClass().getName());
>         xml_config.setProperty("WaterDensity", ship.getWaterDensity());
>         xml_config.setProperty("CompLenght", ship.getCompLength());
>         
>         
>         xml_config.save(new File(file_name));
> 
> 
> 
> Caused by: java.lang.AbstractMethodError:
> gnu.xml.dom.DomDocument.getXmlStandalone()Z
>         at
> com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.setDocumentInfo(DOM2TO.java:373)
>         at
> com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:127)
>         at
> com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:94)
>         at
> com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:662)
>         at
> com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:708)
>         at
> com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:313)
>         at
> org.apache.commons.configuration.XMLConfiguration.save(XMLConfiguration.java:713)
>         at
> org.apache.commons.configuration.AbstractHierarchicalFileConfiguration$FileConfigurationDelegate.save(AbstractHierarchicalFileConfiguration.java:448)
>         at
> org.apache.commons.configuration.AbstractFileConfiguration.save(AbstractFileConfiguration.java:544)
>         at
> org.apache.commons.configuration.AbstractFileConfiguration.save(AbstractFileConfiguration.java:511)
>         at
> org.apache.commons.configuration.AbstractFileConfiguration.save(AbstractFileConfiguration.java:489)
>         at
> org.apache.commons.configuration.AbstractHierarchicalFileConfiguration.save(AbstractHierarchicalFileConfiguration.java:204)
>         at
> es.udc.gii.gif.soft_naval.model.shipfacade.ShipFacadeDelegate.saveShipToXMLFile(ShipFacadeDelegate.java:252)
>         at
> gui_soft_naval.Gui_soft_navalView.saveProject(Gui_soft_navalView.java:95)
> 
> 
> Does anybody know which is my error? :S I read something about xerces.jar
> and jdk 1.6...
> 
> Regards, Pilar

The discussion in [1] describes this problem (I think this is the same 
issue as you are facing). Advice is to switch to a newer version of 
Xerces (or to remove it from the class path at all if possible).

Hope that helps.
Oliver

[1] 
http://forum.java.sun.com/thread.jspa?threadID=5227465&messageID=10208952

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message