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

Unable to create databases whose name containg Chinese characters through the client driver

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments


    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s:
    • Fix Version/s:
    • Component/s: Network Client
    • Labels:
    • Environment:
      Debian unstable, LInux, libc 2.3.5-6
    • Urgency:
    • Issue & fix info:
      High Value Fix, Repro attached
    • Bug behavior facts:
      Embedded/Client difference


      Trying to create a database with the following URL (note the Chinese character in the database name):


      throws the following exception:

      Exception in thread "main" org.apache.derby.client.am.SqlException: Unicode string can't convert to Ebcdic string
      at org.apache.derby.client.net.EbcdicCcsidManager.convertFromUCS2(Unknown Source)
      at org.apache.derby.client.net.Request.writeScalarPaddedString(Unknown Source)
      at org.apache.derby.client.net.NetConnectionRequest.buildRDBNAM(Unknown Source)
      at org.apache.derby.client.net.NetConnectionRequest.buildACCSEC(Unknown Source)
      at org.apache.derby.client.net.NetConnectionRequest.writeAccessSecurity(Unknown Source)
      at org.apache.derby.client.net.NetConnection.writeServerAttributesAndKeyExchange(Unknown Source)
      at org.apache.derby.client.net.NetConnection.flowServerAttributesAndKeyExchange(Unknown Source)
      at org.apache.derby.client.net.NetConnection.flowUSRIDONLconnect(Unknown Source)
      at org.apache.derby.client.net.NetConnection.flowConnect(Unknown Source)
      at org.apache.derby.client.net.NetConnection.<init>(Unknown Source)
      at org.apache.derby.jdbc.ClientDriver.connect(Unknown Source)
      at java.sql.DriverManager.getConnection(DriverManager.java:525)
      at java.sql.DriverManager.getConnection(DriverManager.java:193)
      at jdbctest.Main.main(Main.java:33)

      It's possible, however, to create databases using the embedded driver, using an URL like:


      Tested with both and with the same result.

      Complete code to reproduce the bug:

      public static void main(String[] args) throws Exception {
      Connection conn = DriverManager.getConnection("jdbc:derby://localhost:1527/\u4e10;create=true");


        1. derby-728-startingpoint.diff
          186 kB
          Dyre Tjeldvoll
        2. derby-728_proto_diff.txt
          34 kB
          Katherine Marsden
        3. DERBY-728_p2-test.diff
          6 kB
          Tiago R. Espinha
        4. DERBY-728_p2-test.diff
          6 kB
          Tiago R. Espinha
        5. DERBY-728_p2-test.diff
          5 kB
          Tiago R. Espinha
        6. DERBY-728_p2-test.diff
          1 kB
          Tiago R. Espinha
        7. DERBY-728_p2.diff
          13 kB
          Tiago R. Espinha
        8. DERBY-728_p2.diff
          14 kB
          Tiago R. Espinha
        9. DERBY-728_p2.diff
          16 kB
          Tiago R. Espinha
        10. DERBY-728_p2.diff
          18 kB
          Tiago R. Espinha
        11. DERBY-728_p1.diff
          12 kB
          Tiago R. Espinha
        12. DERBY_728_p3.diff
          4 kB
          Tiago R. Espinha
        13. DERBY_728_p2_sanity.diff
          2 kB
          Tiago R. Espinha
        14. BigTableName.java
          4 kB
          Richard N. Hillegas
        15. ACR7007.pdf
          863 kB
          Katherine Marsden

        Issue Links



            • Assignee:
              espinha Tiago R. Espinha
              andrei.badea Andrei Badea


              • Created:

                Issue deployment