Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
10.1.2.1
-
Debian unstable, LInux 2.6.14.2, libc 2.3.5-6
-
Normal
-
High Value Fix, Repro attached
-
Embedded/Client difference
Description
Trying to create a database with the following URL (note the Chinese character in the database name):
jdbc:derby://localhost:1527/\u4e10;create=true
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:
jdbc:derby:\u4e10;create=true
Tested with both 10.1.1.0 and 10.1.2.1 with the same result.
Complete code to reproduce the bug:
----%<----
public static void main(String[] args) throws Exception {
Class.forName("org.apache.derby.jdbc.ClientDriver");
Connection conn = DriverManager.getConnection("jdbc:derby://localhost:1527/\u4e10;create=true");
}
----%<----
Attachments
Attachments
Issue Links
- blocks
-
DERBY-4827 Modify the documentation for the 10.7 release regarding the UTF-8 CCSID manager
- Closed
- is depended upon by
-
DERBY-4805 Increase the length of the RDBNAM field in the DRDA implementation
- Closed
- is part of
-
DERBY-310 Document and/or change Derby client code to match behavior with Embedded driver where possible.
- Closed
- is related to
-
DERBY-4584 Unable to connect to network server if client thread name has Japanese characters
- Closed
- relates to
-
DERBY-2251 When I Create a table with Chinese table name , ij report IO exception.
- Closed
-
DERBY-4799 IllegalArgumentException when generating error message on server
- Closed