-->
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.  [ 1 post ] 
Author Message
 Post subject: Could not instantiate TransactionManagerLookup using Tomcat
PostPosted: Mon Feb 12, 2007 12:27 am 
Regular
Regular

Joined: Sat Jan 22, 2005 6:57 pm
Posts: 50
Location: Chicago
Hello,

I have spent almost two days on this and it is driving me crazy. Perhaps someone can shed some light.

I am using Tomcat 6 or 5/Hibernate 3.0/MySQL in a Web Application. I am attempting to load up a Hibernate Factory and create a session for the very first time. However, for some reason, the class loader cannot find the file inside of the hibernate code

The exception is thrown stating it cannot find the lookup class "org.hibernate.transaction.CMTTransaction" but it clearly exists in the hibernate3.jar that is located in my WEB-INF/lib directory. In addition, just before I make the cfg.buildSessionFactory() call (which triggers this exception) I created a Class.forName("") and the class was found and created - so I know it can find it!

Hibernate version:
3.0

My Hibernate File
Quote:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

<!-- Generated by MyEclipse Hibernate Tools. -->
<hibernate-configuration>

<session-factory>
<property name="connection.username">ggg</property>
<property name="connection.url">jdbc:mysql://1.2.3.4:3306/dropnow</property>
<property name="dialect">
org.hibernate.dialect.MySQLDialect
</property>
<property name="myeclipse.connection.profile">bbb</property>
<property name="connection.password">aaa</property>
<property name="connection.driver_class">
com.mysql.jdbc.Driver
</property>
<property name="hibernate.hbm2ddl.auto">update</property>
<property name="cache.provider_class">
org.hibernate.cache.EHCacheProvider
</property>
<property name="hibernate.transaction.manager_lookup_class">
org.hibernate.transaction.CMTTransaction
</property>
<property name="hibernate.transaction.factory_class">
org.hibernate.transaction.CMTTransactionFactory
</property>
<mapping resource="drop/hibernate/category/Category.hbm.xml" />
.. more

</session-factory>

</hibernate-configuration>
[/quote.


Full stack trace of any exception that occurs:

Quote:
org.hibernate.HibernateException: Could not instantiate TransactionManagerLookup
at org.hibernate.transaction.TransactionManagerLookupFactory.getTransactionManagerLookup(TransactionManagerLookupFactory.java:47)
at org.hibernate.cfg.SettingsFactory.createTransactionManagerLookup(SettingsFactory.java:370)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:122)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1463)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1004)
at drop.hibernate.drop.DropHibernateFactory.getSessionFactory(DropHibernateFactory.java:90)
at drop.hibernate.drop.DropHibernateFactory.currentSession(DropHibernateFactory.java:117)
at drop.hibernate.HibernateSessionFactory.currentSession(HibernateSessionFactory.java:36)
at drop.service.category.impl.CategoryCacher.initialize(CategoryCacher.java:79)
at drop.service.category.impl.CategoryCacher.<init>(CategoryCacher.java:41)
at drop.service.category.impl.CategoryServiceImpl.<init>(CategoryServiceImpl.java:45)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:171)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:148)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:52)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:486)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:362)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:233)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:145)
at synergy.Synergy.findService(Synergy.java:30)
at dropnow.category.MainCategories.getArray(MainCategories.java:168)
at dropnow.category.MainCategories.getArray(MainCategories.java:155)
at dropnow.main.struts.form.MainForm.getMainCategories(MainForm.java:69)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.commons.beanutils.PropertyUtilsBean.invokeMethod(PropertyUtilsBean.java:1773)
at org.apache.commons.beanutils.PropertyUtilsBean.getSimpleProperty(PropertyUtilsBean.java:1132)
at org.apache.commons.beanutils.PropertyUtilsBean.getNestedProperty(PropertyUtilsBean.java:686)
at org.apache.commons.beanutils.PropertyUtilsBean.getProperty(PropertyUtilsBean.java:715)
at org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:290)
at org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:1008)
at dropnow.tags.OptionsCollectionTagEx.doStartTag(OptionsCollectionTagEx.java:80)
at org.apache.jsp.WEB_002dINF.jsp.main.main_jsp._jspx_meth_html_005foptionsCollection_005f0(main_jsp.java:1761)
at org.apache.jsp.WEB_002dINF.jsp.main.main_jsp._jspx_meth_html_005fselect_005f0(main_jsp.java:1727)
at org.apache.jsp.WEB_002dINF.jsp.main.main_jsp._jspx_meth_html_005fform_005f0(main_jsp.java:1572)
at org.apache.jsp.WEB_002dINF.jsp.main.main_jsp._jspService(main_jsp.java:293)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:390)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:683)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:404)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)
at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:212)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:818)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:624)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
at java.lang.Thread.run(Thread.java:595)


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

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.