• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Connection Pooling in JBoss v5.0 with IBM DB2

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I modify the db2-ds.xml file and put it in server/default/deploy folder.The file is


And in J2EE i write this code


But i got this error Message:- Error in DBConnection test not bound
I have to do any more changes?Why this error??Somebody please help......

thanks in advance....
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By default the datasource will bind to java: namespace. So use java:test as the jndi name during the lookup. And remember that the java: namespace is visible only to clients running in the same JVM as the server where the datasource is deployed.
 
damodaran puliyassery
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I use java:test in lookup.i copied the file db2java.jar to jboss<HOME>/server/default/lib folder.But i got this error while try to create connection.
I used the driver name as COM.ibm.db2.jdbc.app.DB2Driver.
Please help me...


 
Ranch Hand
Posts: 650
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The error says you're using the wrong driver class for the url. What that means is the driver class, COM.ibm.db2.jdbc.app.DB2Driver (as you say in your message) doesn't work with the connection url you have specified in the datasource descriptor, jdbc:db2://localhost:50000/dbinventory.

It's been a long time since I worked with DB2, so unless someone can give you better help here, you'll need to look up the JDBC driver help provided by IBM and see what they say. They should include examples of how to configure the datasource properly.

In looking at the xml file you provided, I did notice two things. First, the driver class specified in the file is different from the one specified in the commented instructions in the file - one uses com while the other uses COM. Are you sure you have that correct.
Secondly, it seems the URL format is different for the different types of drivers. Again, read through the documentation and make sure you're using all the correct configuration information for the drive you wish to use.

I hope this helps,
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic