kundan.scorpio Posted December 6, 2012 Share Posted December 6, 2012 I am trying to configure customized naming strategy to hibernate configuration file in jaspe report. I have configured hibernate data source in ireport. Placed all the relevant jars in classpath. I also tested the hibernate connection and get a successful ping.But when I try to write the HQL in ireport HQL query window and try to execuet it, I get an following exceptions: org.hibernate.exception.SQLGrammarException: could not execute query.Error: Could not execute query using iterate.My HQL query is from ActionImpl (Action Impl is the entity) and I have placed all relevant dependent entities in the classpath along with mapping files.The same mapping files used to work earlier when application was not using custom naming strategy of hibernate. But since naming strategy has been introduced, I am not able to load even the bean in HQL query window of ireport which initially used to show all attributes.My application is using a custom naming strategy.Sample mapping file looks like this: "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> SEQ_ACTION SEQ_ACTION_QUEUE_MOVEMENT SEQ_ACTION_QUEUE SEQ_FORCE SEQ_STATION SEQ_ACTION_LOG seq_officer_link SEQ_OFFICER_ROLE SEQ_ACTION_CLASS SEQ_ACTION_TEMPLATE SEQ_ACTION_AUDIT I don't know how can I pass the parameter of this naming strategy to my hibernate.cfg.xml? I found couple of examples on net which says I need to write the logic of setting the name of naming strategyin java code. But I am not sure where to put that class so that it is available to ireport? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now