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)