Menu

#23 java.lang.NumberFormatException at com.elvyx.server.DatFile

open
nobody
Server (3)
1
2009-04-01
2009-04-01
No

Elvyx has problems with some special character in conditions

java.lang.NumberFormatException: For input string: "{}|@zZ'"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:447)
at java.lang.Integer.<init>(Integer.java:620)
at com.elvyx.server.DatFile.run(DatFile.java:85)
at java.lang.Thread.run(Thread.java:619)

Version: elvyx-1.0.24

SQL_Statement:
select
employeepe0_.OID as OID6_,
employeepe0_.beforelastChangeDate as beforela2_6_,
employeepe0_.createDate as createDate6_,
employeepe0_.isChild as isChild6_,
employeepe0_.lastChangeDate as lastChan5_6_,
employeepe0_.legacyOid as legacyOid6_,
employeepe0_.OPTLOCK as OPTLOCK6_,
employeepe0_.aggUser as aggUser6_,
employeepe0_.comemail as comemail6_,
employeepe0_.comfax as comfax6_,
employeepe0_.commobilePhone as commobi10_6_,
employeepe0_.compassword as compass11_6_,
employeepe0_.comphone as comphone6_,
employeepe0_.comshortnumber as comshor13_6_,
employeepe0_.comurl as comurl6_,
employeepe0_.identification as identif15_6_,
employeepe0_.languageCode as languag16_6_,
employeepe0_.perbirthDatadate as perbirt17_6_,
employeepe0_.percommunicationemail as percomm18_6_,
employeepe0_.percommunicationfax as percomm19_6_,
employeepe0_.percommunicationmobilePhone as percomm20_6_,
employeepe0_.percommunicationpassword as percomm21_6_,
employeepe0_.percommunicationphone as percomm22_6_,
employeepe0_.percommunicationshortnumber as percomm23_6_,
employeepe0_.percommunicationurl as percomm24_6_,
employeepe0_.perlanguagecode as perlang25_6_,
employeepe0_.pername as pername6_,
employeepe0_.perpersonalDatahobby as perpers27_6_,
employeepe0_.perpersonalDatasex as perpers28_6_,
employeepe0_.perprivateAddresscity as perpriv29_6_,
employeepe0_.perprivateAddressco as perpriv30_6_,
employeepe0_.perprivateAddresscountrycode as perpriv31_6_,
employeepe0_.perprivateAddresscounty as perpriv32_6_,
employeepe0_.perprivateAddresscountycode as perpriv33_6_,
employeepe0_.perprivateAddresslocation as perpriv34_6_,
employeepe0_.perprivateAddressstreet as perpriv35_6_,
employeepe0_.perprivateAddressstreetnumber as perpriv36_6_,
employeepe0_.perprivateAddresszip as perpriv37_6_,
employeepe0_.perprivateAddresszip2 as perpriv38_6_,
employeepe0_.persalutation as persalu39_6_,
employeepe0_.persurname as persurname6_,
employeepe0_.pertaxnumber as pertaxn41_6_
from
Employee employeepe0_
where
employeepe0_.identification='ABCabc!()%#*?[]^_~{}|@zZ'

Elvyx settings:
<property name="hibernate.connection.driver_class" value="com.elvyx.Driver"/>
<property name="hibernate.connection.url" value="jdbc:elvyx://localhost:4448/?elvyx.real_driver=com.microsoft.sqlserver.jdbc.SQLServerDriver&amp;elvyx.real_jdbc=jdbc%3Asqlserver%3A%2F%2Fphx00081%3A1433%3Bdatabase%3DBart"/>

Remark: The query itself is executed without errors by the SQLServerDriver although the presence of special characters.

Discussion

  • Guenther Demetz

    Guenther Demetz - 2009-04-01
    • priority: 5 --> 1
     
  • Guenther Demetz

    Guenther Demetz - 2009-04-01

    Due the exception the client simply ignores the concerning statement,
    so the statement is'nt displayed at all in the GUI.

     
  • Guenther Demetz

    Guenther Demetz - 2009-04-09

    Also the tilde (~) sign apparently creates problems to elvyx when appearing in a parameter:
    Exception in thread "Thread-178" java.lang.NumberFormatException: For input string: "1125899906894912'"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    at java.lang.Integer.parseInt(Integer.java:459)
    at java.lang.Integer.<init>(Integer.java:620)
    at com.elvyx.server.DatFile.run(DatFile.java:85)
    at java.lang.Thread.run(Thread.java:619)

    The concerning query:

    select
    businessun0_.OID as OID23_,
    businessun0_.beforelastChangeDate as beforela3_23_,
    businessun0_.createDate as createDate23_,
    businessun0_.isChild as isChild23_,
    businessun0_.lastChangeDate as lastChan6_23_,
    businessun0_.legacyOid as legacyOid23_,
    businessun0_.OPTLOCK as OPTLOCK23_,
    businessun0_.companyOID as companyOID23_,
    businessun0_.created as created23_,
    businessun0_.name as name23_,
    businessun0_.parentCompoundBusinessUnit as parentC13_23_,
    businessun0_.prefix as prefix23_,
    businessun0_.assConcreteCorporateBU as assConc14_23_,
    businessun0_.assCompany as assCompany23_,
    businessun0_.DTYPE as DTYPE23_
    from
    BusinessUnit businessun0_
    where
    businessun0_.name='NE'
    and businessun0_.companyOID='com.wuerth.phoenix.Cis.bc.persistent.jpa.CompanyPeer~1125899906894912'

     
  • Guenther Demetz

    Guenther Demetz - 2009-04-09

    Source containing bugfix

     
  • Guenther Demetz

    Guenther Demetz - 2009-04-09

    Following code change fixes the bug (see uploaded DatFile.java) :

    DatFile.java:
    ...
    String statement = st.nextToken();
    > //possible solution for Bug item #2724667
    > //if there are more then 2 tokens left, then the statement itself contains the token
    > while (st.countTokens() > 2) {
    > statement = statement + token + st.nextToken();
    > }
    > //end Bugfix item #2724667

     
  • Guenther Demetz

    Guenther Demetz - 2009-04-09

    The proposed bugfix resolves the problem only for the select category,
    In the com.elvyx.ResultSet category the elapsed time information is completely missing,
    if the statements contains some '~' character.
    The bugfix must be made deeper in the engine maybe by replacing '~' with a more save token.

     

Log in to post a comment.