Jump to content
Changes to the Jaspersoft community edition download ×

Hibernate Session is not JRFillParameter

Recommended Posts

By: Teunis Gaelbhain - teunis_gael

Hibernate Session is not JRFillParameter

2006-08-14 15:43

I'm working programmatically with Hibernate and Springframework's JasperReportsMultiFormatView. I'm attempting to create a JRQueryExecuter using the JRHibernateQueryExecuterFactory, but I can't seem to pass in my Hibernate Session. Line 103 of JRHibernateQueryExecuter is looking for the Hibernate Session amongst the parameters:


session = (Session) getParameterValue(JRHibernateQueryExecuterFactory.PARAMETER_HIBERNATE_SESSION);


However, the getParameterValue method calls the getParameter method of JRAbstractQueryExecuter (line 142) which casts all values to JRFillParameter. JRFillParameter has a protected constructor, so I don't see a way of wraping a Hibernate Session with JRFillParameter and placing it into the parameter map that I pass into the JRQueryExecuter constructor.


How can I pass in the Hibernate Session?


Also, of what use is getBuiltinParameters() in the JRHibernateQueryExecuterFactory? This is just an array of String, Session, String, Object, and none of these are JRFillParameter.

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