[jboss-user] [Beginners Corner] - Re: ClassCastException accessing a DataSource
jaikiran
do-not-reply at jboss.com
Mon Apr 21 03:54:54 EDT 2008
"riflevolunteer" wrote : Hi
|
|
| The JNDI tree I cannot find I can find the JMXConsole but nowhere is there anything called jndiview as described in the wiki. Please advise.
|
|
Did you install JBoss, using the JEMS installer? Just this past week, we had a discussion about this where it turned out that JEMS installer does not configure the JNDIView ( http://www.jboss.com/index.html?module=bb&op=viewtopic&t=133889).
For JNDIView to be available, you will have to download the JBoss zip archive. Unzip it to some location (which does not contain a space in its folder name Ex: D:\JBoss), set JAVA_HOME and start the server.
My intention of asking you to post the contents of the jndi tree was to see what the datasource is being bound to. If re-installing JBoss, is not an option for you, can you try out the following piece of code from the client and post the output?
public static void main(String[] args) {
|
| try {
|
| InitialContext ic;
| Object ds = ic.lookup("MySqlDS");
| Class[] interfaces = ds.getClass().getInterfaces();
| System.out.println("Implemented interfaces: ");
| for (int i = 0; i < interfaces.length; i++) {
| System.out.println("*** " + interfaces);
| }
| }......
| //other stuff
| }
Let's see if this output gives us some clue.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4145387#4145387
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4145387
More information about the jboss-user
mailing list