Jump to content

Unable to connect using Hibernate


hangman01

Recommended Posts

I am trying to connect to an Oracle 10 database using Hibernate and iReport 2.0.5. When I set up the connection and test it using the Test button it says that the connection was successful but then when I try to write a HQL query I get the message that iReport is unable to connect to the database. I can write a Java class and insert, update, read, and delete records from the database so I am sure that the hibernate.cfg.xml file, the .hbm.xml and Java class are configured correctly.

Can anyone point me to a good tutorial on using hibernate with iReport? All I have found so far do not talk about how to set up iReport to actually use Hibernate.

Link to comment
Share on other sites

  • 4 weeks later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

I am having the exact same problem using Oracle 9i.

 

If I try to run a report with the Hibernate data source I get a error describing a SQL Error. It says it can not find a suitable driver.

 

It seems that the JDBC connection being used by the Hibernate connection is not using the classpath set in the options dialog.

 

I have copied the jar file containing the oracle JDBC driver (ojdbc14.jar in my case) into the iReportlib directory and it now works.

 

Hope this helps.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...