This content has been marked as final.
Show 4 replies
-
1. Re: Problem getting Datasource vi JNDI
mjais Jan 12, 2007 9:34 AM (in response to mjais)I now found out that I can not access the "java:" context outside of JBoss.
when I try to access "Quartz" which is in the Global JNDI Namespace I get this error:
java.lang.ClassCastException: javax.naming.Reference
at ContextTest.getDataSource(ContextTest.java:33)
at ContextTest.main(ContextTest.java:56)
Exception in thread "main" java.lang.NullPointerException
at ContextTest.main(ContextTest.java:58)
the jbossallclient.jar is in my classpath.
Markus -
2. Re: Problem getting Datasource vi JNDI
prakah Jan 12, 2007 10:42 AM (in response to mjais)Hello Markus,
Try with the jndi name as "java:jdbc/QuartzDS". This might solve your problem. -
3. Re: Problem getting Datasource vi JNDI
mjais Jan 12, 2007 11:29 AM (in response to mjais)hi Prakash
thanks for your tip. I already tried all possible combinations.
none of them worked.
Markus -
4. Re: Problem getting Datasource vi JNDI
fudeus Jan 13, 2007 4:59 AM (in response to mjais)"mjais" wrote:
I now found out that I can not access the "java:" context outside of JBoss.
The "java:"-context is only valid for "in-vm"-lookups."mjais" wrote:
calling the code from within a JSF application (deployed on the JBoss where the
Quartz datasource is) doesn't work either
Calls from within JBoss should succeed using ctx.lookup("java:/jdbc/QuartzDS")