• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Hibernate: Couldn't get connection pooling to work

 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I followed this hibernate tutorial at http://www.gloegl.de/8.html and I a little modification to it so that it runs in J2EE app. I could get it to work with regular jdbc connection based on the setting below:-



So, I tried to convert it to run with connection pooling with the following settings:-



When I run it again, I get the following error:-



At first, I thought I messed up my JNDI settings in my server and web.xml. So, I did a test on the following codes with the same sql statement generated by hibernate, and it works:-



May I know where I set wrongly in my hibernate.cfg.xml for my connection pooling? I have been messing around for 2 hours now, but still couldn't get it to work.

Any tips would be greatly appreciated! Thanks.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


[IBM][SQLServer JDBC Driver]Unsupported method: Connection.prepareStatement


What driver are you using? Because it seems to be saying that it doesn't support Connection.prepareStatement...
 
Choon-Chern Lim
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Paul,

I'm using the driver from WAS v6... com.ibm.websphere.jdbcx.sqlserver.SQLServerDataSource, that driver was provided when I set up my JNDI in the server.

Somehow, I could get it to work when I look up the JNDI by writing my own codes... but I'm clueless why it's not working with hibernate.

Thanks.
 
Paul Sturrock
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't know how good that driver is - you might try a different one (google for jTDS) or ask the folks in the WebSphere forum. The error message suggests Hibernate is trying to use a method that is unsupported by that driver.
reply
    Bookmark Topic Watch Topic
  • New Topic