-
1. Re: Class Cast Exception thrown when casting Data Source jb
peterj Aug 29, 2006 1:21 PM (in response to pranava_kumar2003)Are you saying that line
System.out.println(dSource.toString());
printsorg.jnp.interfaces.NamingContext
If that is true, then I am not surpised about the class cast exception.
I would try:
Object dSource = context.lookup("java:qpmDS");
Also, have you used JNDIView to see what is in the namespace? -
2. Re: Class Cast Exception thrown when casting Data Source jb
pranava_kumar2003 Aug 30, 2006 2:23 AM (in response to pranava_kumar2003)Hi peter ,
Thanks for your reply.
ya Its returning :
org.jnp.interfaces.NamingContext
but In my web application program its returning DataSource Object only.
and if i use the jndi name as java:qpmDS its returning no name bound on this
And I dont know about how to use JNDIView
thanks
pranav -
3. Re: Class Cast Exception thrown when casting Data Source jb
peterj Aug 30, 2006 1:24 PM (in response to pranava_kumar2003)See this thread, which is about the same problem: http://www.jboss.com/index.html?module=bb&op=viewtopic&t=89470. You might have to read a few of the posts to get to the JNDI issue (the thread starts with a connection issue).
To use JNDIView, use a browser to access the jmx-console, click on the server=JNDIView link (it is about a dozen or so links from the top of the page), and then click on the Invoke button under the list() method. The contents of all JNDI namespaces are printed.