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 "Kathey Marsden (JIRA)" <de...@db.apache.org> on 2005/01/21 19:29:17 UTC

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

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
    Priority: Minor


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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


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

Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-128?page=comments#action_66509 ]
     
Dyre Tjeldvoll commented on DERBY-128:
--------------------------------------

I just noticed that a patch for DERBY-19 was committed. Looking closer at DERBY-19 it looks like it is a duplicate of DERBY-128? Is it?

> 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
>  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


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

Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-128?page=comments#action_66436 ]
     
Dyre Tjeldvoll commented on DERBY-128:
--------------------------------------

Some comments to the patch:

Problem 1) is fixed by simply replacing the call to "args[i].toString()" with args[i] since the overloaded += operator will 
call toString() if args[i] is a valid object and insert the string "null" if it is null.

Problem 2) happens because the 3 argument overload of newException() is used with an explicit null as the third argument. This inserts a null in the Exception's arg vector. Using the 2 argument version instead eliminates the null in the arg vector.

Only removing the call to toString() would be enough to prevent the NPE, but then a "null" string would appear in the exception message.

> 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
>  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


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

Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-128?page=all ]

Dyre Tjeldvoll reassigned DERBY-128:
------------------------------------

    Assign To: Dyre Tjeldvoll

> 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

>
> 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


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

Posted by "Kathey Marsden (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-128?page=all ]
     
Kathey Marsden closed DERBY-128:
--------------------------------


The network sever part of this issue is fixed.  
The SQLException  having null arguments has been moved to DERBY-336


> 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
>  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


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

Posted by "Samuel Andrew McIntyre (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-128?page=all ]

Samuel Andrew McIntyre updated DERBY-128:
-----------------------------------------

    Fix Version: 10.1.0.0
    Description: 
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)



  was:
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)




> 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.0.0
>  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


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

Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
     [ 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


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

Posted by Kathey Marsden <km...@sbcglobal.net>.
Dyre.Tjeldvoll@Sun.COM wrote:

>Kathey Marsden <km...@sbcglobal.net> writes:
>
>[snip]
>
>  
>
>>Hi Dyre,
>>
>>Could you post a comment giving a summary of your change (e.g. Why you
>>changed from one newException call to another)
>>    
>>
>
>Hmm, sure I can do that. (Actually I didn't think it was necessary
>since you original description describes what the
>problem is, where it is, and implicitly how to fix it... :)
>(Will add a JIRA comment).
>
>  
>

Just in general it is good with the patch to post a brief summary of
what you changed, what tests you ran and the results, for instance, I
ran derbyall and <test> failed because of DERBY-XXX which is unrelated
to my changes.

These will be used by the committer in the checkin comments.   Really
nice if we can just cut and paste.  Otherwise we have to recreate the
comments from the bug history, test logs etc.

>>Can you add  a test for this?
>>    
>>
>
>As in a test for this particular problem (dirctory cannot be created),
>or a general test that checks at "environment" problems are detected
>and reported correctly...?
>
>I can try to make such a test, but it will take me a while since I'm
>not very familiar with the test harness...
>  
>
Always best to add to an existing test, perhaps in this case
NSInSameJVM.java could have a new method that tests this failure.  I
don't know if  File.setReadOnly would help here.



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

Posted by Dy...@Sun.COM.
Kathey Marsden <km...@sbcglobal.net> writes:

[snip]

> Hi Dyre,
>
> Could you post a comment giving a summary of your change (e.g. Why you
> changed from one newException call to another)

Hmm, sure I can do that. (Actually I didn't think it was necessary
since you original description describes what the
problem is, where it is, and implicitly how to fix it... :)
(Will add a JIRA comment).

> Can you add  a test for this?

As in a test for this particular problem (dirctory cannot be created),
or a general test that checks at "environment" problems are detected
and reported correctly...?

I can try to make such a test, but it will take me a while since I'm
not very familiar with the test harness...
  
> Also can you confirm that you have run derbyAll ?

I thought I attached derbyall_report.txt along with the diff?

http://issues.apache.org/jira/secure/attachment/20247/derbyall_report.txt


-- 
dt

However, experience shows that for many people and many applications a
dose of paranoia is reasonable - Bjarne Stroustrup


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

Posted by Kathey Marsden <km...@sbcglobal.net>.
Dyre Tjeldvoll (JIRA) wrote:

>     [ http://issues.apache.org/jira/browse/DERBY-128?page=comments#action_66337 ]
>     
>Dyre Tjeldvoll commented on DERBY-128:
>--------------------------------------
>
>I have added a patch for this. I modified the test locally (so that directory creation fails) to reproduce the error. With the patch you still get an exception, but not the following NPE(s).
>
>  
>
Hi Dyre,

Could you post a comment giving a summary of your change (e.g. Why you
changed from one newException call to another)
Can you add  a test for this?  
Also can you confirm that you have run derbyAll ?

Thanks

Kathey




 


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

Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-128?page=comments#action_66337 ]
     
Dyre Tjeldvoll commented on DERBY-128:
--------------------------------------

I have added a patch for this. I modified the test locally (so that directory creation fails) to reproduce the error. With the patch you still get an exception, but not the following NPE(s).

derbyall reports 4 failures but these seem to be the same as those reported at
http://www.multinet.no/~solberg/public/Apache/Derby/testlog/Linux-2.4.21-27.ELsmp_i686-i686/178510-derbyall_diff.txt
so I assume that they are not related to my change.
 
I hope that a committer can take a look at the patch. 


> 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
>  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


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

Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-128?page=all ]
     
Dyre Tjeldvoll reopened DERBY-128:
----------------------------------


Reopen to set fixin

> 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
>  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


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

Posted by Dy...@Sun.COM.
Kathey Marsden <km...@sbcglobal.net> writes:

[snip]

> As I see it there are two core issues
>
>  1) Network Server shouldn't throw an NPE if an SQLException as null
> arguments.
>      You fixed this and I think  your test change is probably good for
> testing that.
>
> 2)  An SQLException shouldn't  have null arguments.  It should have the
> same number of meaningful arguments as there are {} markers in the
> messages_en.properties  file.
>      For DERBY-19, it looks like Dan changed a null argument to a
> meaningful argument. 
>      For the exception listed in DERBY-128 (XBM0H:) it looks like the
> exception requires only one argument but we were
>       calling the wrong method and passing an extra null argument along
> the way.
>
> The problem is that once  you fix all the instances of issue 2,  issue 1
> is no longer an issue #:). So,  I think there is no long term test
> solution here.

