[SJN-49] Unable to load a DS in jdbc/FooDS.properties | |
| Status: | Closed |
| Project: | Simple-JNDI |
| Component/s: | |
| Affects Version/s: | 0.9 |
| Fix Version/s: | 0.9.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | Henri Yandell | Assignee: | 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. |