Re: Hibernate Exception...
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Neil, On 3/9/2009 11:44 AM, Neil B. Cohen wrote: > This week, I erased and rebuilt my desktop system - moved it from Fedora > 8 to Fedora 10. I re-installed Netbeans and Tomcat. [snip] > *Exception Details: * java.lang.NoClassDefFoundError > Could not initialize class org.hibernate.ejb.Ejb3Configuration You probably forgot to put your hibernate JDBC driver into Tomcat's lib directory. If you are using Tomcat's JNDI DataSource, I believe you must put the JDBC driver into Tomcat's lib directory. You didn't mention your TC version, so: 5.5: usually in $CATALINA_BASE/common/lib 6.0: usually in $CATALINA_BASE/lib Hope that helps, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkm5H2oACgkQ9CaO5/Lv0PBS9ACdE2hX8+RiqiYzVQunrctqq1ag Ie4AoKtdKlMFtewSzb1d/mm2jbquVjQ1 =aJeU -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Hibernate Exception
Hi Ken - I forgot to include the version - it is Hibernate 3.2. I did include hibernate-entitymanager.jar... Turns out, when I rebuilt my machine, I downloaded Netbeans, including Tomcat 6.0.18. On my Fedora 8 system, I had downloaded Tomcat separately, direct from apache.org. After trying several things (my thanks to Martin Gainty for his suggestions...) I ended up erasing the tomcat server (which was labeled 6.0.18) and I downloaded a new 6.0.18 from apache.org. Untar'd that, re-deployed my application and it works fine... So I'm assuming Sun customized their tomcat version somehow - I've sent them a bug report with as much info as I have - which isn't all that much... So I'm up and running again... Problem dodged, if not actually solved... nbc ---- Subject: Re: Hibernate Exception... From: Ken Bowen Date: Mon, 9 Mar 2009 13:16:57 -0400 To: "Tomcat Users List" Clearly you're missing org.hibernate.ejb.Ejb3Configuration (and friends). I'm running hibernate 3.2 (you should tell people your versions...it helps). My eclipse tells me that org.hibernate.ejb.Ejb3Configuration lives in hibernate-entitymanager.jar. I seem to recall there being an issue about getting all the dependent files together. If you are relying on Fedora, you might find some mismatches in versions. --Ken On Mar 9, 2009, at 11:44 AM, Neil B. Cohen wrote: Exception Details: * java.lang.NoClassDefFoundError Could not initialize class org.hibernate.ejb.Ejb3Configuration - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Hibernate Exception...
Clearly you're missing org.hibernate.ejb.Ejb3Configuration (and friends). I'm running hibernate 3.2 (you should tell people your versions...it helps). My eclipse tells me that org.hibernate.ejb.Ejb3Configuration lives in hibernate-entitymanager.jar. I seem to recall there being an issue about getting all the dependent files together. If you are relying on Fedora, you might find some mismatches in versions. --Ken On Mar 9, 2009, at 11:44 AM, Neil B. Cohen wrote: Exception Details: * java.lang.NoClassDefFoundError Could not initialize class org.hibernate.ejb.Ejb3Configuration - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Hibernate Exception...
I hope this is a trivial problem that someone can help me with... I have been running a web app, built using Netbeans with Tomcat for months now. The system uses Hibernate for database access. This week, I erased and rebuilt my desktop system - moved it from Fedora 8 to Fedora 10. I re-installed Netbeans and Tomcat. Netbeans rebuilds my program without any problem, but when I try to connect to the database (my login screen comes up fine) I get this: *Exception Handler * *Description: * An unhandled exception occurred during the execution of the web application. Please review the following stack trace for more information regarding the error. *Exception Details: * java.lang.NoClassDefFoundError Could not initialize class org.hibernate.ejb.Ejb3Configuration *Possible Source of Error: * Class Name: /org.hibernate.ejb.HibernatePersistence/ File Name: /HibernatePersistence.java/ Method Name: /createEntityManagerFactory/ Line Number: /124/ |Source not available. Information regarding the location of the exception can be identified using the exception stack trace below. | *Stack Trace: * |org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:124) javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:52) javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:34) com.verisign.ncat.db.Ctl_User.getEntityManager(Ctl_User.java:36) com.verisign.ncat.db.Ctl_User.validateUser(Ctl_User.java:46) com.verisign.ncat.dm.User.validate(User.java:256) com.verisign.ncat.jsp.Page1.b_Login_action(Page1.java:185) sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-2)| and it goes on for several pages. Netbeans did not complain about missing libraries or missing classes. I have just downloaded the latest version of Hibernate and updated my libraries. In /usr/local/Tomcat, I find this: [nco...@nbc-penguin Tomcat]$ find . |grep hibernate ./webapps/NCAT/WEB-INF/lib/hibernate-core.jar ./webapps/NCAT/WEB-INF/lib/hibernate-annotations.jar ./webapps/NCAT/WEB-INF/lib/hibernate-commons-annotations.jar ./webapps/NCAT/WEB-INF/lib/hibernate-entitymanager.jar So the entity-manager is there as far as I can tell. Can someone tell me what I need to do (or look for) to fix this problem?? Much obliged, nbc NAME: Neil B. Cohen (Verisign Inc.) PHONE: 703-948-4471 DOMAIN: nco...@verisign.com * * Murphy's Philosophy: Smile - tomorrow will be worse... * * O'Tooles Commentary: Murphy was an optimist! * - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org