You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Mamta A. Satoor (JIRA)" <ji...@apache.org> on 2014/01/13 18:53:09 UTC

[jira] [Updated] (DERBY-4805) Increase the length of the RDBNAM field in the DRDA implementation

     [ https://issues.apache.org/jira/browse/DERBY-4805?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mamta A. Satoor updated DERBY-4805:
-----------------------------------

    Attachment: DERBY4805_patch2_stat.txt
                DERBY4805_patch2_diff.txt

In the attached DERBY4805_patch2_diff.txt patch, I have made changes so that the new RDBNAM length limit is 1024 and have also changed where this length is taken into account for calculation for max ddm length for PKGNAMCSN. In addition, I have changed the protocol test case to try 1025 bytes as the boundary case which should result in a failure.

But, there is something wrong somewhere because even a simple ij connection against network server results in null pointer exception where I am trying to determine on the client side if we are dealing with a network server that can handle the new 1024 length limit. I am pretty certain this piece of code worked with the earlier patch where I was experimenting with a very high length for RDBNAM so I am not sure why I am getting null pointer exception now. May be some code changes went in since my last patch on Dec 30th. I will debug this more but was wondering if anyone else might have any ideas why there is NPE now.
$ java  -Dij.exceptionTrace=true org.apache.derby.tools.ij
ij version 10.11
ij> ERROR XJ001: Java exception: 'null: java.lang.NullPointerException'.
java.sql.SQLException: Java exception: 'null: java.lang.NullPointerException'.
        at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(SQLExc eptionFactory.java:112)
        at org.apache.derby.client.am.SqlException.getSQLException(SqlException. java:321)
        at org.apache.derby.jdbc.ClientDriver.connect(ClientDriver.java:176)
        at java.sql.DriverManager.getConnection(DriverManager.java:419)
        at java.sql.DriverManager.getConnection(DriverManager.java:391)
        at org.apache.derby.impl.tools.ij.ij.dynamicConnection(ij.java:1483)
        at org.apache.derby.impl.tools.ij.ij.ConnectStatement(ij.java:1313)
        at org.apache.derby.impl.tools.ij.ij.ijStatement(ij.java:1101)
        at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(utilMain.java:3 47)
        at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:245)
        at org.apache.derby.impl.tools.ij.Main.go(Main.java:229)
        at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:184)
        at org.apache.derby.impl.tools.ij.Main.main(Main.java:75)
        at org.apache.derby.tools.ij.main(ij.java:59)
Caused by: org.apache.derby.client.am.SqlException: Java exception: 'null: java. lang.NullPointerException'.
        at org.apache.derby.client.net.NetConnection.flowConnect(NetConnection.j ava:407)
        at org.apache.derby.client.net.NetConnection.<init>(NetConnection.java:2 10)
        at org.apache.derby.client.net.ClientJDBCObjectFactoryImpl.newNetConnect ion(ClientJDBCObjectFactoryImpl.java:278)
        at org.apache.derby.jdbc.ClientDriver.connect(ClientDriver.java:168)
        ... 11 more
Caused by: java.lang.NullPointerException
        at org.apache.derby.client.net.NetConnection.serverSupportLongRDBNAM(Net Connection.java:1664)
        at org.apache.derby.client.net.NetConnectionRequest.buildRDBNAM(NetConne ctionRequest.java:496)
        at org.apache.derby.client.net.NetConnectionRequest.buildACCSEC(NetConne ctionRequest.java:295)
        at org.apache.derby.client.net.NetConnectionRequest.writeAccessSecurity( NetConnectionRequest.java:70)
        at org.apache.derby.client.net.NetConnection.writeServerAttributesAndKey Exchange(NetConnection.java:758)
        at org.apache.derby.client.net.NetConnection.flowServerAttributesAndKeyE xchange(NetConnection.java:706)
        at org.apache.derby.client.net.NetConnection.flowUSRIDONLconnect(NetConn ection.java:562)
        at org.apache.derby.client.net.NetConnection.flowConnect(NetConnection.j ava:359)
        ... 14 more
ij> exit;



> Increase the length of the RDBNAM field in the DRDA implementation
> ------------------------------------------------------------------
>
>                 Key: DERBY-4805
>                 URL: https://issues.apache.org/jira/browse/DERBY-4805
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Client, Network Server
>    Affects Versions: 10.7.1.1
>            Reporter: Tiago R. Espinha
>            Assignee: Mamta A. Satoor
>              Labels: derby_triage10_9
>         Attachments: DERBY4805_patch2_diff.txt, DERBY4805_patch2_stat.txt, DERBY_4805_diff_patch1.txt
>
>
> Currently, whenever the client driver is used, there is a limit of 255 bytes for the database name. This is defined by the DRDA spec and there has been a discussion on the list [1]/[2] as to whether this limit should be raised due to the introduction of the new ACR that allows for UTF-8 characters.
> UTF-8 characters can take up to four bytes and this reduces the limit in characters dramatically.
> This should be an easy change as there is a codepoint that defines this limit.
> [1] did not work but [2] did
> [1] - http://old.nabble.com/Database-name-length-tt29691419.html
> [2]http://apache-database.10148.n7.nabble.com/Database-name-length-td33182.html



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)