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 "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org> on 2006/04/10 19:50:59 UTC

[jira] Updated: (DERBY-128) Network Server Gives NPE if SQLException has null arguments (e.g. for ERROR XBM0H)

     [ http://issues.apache.org/jira/browse/DERBY-128?page=all ]

Dyre Tjeldvoll updated DERBY-128:
---------------------------------

    Fix Version: 10.1.2.1

Setting fixin to 10.1.2.1 since it was checked into trunk as 179927 < 189890(base rev for 10.1 branch)

> Network Server Gives NPE if SQLException has null arguments   (e.g. for ERROR XBM0H)
> ------------------------------------------------------------------------------------
>
>          Key: DERBY-128
>          URL: http://issues.apache.org/jira/browse/DERBY-128
>      Project: Derby
>         Type: Bug

>   Components: Network Server
>     Versions: 10.0.2.1
>  Environment: Linux 
>     Reporter: Kathey Marsden
>     Assignee: Dyre Tjeldvoll
>     Priority: Minor
>      Fix For: 10.1.2.1
>  Attachments: derby-128.178332.diff, derby-128.178332.stat, derbyall_report.txt
>
> Network server 
>  Network Server throws an NPE because one of the arguments of the SQLException is null.  It shouldn't do so.
> To reproduce try to create a database in the root directory on Linux.  Do not run in security manager.  The trace below came from an extra '/' in the url in NSinSameJVM.java
> The issues are:
> 1)  Network Server throws an NPE because one of the arguments of the SQLException is null in this code.  It shouldn't do so.
> // arguments are variable part of a message
> 	Object[] args = ce.getArguments();
> 	for (int i = 0; args != null &&  i < args.length; i++)
> 		sqlerrmc += args[i].toString() + separator;
> 					
> 2) This exception seems to have null arguments which doesn't seem right.
>    ERROR XBM0H: Directory /NSinSameJVMTestDB cannot be created.
> ERROR XBM0H: Directory /NSinSameJVMTestDB cannot be created.
> 		 at org.apache.derby.iapi.error.StandardException.newException(StandardException.java:322)
> 		 at org.apache.derby.impl.services.monitor.PersistentServiceImpl$8.run(PersistentServiceImpl.java:668)
> 		 at java.security.AccessController.doPrivileged(Native Method)
> 		 at org.apache.derby.impl.services.monitor.PersistentServiceImpl.createServiceRoot(PersistentServiceImpl.java:632)
> 		 at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(BaseMonitor.java:1756)
> 		 at org.apache.derby.impl.services.monitor.BaseMonitor.createPersistentService(BaseMonitor.java:1018)
> 		 at org.apache.derby.iapi.services.monitor.Monitor.createPersistentService(Monitor.java:578)
> 		 at org.apache.derby.impl.jdbc.EmbedConnection.createDatabase(EmbedConnection.java:1504)
> 		 at org.apache.derby.impl.jdbc.EmbedConnection.<init>(EmbedConnection.java:215)
> 		 at org.apache.derby.impl.jdbc.EmbedConnection20.<init>(EmbedConnection20.java:56)
> 		 at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(EmbedConnection30.java:72)
> 		 at org.apache.derby.jdbc.Driver30.getNewEmbedConnection(Driver30.java:73)
> 		 at org.apache.derby.jdbc.Driver169.connect(Driver169.java:175)
> 		 at org.apache.derby.impl.drda.Database.makeConnection(Database.java:245)
> 		 at org.apache.derby.impl.drda.DRDAConnThread.getConnFromDatabaseName(DRDAConnThread.java:1160)
> 		 at org.apache.derby.impl.drda.DRDAConnThread.verifyUserIdPassword(DRDAConnThread.java:1138)
> 		 at org.apache.derby.impl.drda.DRDAConnThread.parseSECCHK(DRDAConnThread.java:2613)
> 		 at org.apache.derby.impl.drda.DRDAConnThread.parseDRDAConnection(DRDAConnThread.java:1001)
> 		 at org.apache.derby.impl.drda.DRDAConnThread.exchangeServerAttributes(DRDAConnThread.java:950)
> 		 at org.apache.derby.impl.drda.DRDAConnThread.sessionInitialState(DRDAConnThread.java:563)
> 		 at org.apache.derby.impl.drda.DRDAConnThread.run(DRDAConnThread.java:219)
> Cleanup action completed
> 2005-01-21 01:12:12.794 GMT Thread[DRDAConnThread_2,5,derby.daemons] (DATABASE = /NSinSameJVMTestDB), (DRDAID = {2}), Failed to create database '/NSinSameJVMTestDB', see the next exception for details.
> 2005-01-21 01:12:12.795 GMT Thread[DRDAConnThread_2,5,derby.daemons] (DATABASE = /NSinSameJVMTestDB), (DRDAID = {2}), Directory /NSinSameJVMTestDB cannot be created.
> 2005-01-21 01:12:12.816 GMT Thread[DRDAConnThread_2,5,derby.daemons] (DATABASE = /NSinSameJVMTestDB), (DRDAID = NF000001.A9FB-4124733202448020360{2}), Failed to create database '/NSinSameJVMTestDB', see the next exception for details.
> 2005-01-21 01:12:12.816 GMT Thread[DRDAConnThread_2,5,derby.daemons] (DATABASE = /NSinSameJVMTestDB), (DRDAID = NF000001.A9FB-4124733202448020360{2}), null
> null
> java.lang.NullPointerException
> 		 at org.apache.derby.impl.drda.DRDAConnThread.writeSQLCAGRP(DRDAConnThread.java:5076)
> 		 at org.apache.derby.impl.drda.DRDAConnThread.writeSQLCARD(DRDAConnThread.java:4882)
> 		 at org.apache.derby.impl.drda.DRDAConnThread.parseDRDAConnection(DRDAConnThread.java:1042)
> 		 at org.apache.derby.impl.drda.DRDAConnThread.exchangeServerAttributes(DRDAConnThread.java:950)
> 		 at org.apache.derby.impl.drda.DRDAConnThread.sessionInitialState(DRDAConnThread.java:563)
> 		 at org.apache.derby.impl.drda.DRDAConnThread.run(DRDAConnThread.java:219)
> null
> java.lang.NullPointerException
> 		 at org.apache.derby.impl.drda.DRDAConnThread.writeSQLCAGRP(DRDAConnThread.java:5076)
> 		 at org.apache.derby.impl.drda.DRDAConnThread.writeSQLCARD(DRDAConnThread.java:4882)
> 		 at org.apache.derby.impl.drda.DRDAConnThread.parseDRDAConnection(DRDAConnThread.java:1042)
> 		 at org.apache.derby.impl.drda.DRDAConnThread.exchangeServerAttributes(DRDAConnThread.java:950)
> 		 at org.apache.derby.impl.drda.DRDAConnThread.sessionInitialState(DRDAConnThread.java:563)
> 		 at org.apache.derby.impl.drda.DRDAConnThread.run(DRDAConnThread.java:219)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira