This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Build 200511231900 + sjsas_pe-8_2_2005Q2 if user wants to create a database that has chinese, multibyte character in its name, NO database is created and infomational (attached) exception is thrown in the console. Note: When name of database doesn't contain these characters then it is allowed to use them in the table, column and values.
Created attachment 27246 [details] Exception
Looks like a bug in Derby. I'm getting the same error from a simple JDBC application which just connects using the URL: jdbc:derby://localhost:1527/\u4e10;create=true Hopefully we'll be able to workaround by using the embedded driver to create the database, that seems to work, but it's slower, since the Derby system has to be booted and then shut down (instead of telling an already booted server to create a new database). I can experience it even with the newest release (10.1.2.1). Filed Derby issue http://issues.apache.org/jira/browse/DERBY-728
From one of the Sun people working on Derby: The DRDA protocol is open-ended wrt. metadata encoding (the standard supports most known encodings and EBCDIC is the default). Presently, only EBCDIC encoding is implemented in the Derby client and server. I have investigated the code involved, and it is pretty simple to write more encoders/decoders, I even tested with a UTF16-replacement of the EBCDIC encoder/decoder. BUT: the code *using* the encoder/decoder is written out of the assumption that one character maps to one byte on the wire, so it might not be straight forward to fix http://issues.apache.org/jira/browse/DERBY-728
A possible workaround is to check the database name for characters which map to a single byte when converted to EBCDIC.
Upon NetCAT request I added a warning that some characters (other than the interval U+0020..U+00FF) may be unsupported in the database name. Checking in src/org/netbeans/modules/derby/ui/Bundle.properties; /cvs/db/derby/src/org/netbeans/modules/derby/ui/Bundle.properties,v <-- Bundle.properties new revision: 1.7; previous revision: 1.6 done Checking in src/org/netbeans/modules/derby/ui/CreateDatabasePanel.java; /cvs/db/derby/src/org/netbeans/modules/derby/ui/CreateDatabasePanel.java,v <-- CreateDatabasePanel.java new revision: 1.6; previous revision: 1.5 done
This issue is waived for 5.0. Will be mentioned in the release notes.
Marek and Ken, given the fact that Andrei implemented a warning that guides the user, is this still a P2? Can it be downgraded? Thanks.
How about if it just does not allow mbyte or other non ascii in it - the current warning says the first mbyte char it sees might be unsupported in dbase name but it allows ok to be selected then the error popup says An error occured while creating the database: Unicode string can't convert to Ebcdic string" which does not seems clear and not tell really if dbase created and there was an error or if dbase just not created (it was not) so if just disallow the dbase create window to complete, it will be clearer to user. ken.frank@sun.com
The current message is not an error message but a warning in order to ensure we don't prevent creating databases on a hypotetical version of Derby in which DERBY-728 was fixed.
I don't see a strong disagreement with downgrading this to P3, so downgrading. I don't have a really strong opinion about the warning vs. error message issue. If anyone strongly believes it would better (considering the consequences) to prevent the user from creating a database with characters outside the supported range in its name then let's do it.
DERBY-728 is still open. Tentatively setting TM to 6.0.
It seems to me that rather than preventing users from creating databases with multibyte characters, we should provide a better error message when it fails. Each Derby exception has a unique code. It's not a stable interface, but we could check the code and if it matches, we can provide more information such as "we were unable to create the database because Java DB/Derby does not support multibyte characters." Does this seem reasonable?
my 2 cents - it sounds like good idea. perhaps also we should add to release notes since its does not seem clear in derby docs that this is the case, or if its there, it might not be as visible up front. ken.frank@sun.com
5b5e662553ff
Integrated into 'main-golden', available in build *200808300201* on http://bits.netbeans.org/dev/nightly/ Changeset: http://hg.netbeans.org/main/rev/5b5e662553ff User: John Baker <jbaker@netbeans.org> Log: #69265 I18N - unable to create a db with chinese character - infomational exception
In NetBeans 0909 build (OpenSolaris, zh locale) I can't create database using zh chars. There is a warning message (see image). Does it expected behavior after the fix?
Created attachment 69550 [details] image
It is correct that a database name with multibyted cannot be created. The message could be improved though. I had changed another message in the Connection dialog and changed the create database to error. I can improve the message slightly
Verified: database with multi byte chars in name can not be created.