-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: TransactionManagerLookup Error
PostPosted: Mon Jan 19, 2004 1:50 pm 
Newbie

Joined: Sat Jan 17, 2004 7:59 pm
Posts: 4
Hello friends this is my first time using hibernate and i am new to java, i am getting the following error my hibernate.properties file looks like this
**
hibernate.connection.username=root
hibernate.connection.password=
hibernate.connection.url=jdbc:mysql://localhost/test
hibernate.connection.driver_class=com.mysql.jdbc.Driver
hibernate.dialect=net.sf.hibernate.dialect.MySQLDialect
**

12:45:14,980 INFO Environment:432 - Hibernate 2.1.1
12:45:15,010 INFO Environment:466 - loaded properties from resource hibernate.properties: {hibernate.connection.username=root, hibernate.filename=/WEB-INF/lib/mysql-connector-java-3.0.10-stable-bin.jar, hibernate.connection.password=, hibernate.cglib.use_reflection_optimizer=true, hibernate.dialect=net.sf.hibernate.dialect.MySQLDialect, hibernate.connection.url=jdbc:mysql://localhost/test, hibernate.connection.driver_class=com.mysql.jdbc.Driver}
12:45:15,020 INFO Environment:481 - using CGLIB reflection optimizer
12:45:15,030 INFO Configuration:318 - Mapping resource: test/hibernate/Product.hbm.xml
12:45:15,290 INFO Binder:225 - Mapping class: test.hibernate.Product -> products
12:45:15,410 INFO Configuration:584 - processing one-to-many association mappings
12:45:15,410 INFO Configuration:593 - processing one-to-one association property references
12:45:15,410 INFO Configuration:618 - processing foreign key constraints
12:45:15,440 INFO Dialect:82 - Using dialect: net.sf.hibernate.dialect.MySQLDialect
12:45:15,440 INFO SettingsFactory:62 - Use outer join fetching: true
12:45:15,450 INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!)
12:45:15,450 INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 20
12:45:15,460 INFO DriverManagerConnectionProvider:71 - using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost/test
12:45:15,460 INFO DriverManagerConnectionProvider:72 - connection properties: {user=root, password=}
12:45:15,480 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)
12:45:15,731 INFO SettingsFactory:89 - Use scrollable result sets: true
12:45:15,731 INFO SettingsFactory:90 - JDBC 2 max batch size: 15
12:45:15,731 INFO SettingsFactory:99 - Query language substitutions: {}
12:45:15,731 INFO SettingsFactory:110 - cache provider: net.sf.ehcache.hibernate.Provider
net.sf.hibernate.HibernateException: could not instantiate CacheProvider: net.sf.ehcache.hibernate.Provider
at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:115)
at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1091)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:737)
at test.InsertProduct.main(InsertProduct.java:25)
Caused by: java.lang.ClassNotFoundException: net.sf.ehcache.hibernate.Provider
at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:140)
at net.sf.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:86)
at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:112)
... 3 more
Exception in thread "main"


can someone help me please


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 19, 2004 1:59 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
FAQ: http://www.hibernate.org/74.html#A24


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 19, 2004 3:03 pm 
Newbie

Joined: Sat Jan 17, 2004 7:59 pm
Posts: 4
now i get this error

13:06:01,672 INFO Environment:432 - Hibernate 2.1.1
13:06:01,702 INFO Environment:466 - loaded properties from resource hibernate.properties: {hibernate.connection.username=root, hibernate.filename=/WEB-INF/lib/mysql-connector-java-3.0.10-stable-bin.jar, hibernate.connection.password=, hibernate.cglib.use_reflection_optimizer=true, hibernate.dialect=net.sf.hibernate.dialect.MySQLDialect, hibernate.connection.url=jdbc:mysql://localhost/test, hibernate.connection.driver_class=com.mysql.jdbc.Driver}
13:06:01,702 INFO Environment:481 - using CGLIB reflection optimizer
13:06:01,722 INFO Configuration:318 - Mapping resource: test/hibernate/Product.hbm.xml
13:06:01,993 INFO Binder:225 - Mapping class: test.hibernate.Product -> products
13:06:02,103 INFO Configuration:584 - processing one-to-many association mappings
13:06:02,103 INFO Configuration:593 - processing one-to-one association property references
13:06:02,103 INFO Configuration:618 - processing foreign key constraints
13:06:02,133 INFO Dialect:82 - Using dialect: net.sf.hibernate.dialect.MySQLDialect
13:06:02,133 INFO SettingsFactory:62 - Use outer join fetching: true
13:06:02,143 INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!)
13:06:02,143 INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 20
13:06:02,153 INFO DriverManagerConnectionProvider:71 - using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost/test
13:06:02,153 INFO DriverManagerConnectionProvider:72 - connection properties: {user=root, password=}
13:06:02,173 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)
13:06:02,433 INFO SettingsFactory:89 - Use scrollable result sets: true
13:06:02,433 INFO SettingsFactory:90 - JDBC 2 max batch size: 15
13:06:02,433 INFO SettingsFactory:99 - Query language substitutions: {}
13:06:02,433 INFO SettingsFactory:110 - cache provider: net.sf.ehcache.hibernate.Provider
13:06:02,433 INFO Configuration:1057 - instantiating and configuring caches
13:06:02,604 INFO SessionFactoryImpl:119 - building session factory
13:06:03,094 INFO SessionFactoryObjectFactory:82 - no JNDI name configured
[Product] milk(null) price=1.99 amount=100
java.lang.NoClassDefFoundError: javax/transaction/Synchronization
at net.sf.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:312)
at net.sf.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:325)
at net.sf.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:333)
at test.InsertProduct.main(InsertProduct.java:29)
Exception in thread "main"


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 19, 2004 3:04 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Missing JTA.jar

please take a look at the readme file in the lib directory.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 19, 2004 3:16 pm 
Newbie

Joined: Sat Jan 17, 2004 7:59 pm
Posts: 4
Thanks a lot


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.