-->
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: configure sessoinfactory using jndi with tomcat5.0.28
PostPosted: Fri Jul 11, 2008 6:41 am 
Newbie

Joined: Thu Jul 10, 2008 8:30 am
Posts: 1
hi everybody

i'm using tomcat 5.0.28 and hibernate. as i have studied and the article
" Using JNDI-bound SessionFactory with Tomcat 4.1+" states that tomcat provides readonly jndi implementation and to use JNDI-bound SessionFactory with Tomcat, we should write custom resource factory class for SessionFactory and setup it Tomcat's configuration i have done the same

i have followed the article provided in: http://www.hibernate.org/416.html

i have placed the following code inside the <GlobalNamingResource> tag wihtin the server.xml



<Resource name="hibernate/SessionFactory" auth="Container"
type="org.hibernate.SessionFactory"/>
<ResourceParams name="hibernate/SessionFactory">
<parameter>
<name>factory</name>
<value>myutil.hibernate.HibernateSessionFactoryTomcatFactory</value>
</parameter>
<parameter>
<name>configuration</name>
<value>hibernate-sample.cfg.xml</value>
</parameter>
</ResourceParams>

now when i start my tomcat i get the following exception:::

i've been searching in the web but not able to get the answer so somebody please help me with this.
thankyou

brajen
=====================Exception that occured

SEVERE: Exception processing Global JNDI Resources
javax.naming.NamingException: Could not create resource factory, ClassNotFoundEx
ception:myutil.hibernate.HibernateSessionFactoryTomcatFactory
at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceF
actory.java:80)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:3
04)
at org.apache.naming.NamingContext.lookup(NamingContext.java:791)
at org.apache.naming.NamingContext.lookup(NamingContext.java:151)
at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBe
ans(GlobalResourcesLifecycleListener.java:155)
at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBe
ans(GlobalResourcesLifecycleListener.java:160)
at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBe
ans(GlobalResourcesLifecycleListener.java:125)
at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.lifecycle
Event(GlobalResourcesLifecycleListener.java:97)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:119)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:230
6)
at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)


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.