This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

xa datasource binding problem in jboss

 
adi reddy
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have a XA data source configuration as follows:

when i am running my application , while getting connection by using the jndi name , i am getting the following exception :

12:29:27,125 ERROR [STDERR] javax.naming.NameNotFoundException: ABC not bound
12:29:27,125 ERROR [STDERR] at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
12:29:27,125 ERROR [STDERR] at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
12:29:27,125 ERROR [STDERR] at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
12:29:27,125 ERROR [STDERR] at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
12:29:27,125 ERROR [STDERR] at org.jnp.server.NamingServer.lookup(NamingServer.java:270)
12:29:27,125 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:667)
12:29:27,125 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
12:29:27,125 ERROR [STDERR] at javax.naming.InitialContext.lookup(Unknown Source)
---------
-----

is there any thing wrong!
 
Wendy Gibbons
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch Adi, i am moving this thread to a forum where the jboss people hang out
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where are you looking up the datasource from? Is it a remote standalone application or is it an application within the same server instance? What does the code look like?
 
adi reddy
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry for late reply

i am looking the name in IntialContext!

the code is as follows

try {
Context cxt = new InitialContext();
DataSource ds = (DataSource) cxt.lookup("jdbc/ABC/API");
} catch (NamingException e) {
e.printStackTrace();
}
 
adi reddy
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i got the solution

The following is the solution:

try {
Context cxt = new InitialContext();
DataSource ds = (DataSource) cxt.lookup("java:jdbc/ABC/API");
} catch (NamingException e) {
e.printStackTrace();
}
 
Wendy Gibbons
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Glad you got it solved in the end
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic