spring - ClassNotFoundException: org.hibernate.hql.ast.HqlToken when ever I am trying to execute HQL -


the following exception occurring when try execute hql in code. checked in various sites , found antlr.2.7.6.jar shd in class path. checked in project , found there in maven dependencies. there should not such issue. still getting issue. can me in regard. getting error in line "emplist = gethibernatetemplate().find("from employee");" in following function.

public list<employeeto> getallemp() {     list<employee> emplist =  new arraylist<employee>(); list<employeeto> emplistto =  new arraylist<employeeto>(); emplist = gethibernatetemplate().find("from employee"); try {     beanutils.copyproperties(emplistto, emplist); } catch (illegalaccessexception e) {     e.printstacktrace(); } catch (invocationtargetexception e) {     e.printstacktrace(); }     return emplistto; } 

exception stacktrace:

root cause of servletexception.      org.springframework.orm.hibernate3.hibernatequeryexception: classnotfoundexception: org.hibernate.hql.ast.hqltoken [from com.myapp.domain.employee]; nested exception org.hibernate.queryexception: classnotfoundexception: org.hibernate.hql.ast.hqltoken [from com.myapp.domain.employee]     @ org.springframework.orm.hibernate3.sessionfactoryutils.converthibernateaccessexception(sessionfactoryutils.java:656)     @ org.springframework.orm.hibernate3.hibernateaccessor.converthibernateaccessexception(hibernateaccessor.java:412)     @ org.springframework.orm.hibernate3.hibernatetemplate.doexecute(hibernatetemplate.java:411)     @ org.springframework.orm.hibernate3.hibernatetemplate.executewithnativesession(hibernatetemplate.java:374)     @ org.springframework.orm.hibernate3.hibernatetemplate.find(hibernatetemplate.java:912)     truncated. see log file complete stacktrace caused by: org.hibernate.queryexception: classnotfoundexception: org.hibernate.hql.ast.hqltoken [from com.myapp.domain.employee]     @ org.hibernate.hql.ast.hqllexer.panic(hqllexer.java:80)     @ antlr.charscanner.settokenobjectclass(charscanner.java:340)     @ org.hibernate.hql.ast.hqllexer.settokenobjectclass(hqllexer.java:54)     @ antlr.charscanner.<init>(charscanner.java:51)     @ antlr.charscanner.<init>(charscanner.java:60)     truncated. see log file complete stacktrace 

i faced issue in weblogic 10.3, having antlr-2.7.7.jar in application classpath , able resolve adding prefer-application-packages of "antlr.*" in file weblogic-application.xml.


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -