[ http://issues.apache.org/jira/browse/DERBY-95?page=comments#action_57308 
]
     
Daniel John Debrunner commented on DERBY-95:
--------------------------------------------

EmbeddedXADataSource.getConnection() should not be returning null, as it 
implements the XADataSource.getConnection() contract.

As Shreyas says it is returning null because the formed JDBC URL is not handled 
by Derby.

My guess is that EmbeddedDriver.getConnection() method is (correctly) returning 
null as it does not handle that URL. Thus somehow that null is making 
EmbeddedXADataSource.getConnection() return null, which is strange as the two 
methods have different return types. So I think the DataSource implementations 
probably don't handle a null from EmbeddedDriver.getConnection() correctly.

> NPE when passing in url instead of database name to EmbeddedXADataSource
> ------------------------------------------------------------------------
>
>          Key: DERBY-95
>          URL: http://issues.apache.org/jira/browse/DERBY-95
>      Project: Derby
>         Type: Bug
>   Components: JDBC
>     Reporter: Myrna van Lunteren
>     Priority: Minor
>      Fix For: 10.0.2.1

>
> When passing in a url (e.g. jdbc:derby:mydb) instead of just the database 
> name (e.g. mydb) the XADataSource gives a NullPointerException.
> It should either handle this a little more gracefully & give an error, or 
> accept the url (like EmbeddedDataSource does).

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

Reply via email to