-->
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.  [ 8 posts ] 
Author Message
 Post subject: could not instantiate CacheProvider
PostPosted: Fri Jan 16, 2004 9:08 am 
Newbie

Joined: Fri Jan 16, 2004 8:42 am
Posts: 4
Location: Amsterdam, The Netherlands
Hello all,

I have a very trivial prototype using our existing Oracle9i schema which works fine in stand-alone mode, but cannot load the CacheProvider when running within our web services framework. We are using Orion 1.5.4 and our web services have an HTTP dispatcher in a standard servlet configuration.

I have done the obvious things of copying the hibernate2.jar and ehcache.jar to orion and the WEB-INF/lib directories plus even including them in our own jar archives but still no luck.

Any help or hints much appreciated ...
Code:
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 com.dexels.sportlink.adapters.HibernateBaseMap.startHibernateSession(HibernateBaseMap.java:89)
at com.dexels.sportlink.adapters.HibernateBaseMap.load(HibernateBaseMap.java:57)
at InitHibernate.execute(InitHibernate.java:39)
at com.dexels.navajo.server.GenericHandler.doService(GenericHandler.java:118)
at com.dexels.navajo.server.ServiceHandler.construct(ServiceHandler.java:57)
at com.dexels.navajo.persistence.impl.PersistenceManagerImpl.get(PersistenceManagerImpl.java:266)
at com.dexels.navajo.server.Dispatcher.dispatch(Dispatcher.java:206)
at com.dexels.navajo.server.Dispatcher.handle(Dispatcher.java:576)
at com.dexels.navajo.server.listener.http.TmlHttpServlet.doPost(TmlHttpServlet.java:265)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:211)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
at com.evermind._deb._lnc(.:514)
at com.evermind._deb._wmb(.:170)
at com.evermind._co._wbb(.:581)
at com.evermind._co._fs(.:189)
at com.evermind._bt.run(.:62)
Caused by: java.lang.ClassCastException
at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:112)
... 19 more

_________________
~~ Matthew


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 16, 2004 9:10 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Missing ehcache.jar - might be a classloader Problem. This is a FAQ http://www.hibernate.org/74.html#A25


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 16, 2004 10:22 am 
Newbie

Joined: Fri Jan 16, 2004 8:42 am
Posts: 4
Location: Amsterdam, The Netherlands
gloeglm wrote:
Missing ehcache.jar - might be a classloader Problem. This is a FAQ http://www.hibernate.org/74.html#A25


Yes, I read this ... I've tried copying the ehcache.jar everywhee (to Orion, to WEB-INF/lib for our servlet), putting it in our own archives and even changing the CLASSPATH for Orion.

I do think this is a class loader problem, but I've completely run out of ideas.

_________________
~~ Matthew


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 16, 2004 10:27 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Then set hibernate.cache.provider_class=net.sf.hibernate.cache.HashtableCacheProvider if you are not using caching this should not matter.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 16, 2004 10:40 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
matthew.eichler wrote:
but I've completely run out of ideas.

Manifest.mf

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 16, 2004 10:58 am 
Newbie

Joined: Fri Jan 16, 2004 8:42 am
Posts: 4
Location: Amsterdam, The Netherlands
emmanuel wrote:
matthew.eichler wrote:
but I've completely run out of ideas.

Manifest.mf


Can you elaborate a little?

Thanks ...

_________________
~~ Matthew


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 16, 2004 12:32 pm 
Newbie

Joined: Fri Jan 16, 2004 8:42 am
Posts: 4
Location: Amsterdam, The Netherlands
gloeglm wrote:
Then set hibernate.cache.provider_class=net.sf.hibernate.cache.HashtableCacheProvider if you are not using caching this should not matter.


OK, I trid this but all I get instead is,
Code:
net.sf.hibernate.HibernateException: could not instantiate CacheProvider: net.sf.hibernate.cache.HashtableCacheProvider
        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 com.dexels.sportlink.adapters.HibernateBaseMap.startHibernateSession(HibernateBaseMap.java:89)
        at com.dexels.sportlink.adapters.HibernateBaseMap.load(HibernateBaseMap.java:57)
        at InitHibernate.execute(InitHibernate.java:39)
        at com.dexels.navajo.server.GenericHandler.doService(GenericHandler.java:118)
        at com.dexels.navajo.server.ServiceHandler.construct(ServiceHandler.java:57)
        at com.dexels.navajo.persistence.impl.PersistenceManagerImpl.get(PersistenceManagerImpl.java:266)
        at com.dexels.navajo.server.Dispatcher.dispatch(Dispatcher.java:206)
        at com.dexels.navajo.server.Dispatcher.handle(Dispatcher.java:576)
        at com.dexels.navajo.server.listener.http.TmlHttpServlet.doPost(TmlHttpServlet.java:265)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:211)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
        at com.evermind._deb._lnc(.:514)
        at com.evermind._deb._wmb(.:170)
        at com.evermind._co._wbb(.:581)
        at com.evermind._co._fs(.:189)
        at com.evermind._bt.run(.:62)
Caused by: java.lang.ClassCastException
        at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:112)
        ... 19 more



Here too are the log entries from Hibernate,
Code:
69178 [ApplicationServerThread] INFO net.sf.hibernate.dialect.Dialect  - Using dialect: net.sf.hibernate.dialect.Oracle9Dialect
70387 [ApplicationServerThread] WARN net.sf.hibernate.cfg.SettingsFactory  - No dialect set - using GenericDialect: Could not instantiate dialect class
70624 [ApplicationServerThread] INFO net.sf.hibernate.dialect.Dialect  - Using dialect: net.sf.hibernate.dialect.GenericDialect
70626 [ApplicationServerThread] INFO net.sf.hibernate.cfg.SettingsFactory  - Use outer join fetching: false
71362 [ApplicationServerThread] WARN net.sf.hibernate.connection.UserSuppliedConnectionProvider  - No connection properties specified - the user must supply JDBC connections
72410 [ApplicationServerThread] INFO net.sf.hibernate.transaction.TransactionManagerLookupFactory  - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)
72409 [ApplicationServerThread] INFO net.sf.hibernate.cfg.SettingsFactory  - Use scrollable result sets: false
72410 [ApplicationServerThread] INFO net.sf.hibernate.cfg.SettingsFactory  - echoing all SQL to stdout
72411 [ApplicationServerThread] INFO net.sf.hibernate.cfg.SettingsFactory  - Query language substitutions: {}
72413 [ApplicationServerThread] INFO net.sf.hibernate.cfg.SettingsFactory  - cache provider: net.sf.hibernate.cache.HashtableCacheProvider


_________________
~~ Matthew


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 16, 2004 12:34 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Okay. Old version of hibernate on the classpath or something like that? This is really impossible otherwise, net.sf.hibernate.cfg.SettingsFactory and net.sf.hibernate.cache.HashtableCacheProvider are in the same jar. You really must have something messed up.


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