-->
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.  [ 2 posts ] 
Author Message
 Post subject: Tomcat 5.x, Hibernate 2.2, JAAS not finding ehcache,
PostPosted: Sat Sep 25, 2004 2:27 am 
Newbie

Joined: Mon May 31, 2004 5:20 pm
Posts: 6
I'm trying to use Hibernate in a custom JAAS for tomcat 5. Everything works just fine under Eclipse and Junit. However, I get the could not instantiate the CacheProvider. However I put all the jars into both my WEB-INF/lib (which shouldn't matter at the server level I believe) and in $CATALINA_HOME/common/lib as well.
I then tried to put the jars in $CATALINA_HOME/server/lib. Same issue.
What am I missing?
Hibernate version:
2.2
Mapping documents:
Mapping works.
Code between sessionFactory.openSession() and session.close():
THis works
Full stack trace of any exception that occurs:
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.barrowsdevelopment.virtualvillage.dao.hibernate.HibernateUtil.<clinit>(HibernateUtil.java:31)
at com.barrowsdevelopment.virtualvillage.dao.hibernate.PersonHibernateDao.findByUsernamePassword(PersonHibernateDao.java:164)
at com.barrowsdevelopment.virtualvillage.businessObjects.PersonBO.findPersonByAccountUsernamePassword(PersonBO.java:81)
at com.barrowsdevelopment.virtualvillage.jaas.LoginModule.login(LoginModule.java:205)
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:324)
at javax.security.auth.login.LoginContext.invoke(LoginContext.java:675)
at javax.security.auth.login.LoginContext.access$000(LoginContext.java:129)
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:610)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.invokeModule(LoginContext.java:607)
at javax.security.auth.login.LoginContext.login(LoginContext.java:534)
at org.apache.catalina.realm.JAASRealm.authenticate(JAASRealm.java:327)
at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:274)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:700)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.lang.ClassCastException
at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:112)
... 36 more
Name and version of the database you are using:
MySQL
The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:

_________________
Grim Shieldsson


Top
 Profile  
 
 Post subject: More info on jass/tomcat/hibernate
PostPosted: Sun Sep 26, 2004 3:26 pm 
Newbie

Joined: Mon May 31, 2004 5:20 pm
Posts: 6
Okay, here''s more info... I'm dumping the Thread.currentThread().getContextClassLoader().getResource(""), and here is what it says:
[VirtualVillage] DEBUG [http8080-Processor3] LoginModule.initialize(164) | Current path: file:/home/grim/jakarta-tomcat-5.0.18/webapps/EVillage/WEB-INF/classes/

So I immediatley thought... then are the other query pages working? They are...
Curioser curiouser.

_________________
Grim Shieldsson


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