AndrewWA Posted July 25, 2007 Share Posted July 25, 2007 Hi,I'm using iReports 2.0.0 with Hibernate, or at least i'm trying to. Everytime I try to test my Hibernate connection it comes up with the error like "Error Reading Resource : blah/model/Address.hbm.xml". My Hibernate stuff all works in Eclipse and deployed on JBoss so i'm happy that my mappings are correct. I've narrowed the problem down the the version mapping within each file, if i remove iReports has no problem with that file. Code:<version name="version" type="int"> <column name="version" not-null="true" /> </version> Thats the column in question. Is there a reason this doesn't work in iReports and is there a workaround for it without changing all my mapping files? Andrew Aitken Link to comment Share on other sites More sharing options...
AndrewWA Posted July 25, 2007 Author Share Posted July 25, 2007 Oops, Just noted that iReports only comes packaged with Hibernate 3.0.5. I replaced the lib jar with Hibernate 3.2 (GA) and it works fine now. Andrew Aitken Link to comment Share on other sites More sharing options...
RamKumar Posted August 1, 2007 Share Posted August 1, 2007 Hi,I am also getting the same problem. Can you explain me how the problem is resolved? Thanks in advanceRam Link to comment Share on other sites More sharing options...
zgeorge23 Posted January 12, 2008 Share Posted January 12, 2008 You can actually encounter two kinds of errors ... 1) "Error reading resource ..."2) "Could not parse mapping document from resource ..." Ensure that you have the right hibernate3.jar file (ireport2.0.3 ships with hibernate jar from 3.0.5). Changing the hiberante3.jar from the 3.2 version seems to fix the first error. For the second one, try adding the classes directory (where the java classes that are mapped are found) to the CLASSPATH setting in iReport (Options->Classpath). --Zac George Link to comment Share on other sites More sharing options...
moheed2011 Posted December 5, 2011 Share Posted December 5, 2011 plz any one can help me,i'm unable to connect hibernate from ireport 1.3 and i hv one more problem is where to save hibernate.cfg.xml file.i wrote configuration file and saved on desktop,but when i connect hibernate from ireport it showing"/hibernate.cfg.xml not found" due to that i failed to connect.Earlier i used to connect ireport using jdbc connection. 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