-->
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.  [ 4 posts ] 
Author Message
 Post subject: cache problem in hibernate
PostPosted: Mon Mar 27, 2006 5:30 am 
Beginner
Beginner

Joined: Mon Mar 27, 2006 5:25 am
Posts: 39
Location: India Hyderabad
Hi Friends,

Whenever am using the hibernate i am getting some cache exception.
But am not understanding how to slove this cache problem.
If i give Cache Provider class in hibernate.cfg.xml file is also it is giving errors. Wht is the use of this Cache provider class. How to configure this in my application kindly help me.

regards
vinny


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 27, 2006 7:31 am 
Expert
Expert

Joined: Sat Oct 25, 2003 8:49 am
Posts: 490
Location: Vrhnika, Slovenia
If you don't want to use cache:

Code:
      <!-- Disable the second-level cache  -->
        <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>


Else change it to some other cache provider impl.


Top
 Profile  
 
 Post subject: There is no class org.hibernate.cache.NoCacheProvider
PostPosted: Mon Mar 27, 2006 7:36 am 
Beginner
Beginner

Joined: Mon Mar 27, 2006 5:25 am
Posts: 39
Location: India Hyderabad
There is no class org.hibernate.cache.NoCacheProvider

The Error is
org.hibernate.HibernateException: could not instantiate CacheProvider: org.hibernate.cache.NoCacheProvider
at org.hibernate.cfg.SettingsFactory.createCacheProvider(SettingsFactory.java:265)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:184)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1497)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1041)
at com.T.main(T.java:17)
Caused by: java.lang.ClassNotFoundException: org.hibernate.cache.NoCacheProvider
at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:103)
at org.hibernate.cfg.SettingsFactory.createCacheProvider(SettingsFactory.java:262)
... 4 more


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 27, 2006 7:42 am 
Expert
Expert

Joined: Sat Oct 25, 2003 8:49 am
Posts: 490
Location: Vrhnika, Slovenia
Which version of Hibernate do you use?

In 3.1 NoCacheProvider exists.
Otherwise write one yourself - simple noimpl class.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.