Hibernate version:
3.0
The Problem:
When i try to use a simple Query in my Servlet like this
Code:
Query query=session.createQuery("from Users where username = :username");
query.setParameter("username",username);
Users users=(Users)query.uniqueResult();
...i get a weird Caching Error.
The Error is a
java.lang.IllegalAccessError: tried to access method net.sf.ehcache.CacheManager.<init>()V from class org.hibernate.cache.EhCacheProvider
What the Hell is going on there...Is this a HIBERNATE-BUG???
Full stack trace of any exception that occurs:
root cause
java.lang.IllegalAccessError: tried to access method net.sf.ehcache.CacheManager.<init>()V from class org.hibernate.cache.EhCacheProvider
org.hibernate.cache.EhCacheProvider.start(EhCacheProvider.java:124)
org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:180)
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1213)
de.gameservice.library.HibernateSessionFactory.currentSession(HibernateSessionFactory.java:49)
de.gameservice.business.BusinessLogic.getSession(BusinessLogic.java:14)
de.gameservice.business.BusinessLogic.getUser(BusinessLogic.java:20)
de.gameservice.struts.action.TestAction.execute(TestAction.java:45)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
Name and version of the database you are using:
MySQL 5.5 InnoDB