Apache

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • StringList2VarcharFieldConversion issue

    5 answers - 713 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Hi all,
    We are using JB version 1.0.4 and facing the following issue:
    throws an ArrayIBoundsException
    when retrieving objects from the database. This happends in the method sqlToJava:
    while (pos < length)
    {
    if (input.charAt(pos) != '#')
    {
    newString.append(input.charAt(pos));
    }
    else
    {
    if (input.charAt(pos + 1) != '#')
    when pos = length-1, it will try to access the character at position length,
    resulting in the above mentioned exception.
    Bogdan Daniliuc
    To unsubscribe, e-mail: ojb-dev-unsubscribe (AT) db (DOT) apache.org
    For additional commands, e-mail: ojb-dev-help (AT) db (DOT) apache.org
  • No.1 | | 1116 bytes | |

    Hi Bogdan,

    I can't reproduce your ArrayIBoundsException. Could you post an
    example list to reproduce the problem?
    e.g. something like
    list.add("");
    list.add("1");
    list.add("2");

    regards,
    Armin

    Bogdan Daniliuc wrote:
    Hi all,

    We are using JB version 1.0.4 and facing the following issue:
    throws an ArrayIBoundsException
    when retrieving objects from the database. This happends in the method sqlToJava:

    while (pos < length)
    {
    if (input.charAt(pos) != '#')
    {
    newString.append(input.charAt(pos));
    }
    else
    {
    if (input.charAt(pos + 1) != '#')

    when pos = length-1, it will try to access the character at position length,
    resulting in the above mentioned exception.

    Bogdan Daniliuc

    To unsubscribe, e-mail: ojb-dev-unsubscribe (AT) db (DOT) apache.org
    For additional commands, e-mail: ojb-dev-help (AT) db (DOT) apache.org

    To unsubscribe, e-mail: ojb-dev-unsubscribe (AT) db (DOT) apache.org
    For additional commands, e-mail: ojb-dev-help (AT) db (DOT) apache.org
  • No.2 | | 600 bytes | |

    5/12/06, Armin Waibel <arminw (AT) apache (DOT) orgwrote:

    I can't reproduce your ArrayIBoundsException. Could you post an
    example list to reproduce the problem?
    e.g. something like
    list.add("");
    list.add("1");
    list.add("2");

    I think the error will happen when the '#' is the last character in th
    string because then JB tries to access the character after it which
    will fail.

    Tom

    To unsubscribe, e-mail: ojb-dev-unsubscribe (AT) db (DOT) apache.org
    For additional commands, e-mail: ojb-dev-help (AT) db (DOT) apache.org
  • No.3 | | 1227 bytes | |

    Thomas Dudziak wrote:
    5/12/06, Armin Waibel <arminw (AT) apache (DOT) orgwrote:

    >I can't reproduce your ArrayIBoundsException. Could you post an
    >example list to reproduce the problem?
    >e.g. something like
    >list.add("");
    >list.add("1");
    >list.add("2");


    I think the error will happen when the '#' is the last character in th
    string because then JB tries to access the character after it which
    will fail.

    oh! I never get this special case because I do a slight modification of
    this class before I start testing special cases. Additionally the
    doesn't differ between empty string
    and 'null' - will fix this too (will add placeholder for "" and null).

    I will test the other XXList2VarcharFieldConversion too. Think they all
    have the same bug.

    regards,
    Armin

    Tom

    To unsubscribe, e-mail: ojb-dev-unsubscribe (AT) db (DOT) apache.org
    For additional commands, e-mail: ojb-dev-help (AT) db (DOT) apache.org

    To unsubscribe, e-mail: ojb-dev-unsubscribe (AT) db (DOT) apache.org
    For additional commands, e-mail: ojb-dev-help (AT) db (DOT) apache.org
  • No.4 | | 1840 bytes | |

    checked in new tests and fix problems with 'null' and "" list entries.
    Please check latest from SVN JB_1_0_RELEASE branch.

    regards,
    Armin

    Armin Waibel wrote:

    Thomas Dudziak wrote:
    >5/12/06, Armin Waibel <arminw (AT) apache (DOT) orgwrote:
    >>

    I can't reproduce your ArrayIBoundsException. Could you post an
    example list to reproduce the problem?
    e.g. something like
    list.add("");
    list.add("1");
    list.add("2");
    >>

    >I think the error will happen when the '#' is the last character in th
    >string because then JB tries to access the character after it which
    >will fail.
    >>


    oh! I never get this special case because I do a slight modification of
    this class before I start testing special cases. Additionally the
    doesn't differ between empty string
    and 'null' - will fix this too (will add placeholder for "" and null).

    I will test the other XXList2VarcharFieldConversion too. Think they all
    have the same bug.

    regards,
    Armin


    >Tom
    >>

    >
    >To unsubscribe, e-mail: ojb-dev-unsubscribe (AT) db (DOT) apache.org
    >For additional commands, e-mail: ojb-dev-help (AT) db (DOT) apache.org
    >>
    >>


    To unsubscribe, e-mail: ojb-dev-unsubscribe (AT) db (DOT) apache.org
    For additional commands, e-mail: ojb-dev-help (AT) db (DOT) apache.org

    To unsubscribe, e-mail: ojb-dev-unsubscribe (AT) db (DOT) apache.org
    For additional commands, e-mail: ojb-dev-help (AT) db (DOT) apache.org
  • No.5 | | 2037 bytes | |

    ,thank you very much.

    Bogdan Daniliuc

    checked in new tests and fix problems with 'null' and "" list
    entries. Please check latest from SVN JB_1_0_RELEASE branch.

    regards,
    Armin

    Armin Waibel wrote:

    Thomas Dudziak wrote:
    >5/12/06, Armin Waibel <arminw (AT) apache (DOT) orgwrote:
    >>

    I can't reproduce your ArrayIBoundsException. Could you post an
    example list to reproduce the problem?
    e.g. something like
    list.add("");
    list.add("1");
    list.add("2");
    >>

    >I think the error will happen when the '#' is the last character in th
    >string because then JB tries to access the character after it which
    >will fail.
    >>


    oh! I never get this special case because I do a slight modification of
    this class before I start testing special cases. Additionally the
    doesn't differ between empty string
    and 'null' - will fix this too (will add placeholder for "" and null).

    I will test the other XXList2VarcharFieldConversion too. Think they all
    have the same bug.

    regards,
    Armin


    >Tom
    >>

    >
    >To unsubscribe, e-mail: ojb-dev-unsubscribe (AT) db (DOT) apache.org
    >For additional commands, e-mail: ojb-dev-help (AT) db (DOT) apache.org
    >>
    >>


    To unsubscribe, e-mail: ojb-dev-unsubscribe (AT) db (DOT) apache.org
    For additional commands, e-mail: ojb-dev-help (AT) db (DOT) apache.org

    To unsubscribe, e-mail: ojb-dev-unsubscribe (AT) db (DOT) apache.org
    For additional commands, e-mail: ojb-dev-help (AT) db (DOT) apache.org

    To unsubscribe, e-mail: ojb-dev-unsubscribe (AT) db (DOT) apache.org
    For additional commands, e-mail: ojb-dev-help (AT) db (DOT) apache.org

Re: StringList2VarcharFieldConversion issue


max 4000 letters.
Your nickname that display:
In order to stop the spam: 7 + 6 =
QUESTION ON "Apache"

EMSDN.COM