OK :)

> So I would say
>  
>  File a bug for the XBM0H exception  being generated with null
> arguments.   File a patch plus your NSinSameJVM test.
> The  NSinSameJVM test will  be a good test of a hard to test
> exception.   I think you need security manager to reproduce and only the
> network server tests run with security manager.  Embedded gets tested
> because network server just makes embedded calls.

OK, I get it now. I made a mistake when trying to get svn to show me
what you committed in 179927. I had the full patch in my sandbox,
updated to 179927 and diffed against PREV. That made it look like you
had committed the whole patch... :( So I could not figure out what you
wanted me to do... Sorry about the confusion.

Using 'find' I can only find one other place where
'SQLState.SERVICE_DIRECTORY_CREATE_ERROR' is used:
.../impl/store/raw/data/BaseDataFileFactory.java

                throw StandardException.newException( SQLState.SERVICE_DIRECTORY_CREATE_ERROR, dataDirectory, ioe);

So here ioe (an IOException) is added to the StandardException. But I
think this is wrong, because if you want the ioe to be the "next
execption" it needs to be the SECOND argument. As it stands, the ioe
will be inserted into the vector and not used since the message (as
you pointed out) only takes one arg... 

I'll create the jira issue :)

> As for the funny characters, that is DERBY-285 and on my list to fix
> this weekend so I better go do that now #:)

Not to worry :)

-- 
dt

However, experience shows that for many people and many applications a
dose of paranoia is reasonable - Bjarne Stroustrup


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

Posted by Kathey Marsden <km...@sbcglobal.net>.
Dyre.Tjeldvoll@Sun.COM wrote:

>OK. From the description of DERBY-19 it looked like it could be the
>same. But when I looked at the diff for 178795 I could not really see
>how it could fix DERBY-128.
>
>  
>
As I see it there are two core issues

 1) Network Server shouldn't throw an NPE if an SQLException as null
arguments.
     You fixed this and I think  your test change is probably good for
testing that.

2)  An SQLException shouldn't  have null arguments.  It should have the
same number of meaningful arguments as there are {} markers in the
messages_en.properties  file.
     For DERBY-19, it looks like Dan changed a null argument to a
meaningful argument. 
     For the exception listed in DERBY-128 (XBM0H:) it looks like the
exception requires only one argument but we were
      calling the wrong method and passing an extra null argument along
the way.

The problem is that once  you fix all the instances of issue 2,  issue 1
is no longer an issue #:). So,  I think there is no long term test
solution here.

