Hi,
A new problem with finding the default datasource has
popped up on me today.
Unfortunately it seems JNDI related, and I an no expert
on JNDI.
When checking out fresh copies of the jboss and
jbosstest from CVS I have some problems with the
testbeantest and one of them is the server saying:
[Container factory] No resource manager found for jdbc/myDatabase
This wasn't a problem about a week ago, and jbosstest
hasn't changed this datasource name lately.
I think this used to work because jBoss looks for a
default datasource if the specified one cannot be
found.
But now the datasource is bound in the "java:" JNDI space,
and the default lookup in src/main/ejb/Container.java
around line 430 seems unchanged.
Shouldn't line 429 read something like:
NamingEnumeration list = dsCtx.list("java:");
instead of:
NamingEnumeration list = dsCtx.list("");
If I do this, the "No resource manager" warning at
deployment goes away, but testbeantest does still
not run. When trying it I get:
[BMTStateful] BMTStatefulBean.ejbCreate() called
[BMTStateful] javax.naming.NameNotFoundException: DefaultDS not bound
[BMTStateful] at org.jnp.server.NamingServer.getBinding(NamingServer.java:474)
[BMTStateful] at org.jnp.server.NamingServer.getBinding(NamingServer.java:482)
[BMTStateful] at org.jnp.server.NamingServer.getObject(NamingServer.java:488)
[BMTStateful] at org.jnp.server.NamingServer.lookup(NamingServer.java:283)
[BMTStateful] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:295)
[BMTStateful] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:279)
[BMTStateful] at javax.naming.InitialContext.lookup(InitialContext.java:350)
[BMTStateful] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:367)
[BMTStateful] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:403)
[BMTStateful] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:279)
[BMTStateful] at javax.naming.InitialContext.lookup(InitialContext.java:350)
[BMTStateful] at
org.jboss.test.testbean.bean.BMTStatefulBean.createTable(BMTStatefulBean.java:124
I'm confused. Doesn't LinkRef work for the "java:" JNDI
name space?
Best Regards,
Ole Husgaard.