Hi I'm getting a problem when using Spring 2.0.6 with hibernate 3.2. The Application was working fine when using 3.0.5 (Runs on Websphere)
I'm getting the following error when we execute the code
Caused by: java.lang.AbstractMethodError: org/hibernate/Interceptor.onPrepareStatement(Ljava/lang/String;)Ljava/lang/String; at org.hibernate.jdbc.AbstractBatcher.getSQL(AbstractBatcher.java:459) at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:481) at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:423) at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139) at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1556) at org.hibernate.loader.Loader.doQuery(Loader.java:673) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236) at org.hibernate.loader.Loader.doList(Loader.java:2234) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2113) at org.hibernate.loader.Loader.list(Loader.java:2108) at org.hibernate.hql.classic.QueryTranslatorImpl.list(QueryTranslatorImpl.java:912) at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1123) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79) at org.springframework.orm.hibernate3.HibernateTemplate$30.doInHibernate(HibernateTemplate.java:926) at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:419) at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374) at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:917) at au.com.marsh.mcia.core.dao.impl.UserDaoImpl.getActiveUserClasses(UserDaoImpl.java:247)
Code
public List getActiveUserClasses(String username) { StringBuffer hql = new StringBuffer("from UserClass userClass where userClass.userClass in ("); hql.append("select user.userClass from AbstractUser user"); hql.append(" where user.ldapUser.userName = ? and user.status = ? )"); String[] args = { username, AbstractUser.STATUS_ACTIVE }; return getHibernateTemplate().find(hql.toString(), args);
Not sure where the problem is.
|