This is an exported version of the JIRA issue tracker. Please use the Google Code site to open new tickets or report updates to these existing tickets. Feel free to contact the mailing list with any questions.

[SJN-49] Unable to load a DS in jdbc/FooDS.properties
Created: Tue, 10 Feb 2004 20:20:29 -0800 (PST)  Updated: Tue, 10 Feb 2004 20:26:09 -0800 (PST)

Status:Closed
Project:Simple-JNDI
Component/s:
Affects Version/s:0.9
Fix Version/s:0.9.1

Type:BugPriority: Major
Reporter:Henri YandellAssignee:Henri Yandell
Resolution:Fixed 
Environment:


 Description   
When I call datasource.getConnection(), I receive the error
"java.sql.SQLException: The url cannot be null."

However, my properties clearly have a URL:

type=javax.sql.DataSource
  url=jdbc:db2:DSNT
  driver=COM.ibm.db2.jdbc.app.DB2Driver
  user=TheUser
  password=xxxxxxxx

I don't know if this matters, but I am creating InitialContext this way:

Hashtable parms = new Hashtable(1);
  parms.put(Context.INITIAL_CONTEXT_FACTORY,
"org.osjava.jndi.PropertiesFactory");
  parms.put("org.osjava.jndi.root", "classpath://conf/dev");
  parms.put("org.osjava.jndi.delimiter", "/");
  Context ctx = new InitialContext(parms);
  DataSource ds = (DataSource)ctx.lookup("jdbc/RAMWorkbench4DB2Data");
Comment by bayard [ Tue, 10 Feb 2004 20:21:52 -0800 (PST) ]
Reported by Eric Jung.

ClasspathUnitTest breaks on 0.9.

I believe the problem was introduced recently, I've put together a fix but that block of code could do with a bit of an improvement. 0.9.1 passes the test.