Hi all,
I have deployed a datasource in JBoss server with look up name as "myds/OrcleDS"
And i am able to get the intial context.
on context when i call ctx.lookup("myds/OrcleDS");
I am getting error
javax.naming.NameNotFoundException: myds not bound
Its not taking the "myds/OracleDS" instead taking "myds" only...
How have you configured and deployed your datasource. The JNDI names are hierarchical. The naming parser splits it on the "/" character. So the error message first tries to find the myDS name in the global jndi namespace. On not finding it, it does not move forward. So the problem really is that your datasource either isn't correctly configured or you are using the wrong jndi name.
Where is the client code, looking up the datasource located? Is it in the same JVM as where the datasource is deployed?
Here is my client code.. .which is running on other machine.
And I have configured the DS in JBoss using fallwing xml file placed in <JBOSS_HOME>/Server/default/deploy
I am able to use this datasource through another application (using hibernate) which is deployed in same JBoss server.
But unable to obtain the datasource from remote machine look up.
Even i chaged it from "myds/OracleDS" to "java:myds/OracleDS" still getting the same error:
javax.naming.NameNotFoundException: myds not bound