So I would say
 
 File a bug for the XBM0H exception  being generated with null
arguments.   File a patch plus your NSinSameJVM test.
The  NSinSameJVM test will  be a good test of a hard to test
exception.   I think you need security manager to reproduce and only the
network server tests run with security manager.  Embedded gets tested
because network server just makes embedded calls.

As for the funny characters, that is DERBY-285 and on my list to fix
this weekend so I better go do that now #:)

Kathey





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

Posted by Dy...@Sun.COM.
Kathey Marsden <km...@sbcglobal.net> writes:

[snip]
Thank you for committing the patch :)

> I saw from an earlier email that you are investigating whether the
> second part of this bug is
> the same as Derby-19 that Dan fixed   with svn 178795.
>
> I don't know if it is,  but  I think it makes sense for you to mark this
> bug fixed since you fixed the nape in network server and then you can
> open another issue for the SQL Exception if this is indeed a different
> issue than DERBY-19.

OK. From the description of DERBY-19 it looked like it could be the
same. But when I looked at the diff for 178795 I could not really see
how it could fix DERBY-128.

Anyway I have tried to run NSinSameJVM.java with the extra '/' and it
still fails (with NPE) even with DERBY-19... 
DERBY-128 takes care of the NPE, but it is correct to return an SQL
Exception in this case, isn't it?

I have looked into extending NSinSameJVM.java to test creation of a
database without write permission, and I have a couple of questions:

1) By extending NSinSameJVM.java this will not be tested in embedded
   mode. Is that OK? 

2) The output when NSinSameJVM.java fails contains non-printing
 characters:

main-NSinSameJVM: Derby drivers loaded
Server is ready to accept connections on port 20000.
Connection number: 1.
main-NSinSameJVM: NetworkServer started
Connection number: 2.
FAIL: Unexpected exceptionDERBY SQL error: SQLCODE: -1, SQLSTATE: XJ041, SQLERRMC: /NSinSameJVMTestDBXJ041.CXBM0H:/NSinSameJVMTestDBXBM0H.DFailed to create database '/NSinSameJVMTestDB', see the next exception for details.Directory /NSinSameJVMTestDB cannot be created.(server log:/export/home/tmp/DERBY/NSinSameJVM.java_Linux_20050604T131217/DerbyNetClient/NSinSameJVM/derby.log)org.apache.derby.client.am.SqlException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ041, SQLERRMC: /NSinSameJVMTestDBXJ041.CXBM0H:/NSinSameJVMTestDBXBM0H.DFailed to create database '/NSinSameJVMTestDB', see the next exception for details.Directory /NSinSameJVMTestDB cannot be created.(server log:/export/home/tmp/DERBY/NSinSameJVM.java_Linux_20050604T131217/DerbyNetClient/NSinSameJVM/derby.log)

(Note the ^T characters)

 Is that expected? And is it safe to put this in an updated master
   file? Will it be portable?

Thanks,

-- 
dt



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

Posted by Kathey Marsden <km...@sbcglobal.net>.
Kathey Marsden (JIRA) wrote:

>    [ http://issues.apache.org/jira/browse/DERBY-128?page=comments#action_12312611 ] 
>
>Kathey Marsden commented on DERBY-128:
>--------------------------------------
>
>I committed the Network Server part of this patch.  
>
>Sending        drda\DRDAConnThread.java
>Transmitting file data .
>Committed revision 179927
>
>  
>

Hi Dyer,

I saw from an earlier email that you are investigating whether the
second part of this bug is
the same as Derby-19 that Dan fixed   with svn 178795.

I don't know if it is,  but  I think it makes sense for you to mark this
bug fixed since you fixed the nape in network server and then you can
open another issue for the SQL Exception if this is indeed a different
issue than DERBY-19.

Thanks

Kathey





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

Posted by "Kathey Marsden (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-128?page=comments#action_12312611 ] 

Kathey Marsden commented on DERBY-128:
--------------------------------------

I committed the Network Server part of this patch.  

Sending        drda\DRDAConnThread.java
Transmitting file data .
Committed revision 179927



> 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
>  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


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

Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-128?page=all ]
     
Dyre Tjeldvoll closed DERBY-128:
--------------------------------

    Resolution: Fixed

> 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


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

Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-128?page=all ]
     
Dyre Tjeldvoll resolved DERBY-128:
----------------------------------

    Fix Version:     (was: 10.1.0.0)
     Resolution: Fixed

Checked in as 179927.  

> 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
>  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