[jdom-interest] org.jdom.IllegalAddException: The attribute already
has an existi ng parent "transaction"
Jason Hunter
jhunter at xquery.com
Mon Feb 23 14:37:20 PST 2004
Pandia, Rajesh wrote:
> We have an application that was using JDOM Beta4/Beta5 version. Now,
> we have moved on to JDOM Beta8/Beta9 version. How do I know what JDOM
> version is installed on my machine by just looking at the JAR files ?
The manifest file within the JAR lists the version. The .class files
also have their specific CVS version within them, available if you run
"strings" on them.
> What do I need to do fix this exception ?
Detach the attribute from its original location before adding it to a
new one.
-jh-
>
> =========================================
> I am seeing the following exception:
>
> **********Error Trace::Version 10.5.0.0.012604::Mon Feb 23 15:53:59 2004
> ( 20:53
> :59.155 GMT t at 616 )
> #0 Error #1600039 XML sent from servlet read.
> org.jdom.IllegalAddException: The attribute already has an existing
> parent "transaction"
>
> **********
>
> =========================================
>
> Here is the code-snippet where the exception is being thrown:
>
> try
> {
> // get the settings required to load the xml dropped by servlet
> IntegrationGlobalConfigObject gco = new
> IntegrationGlobalConfigObject();
> getAttribute(context, gco,
> IntegrationGlobalConfigObject.IN_RIP_MODE);
> getAttribute(context, gco,
> IntegrationGlobalConfigObject.LOCAL_PROJECT_FILEPATH);
>
> codeRegn = "GCO read.";
>
> // load the xml
> Element elCommandRoot = loadXMLSentFromServlet(gco, args[0],
> context);
>
> codeRegn = "XML sent from servlet read.";
>
> // prepare preliminary response header
> // create the response placeholder
> Element elResponseRoot = new Element("transaction");
> // copy/modify attributes from request
> System.out.println("1");
> elResponseRoot.setAttributes(elCommandRoot.getAttributes());
> System.out.println("2");
> elResponseRoot.getAttribute("type").setValue("response");
> System.out.println("3");
> .....
>
More information about the jdom-interest
mailing list