commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ken.Tan...@noaa.gov
Subject Re: [digester] xml attribute values containing "]" character get scrambled
Date Fri, 16 May 2008 14:02:30 GMT


----- Original Message -----
From: "simon.kitching@chello.at" <simon.kitching@chello.at>
Date: Friday, May 16, 2008 2:44 am
Subject: Re: [digester] xml attribute values containing "]" character
get scrambled

> Ken.Tanaka@noaa.gov schrieb:
> >> I'm using digester 1.8, with jdk1.5.0_11 on Red Hat Enterprise 
> >> Linux 
> >> Client release 5.1.
> >>
> >>     
> > OK, I've tried running the same jar file on my home system and it 
> works> fine there. The same executable jar on MacOS 10.4.11, java 
> version> "1.5.0_13" gives correct output--I didn't change anything, 
> just> downloaded the jar and ran it. I previously had used "maven
> > assembly:assembly", so I believe that means all the dependent jar 
> files> are included (digester 1.8, etc.), except for system 
> libraries, right?
> > Does this mean it's more difficult to debug? ;-)
...
> >   
> 
> Can you post your ConfigData class?
> 
> You could also try enabling debug logging for category
>    org.apache.commons.digester
> which will give a lot of info about which methods are called when.
> 
> Regards, Simon
> 
Thanks for the suggestion. I'll try adding logging to the simplified
example. Logging on my working application looked as if the wrong
information was in my XML input, although there was a lot of output to
wade through. Logging on the example code should be much easier to analyze.

Here is my ConfigData class: ============================
/* 
 * ConfigData.java
 */

package gov.noaa.eds.byExample.tryDigesterConfigLimit;

public class ConfigData {
    private StringSet stringset = null;

    public StringSet getStringset() {
        return this.stringset;
    }

    public void addStringset(StringSet ss) {
        this.stringset = ss;
    }
   
    public void print() {
        System.out.println("Configuration contents:");
        this.stringset.print();
    }
} // end ConfigData


Here is my StringSet class: ============================
/*
 * StringSet.java
 */

package gov.noaa.eds.byExample.tryDigesterConfigLimit;

public class StringSet {
    private String attr1 = null;
    private String attr2 = null;
    private String attr3 = null;
    private String attr4 = null;
    private String attr5 = null;
    private String attr6 = null;
    private String attr7 = null;
    private String attr8 = null;
    private String attr9 = null;
    private String attr10 = null;

    /**
     * Print the contents of this class. Mainly for debugging.
     */
    public void print() {
        System.out.println("String set:");
        System.out.println("  attr1 =" + this.attr1);
        System.out.println("  attr2 =" + this.attr2);
        System.out.println("  attr3 =" + this.attr3);
        System.out.println("  attr4 =" + this.attr4);
        System.out.println("  attr5 =" + this.attr5);
        System.out.println("  attr6 =" + this.attr6);
        System.out.println("  attr7 =" + this.attr7);
        System.out.println("  attr8 =" + this.attr8);
        System.out.println("  attr9 =" + this.attr9);
        System.out.println("  attr10=" + this.attr10);
    }

    public String getAttr1() {
        return attr1;
    }

    public void setAttr1(String attr1) {
        this.attr1 = attr1;
    }

    public String getAttr2() {
        return attr2;
    }

    public void setAttr2(String attr2) {
        this.attr2 = attr2;
    }

    public String getAttr3() {
        return attr3;
    }

    public void setAttr3(String attr3) {
        this.attr3 = attr3;
    }

    public String getAttr4() {
        return attr4;
    }

    public void setAttr4(String attr4) {
        this.attr4 = attr4;
    }

    public String getAttr5() {
        return attr5;
    }

    public void setAttr5(String attr5) {
        this.attr5 = attr5;
    }

    public String getAttr6() {
        return attr6;
    }

    public void setAttr6(String attr6) {
        this.attr6 = attr6;
    }

    public String getAttr7() {
        return attr7;
    }

    public void setAttr7(String attr7) {
        this.attr7 = attr7;
    }

    public String getAttr8() {
        return attr8;
    }

    public void setAttr8(String attr8) {
        this.attr8 = attr8;
    }

    public String getAttr9() {
        return attr9;
    }

    public void setAttr9(String attr9) {
        this.attr9 = attr9;
    }

    public String getAttr10() {
        return attr10;
    }

    public void setAttr10(String attr10) {
        this.attr10 = attr10;
    }
} // end StringSet



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


Mime
View raw message