Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-4901

trace file shows SQLException Unicode String cannot convert to Ebcdic on successful connetct with International characters

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Trivial
    • Resolution: Unresolved
    • 10.7.1.1
    • None
    • Network Client
    • Normal
    • Newcomer, Repro attached

    Description

      For the purposes of backward compatibility, client attempts to send the database converted to Ebcdic in the server attributes. If it cannot, it will continue and send it in subsequent code points where it can send in UTF-8.

      If a trace file is specified, e.g. with ClientDataSource.setTraceFile() the trace file shows the exception and trace. It might be confusing to have it in the trace file when it results in no real exception. Maybe just a line that it could not be sent on EXCSAT or maybe nothing at all would be fine.

      [derby] END TRACE_CONNECTS
      [derby] BEGIN TRACE_DIAGNOSTICS
      [derby][SQLException@2c302c30] java.sql.SQLException
      [derby][SQLException@2c302c30] SQL state = 22005
      [derby][SQLException@2c302c30] Error code = 20000
      [derby][SQLException@2c302c30] Message = Unicode string cannot convert to Ebcdic string
      [derby][SQLException@2c302c30] Stack trace follows
      org.apache.derby.client.am.SqlException: Unicode string cannot convert to Ebcdic string
      at org.apache.derby.client.net.EbcdicCcsidManager.convertFromJavaString(EbcdicCcsidManager.java:144)
      at org.apache.derby.client.net.EbcdicCcsidManager.convertFromJavaString(EbcdicCcsidManager.java:131)
      at org.apache.derby.client.net.NetConnectionRequest.buildRDBNAM(NetConnectionRequest.java:492)
      at org.apache.derby.client.net.NetConnectionRequest.buildACCSEC(NetConnectionRequest.java:299)
      at org.apache.derby.client.net.NetConnectionRequest.writeAccessSecurity(NetConnectionRequest.java:74)
      at org.apache.derby.client.net.NetConnection.writeServerAttributesAndKeyExchange(NetConnection.java:803)
      at org.apache.derby.client.net.NetConnection.flowServerAttributesAndKeyExchange(NetConnection.java:742)
      at org.apache.derby.client.net.NetConnection.flowUSRIDPWDconnect(NetConnection.java:586)
      at org.apache.derby.client.net.NetConnection.flowConnect(NetConnection.java:404)
      at org.apache.derby.client.net.NetConnection.initialize(NetConnection.java:303)
      at org.apache.derby.client.net.NetConnection.<init>(NetConnection.java:236)
      at org.apache.derby.client.net.NetConnection40.<init>(NetConnection40.java:85)
      at org.apache.derby.client.net.ClientJDBCObjectFactoryImpl40.newNetConnection(ClientJDBCObjectFactoryImpl40.java:282)
      at org.apache.derby.jdbc.ClientDataSource.getConnectionX(ClientDataSource.java:213)
      at org.apache.derby.jdbc.ClientDataSource.getConnection(ClientDataSource.java:167)

      Also I noted the international characters print as question marks. I think this is normal but it might be nice if they printed as escaped unicode.

      Program NLSConnectDataSource.java and nlstrace.out will be attached.

      Attachments

        1. NLSConnectDataSource.java
          1 kB
          Katherine Marsden
        2. nlstrace.out
          28 kB
          Katherine Marsden

        Activity

          People

            Unassigned Unassigned
            kmarsden Katherine Marsden
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: