-->
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.  [ 1 post ] 
Author Message
 Post subject: Error in getHibermateTemplate.find()
PostPosted: Wed Dec 23, 2009 11:50 pm 
Newbie

Joined: Wed Dec 23, 2009 11:31 pm
Posts: 1
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.