I have configured a datasource in my application, but i have problems
accessing it when when I connect to my application through a webservice and
try to use it!
I get the following error:
"java.lang.NullPointerException: You have accessed the java:comp jndi
context on a thread that has not initialized it"

The code that is use:
InitialContext ctx = new InitialContext();
DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/MyDataSource");
con = ds.getConnection();

I read here  http://cwiki.apache.org/GMOxDOC21/jndi.html
http://cwiki.apache.org/GMOxDOC21/jndi.html  that one can access the
resources by using the "jca:{groupId}/{artifactId}/{j2eeType}/{name}"
notation, but I'm having a hard time figuring out the j2eeType part.

How do I know what to put instead of j2eeType?
-- 
View this message in context: 
http://www.nabble.com/jndi-datasource-access-problem-tp22290284s134p22290284.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.

Reply via email to