0

in my project im using a DB with my sql and eclipse , tomcat

whene i did the configuration of hibernate i chose jboos as a server and now when im trying to run my jsp page i get this error

Servlet.service() for servlet [jsp] in context with path [/myEBook] threw exception [javax.servlet.ServletException: java.lang.ExceptionInInitializerError] with root cause

java.lang.ClassCastException: net.sf.hibernate.transaction.JBossTransactionManagerLookup cannot be cast to net.sf.hibernate.transaction.TransactionFactory

if you need more detail just ask , need help

helios
  • 2,603
  • 4
  • 21
  • 26
Dilllllo
  • 448
  • 5
  • 10
  • 24

1 Answers1

2

You aren't running JBOSS; you're running Tomcat.

The package net.hibernate is pretty old. Hibernate 3 packages all start with org.hibernate. I'd recommend upgrading those right away.

I'd recommend looking at this answer. If you must have JTA, be sure to have the JTA JARs in your WEB-INF/lib and some implementation like JOTM, too.

Community
  • 1
  • 1
duffymo
  • 305,152
  • 44
  • 369
  • 561
  • when i use Hibernate 3 i get error on PersistentEnum , i dont understand what i have to do ??? – Dilllllo Jun 22 '11 at 00:43
  • i change the name="transaction.factory_class">org.hibernate.transaction.JBossTransactionManagerLookup thread with org.hibernate.transaction.JDBCTransactionFactory thread i found that in your link thank you sir – Dilllllo Jun 22 '11 at 00:56