Jump to content
Changes to the Jaspersoft community edition download ×

Jaspersoft Studio Hibernate Session data adpater does not work


Recommended Posts

In Jaspersoft studio if you try to use a Hibernate Session DataAdapter wizard it aks you for a hibernate cfg & properties file. If you fill these in the then test the connection you get an SQLException

Caused by: java.sql.SQLException: No suitable driver found for jdbc:oracle:thin:@//localhost:1521/XE
    at java.sql.DriverManager.getConnection(DriverManager.java:689)
    at java.sql.DriverManager.getConnection(DriverManager.java:208)

Which is not suprising as you have not told the adapter where the driver or class files are. 

The Hibernate Session data adapter wizard doesn't provide a method to add a classpath and the example used in the documentation doesn't make sense, as it is an example of an hibernate data adapter but the image actually shows a wizard where a JDBC data adapter is being created (which does have a classpath option).

If you following through the documentation & create JDBC DataAdapter even though you want a Hibernate Session one - add the Driver jars & the jars for your application classes. Test connection works - but so does test connection if you dont fill anything in. 

If you then create a report & open the report query dialog & select HQL then you can write your HQL - but Jaspersoft is not apply to read the fields from the connection and you have to add the fields by hand then add them to the report. Then if you preview the report you do not get an exception but it just returns "Document is empty" message with no indication what the problem is. 

Somebody else had similar problem in 2017 & raised a question on StackOverflow  here - nobody was able to supply them with a solution. 


The only way I can get HQL reports to work is if I write the report by hand then invoke the report in Java supplying the hibernate session as parameter. This is of no use for somebody designing the reports as they should be able to preview & test them against their Hibernate datasource. 

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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...