From: Ranjit P. (JIRA) <no...@at...> - 2006-05-24 11:00:35
|
org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken ------------------------------------------------------------------------------------- Key: HHH-1777 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1777 Project: Hibernate3 Type: Bug Versions: 3.1.3 Environment: Hibernate 3.1.3,mysql-5.0.21-win32,mysql-connector-java-3.0.17-ga,jdk1.4.1_05,Struts 1.1,weblogic 8.1,MyEclipse 4.1.1GA Reporter: Ranjit Patil Attachments: Book.hbm.xml, HibernateSessionFactory.java, hibernate.cfg.xml I have two tables book and customer. My index page has two links show book list and Show customer List.Currently I am working on only Book List. It calls BookListAction.java which in turn calls LibraryManager.java in which getAllBooks() has code something like this: public Book[] getAllBooks() { /* will hold the books we are going to return later */ List books = new ArrayList(); /* a Hibernate session */ Session session = null; /* we always need a transaction */ Transaction tx = null; /* get session of the current thread */ session = HibernateSessionFactory.currentSession(); tx = session.beginTransaction(); ----------Exception is thrown when the below line of code is executed--------------------- List tmpBooks = session.createQuery( "select b from Book as b order by b.author, b.title").list(); ----------------------------------------------------------------------------------------------------------------- for (Iterator iter = tmpBooks.iterator(); iter.hasNext();) { books.add((Book) iter.next()); } tx.commit(); return (Book[]) books.toArray(new Book[0]); } In eclipse it runs fine but when i deployed on weblogic i got following error when i clicked the show book list link: org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [select b from de.laliluna.library.Book as b order by b.author, b.title] at org.hibernate.hql.ast.HqlLexer.panic(HqlLexer.java:57) at antlr.CharScanner.setTokenObjectClass(CharScanner.java:287) at org.hibernate.hql.ast.HqlLexer.setTokenObjectClass(HqlLexer.java:31) at antlr.CharScanner.(CharScanner.java:42) at antlr.CharScanner.(CharScanner.java:51) at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:56) at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:53) at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:50) at org.hibernate.hql.ast.HqlLexer.(HqlLexer.java:26) at org.hibernate.hql.ast.HqlParser.getInstance(HqlParser.java:44) at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:232) at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:155) at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:109) at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:75) at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:54) at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:71) at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133) at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112) at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1583) at de.laliluna.library.bl.LibraryManager.getAllBooks(LibraryManager.java:35) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Ranjit P. (JIRA) <no...@at...> - 2006-05-24 11:04:26
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1777?page=all ] Ranjit Patil updated HHH-1777: ------------------------------ Attachment: LibraryManager.java Book.java AbstractBook.java > org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken > ------------------------------------------------------------------------------------- > > Key: HHH-1777 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1777 > Project: Hibernate3 > Type: Bug > Versions: 3.1.3 > Environment: Hibernate 3.1.3,mysql-5.0.21-win32,mysql-connector-java-3.0.17-ga,jdk1.4.1_05,Struts 1.1,weblogic 8.1,MyEclipse 4.1.1GA > Reporter: Ranjit Patil > Attachments: AbstractBook.java, Book.hbm.xml, Book.java, HibernateSessionFactory.java, LibraryManager.java, hibernate.cfg.xml > > > I have two tables book and customer. My index page has two links show book list and Show customer List.Currently I am working on only Book List. It calls BookListAction.java which in turn calls LibraryManager.java in which getAllBooks() has code something like this: > public Book[] getAllBooks() { > /* will hold the books we are going to return later */ > List books = new ArrayList(); > /* a Hibernate session */ > Session session = null; > /* we always need a transaction */ > Transaction tx = null; > /* get session of the current thread */ > session = HibernateSessionFactory.currentSession(); > tx = session.beginTransaction(); > ----------Exception is thrown when the below line of code is executed--------------------- > List tmpBooks = session.createQuery( > "select b from Book as b order by b.author, b.title").list(); > ----------------------------------------------------------------------------------------------------------------- > for (Iterator iter = tmpBooks.iterator(); iter.hasNext();) { > books.add((Book) iter.next()); > } > tx.commit(); > return (Book[]) books.toArray(new Book[0]); > } > In eclipse it runs fine but when i deployed on weblogic i got following error when i clicked the show book list link: > org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [select b from de.laliluna.library.Book as b order by b.author, b.title] > at org.hibernate.hql.ast.HqlLexer.panic(HqlLexer.java:57) > at antlr.CharScanner.setTokenObjectClass(CharScanner.java:287) > at org.hibernate.hql.ast.HqlLexer.setTokenObjectClass(HqlLexer.java:31) > at antlr.CharScanner.(CharScanner.java:42) > at antlr.CharScanner.(CharScanner.java:51) > at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:56) > at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:53) > at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:50) > at org.hibernate.hql.ast.HqlLexer.(HqlLexer.java:26) > at org.hibernate.hql.ast.HqlParser.getInstance(HqlParser.java:44) > at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:232) > at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:155) > at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:109) > at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:75) > at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:54) > at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:71) > at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133) > at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112) > at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1583) > at de.laliluna.library.bl.LibraryManager.getAllBooks(LibraryManager.java:35) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Ranjit P. (JIRA) <no...@at...> - 2006-05-24 11:06:25
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1777?page=all ] Ranjit Patil updated HHH-1777: ------------------------------ Attachment: BookListAction.java BookListForm.class > org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken > ------------------------------------------------------------------------------------- > > Key: HHH-1777 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1777 > Project: Hibernate3 > Type: Bug > Versions: 3.1.3 > Environment: Hibernate 3.1.3,mysql-5.0.21-win32,mysql-connector-java-3.0.17-ga,jdk1.4.1_05,Struts 1.1,weblogic 8.1,MyEclipse 4.1.1GA > Reporter: Ranjit Patil > Attachments: AbstractBook.java, Book.hbm.xml, Book.java, BookListAction.java, BookListForm.class, HibernateSessionFactory.java, LibraryManager.java, hibernate.cfg.xml > > > I have two tables book and customer. My index page has two links show book list and Show customer List.Currently I am working on only Book List. It calls BookListAction.java which in turn calls LibraryManager.java in which getAllBooks() has code something like this: > public Book[] getAllBooks() { > /* will hold the books we are going to return later */ > List books = new ArrayList(); > /* a Hibernate session */ > Session session = null; > /* we always need a transaction */ > Transaction tx = null; > /* get session of the current thread */ > session = HibernateSessionFactory.currentSession(); > tx = session.beginTransaction(); > ----------Exception is thrown when the below line of code is executed--------------------- > List tmpBooks = session.createQuery( > "select b from Book as b order by b.author, b.title").list(); > ----------------------------------------------------------------------------------------------------------------- > for (Iterator iter = tmpBooks.iterator(); iter.hasNext();) { > books.add((Book) iter.next()); > } > tx.commit(); > return (Book[]) books.toArray(new Book[0]); > } > In eclipse it runs fine but when i deployed on weblogic i got following error when i clicked the show book list link: > org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [select b from de.laliluna.library.Book as b order by b.author, b.title] > at org.hibernate.hql.ast.HqlLexer.panic(HqlLexer.java:57) > at antlr.CharScanner.setTokenObjectClass(CharScanner.java:287) > at org.hibernate.hql.ast.HqlLexer.setTokenObjectClass(HqlLexer.java:31) > at antlr.CharScanner.(CharScanner.java:42) > at antlr.CharScanner.(CharScanner.java:51) > at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:56) > at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:53) > at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:50) > at org.hibernate.hql.ast.HqlLexer.(HqlLexer.java:26) > at org.hibernate.hql.ast.HqlParser.getInstance(HqlParser.java:44) > at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:232) > at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:155) > at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:109) > at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:75) > at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:54) > at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:71) > at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133) > at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112) > at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1583) > at de.laliluna.library.bl.LibraryManager.getAllBooks(LibraryManager.java:35) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Max R. A. (JIRA) <no...@at...> - 2006-05-24 11:08:32
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1777?page=all ] Max Rydahl Andersen closed HHH-1777: ------------------------------------ Resolution: Rejected read Hibernate 3 migration guide which contains info about H3 and Weblogic > org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken > ------------------------------------------------------------------------------------- > > Key: HHH-1777 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1777 > Project: Hibernate3 > Type: Bug > Versions: 3.1.3 > Environment: Hibernate 3.1.3,mysql-5.0.21-win32,mysql-connector-java-3.0.17-ga,jdk1.4.1_05,Struts 1.1,weblogic 8.1,MyEclipse 4.1.1GA > Reporter: Ranjit Patil > Attachments: AbstractBook.java, Book.hbm.xml, Book.java, BookListAction.java, BookListForm.class, HibernateSessionFactory.java, LibraryManager.java, hibernate.cfg.xml > > > I have two tables book and customer. My index page has two links show book list and Show customer List.Currently I am working on only Book List. It calls BookListAction.java which in turn calls LibraryManager.java in which getAllBooks() has code something like this: > public Book[] getAllBooks() { > /* will hold the books we are going to return later */ > List books = new ArrayList(); > /* a Hibernate session */ > Session session = null; > /* we always need a transaction */ > Transaction tx = null; > /* get session of the current thread */ > session = HibernateSessionFactory.currentSession(); > tx = session.beginTransaction(); > ----------Exception is thrown when the below line of code is executed--------------------- > List tmpBooks = session.createQuery( > "select b from Book as b order by b.author, b.title").list(); > ----------------------------------------------------------------------------------------------------------------- > for (Iterator iter = tmpBooks.iterator(); iter.hasNext();) { > books.add((Book) iter.next()); > } > tx.commit(); > return (Book[]) books.toArray(new Book[0]); > } > In eclipse it runs fine but when i deployed on weblogic i got following error when i clicked the show book list link: > org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [select b from de.laliluna.library.Book as b order by b.author, b.title] > at org.hibernate.hql.ast.HqlLexer.panic(HqlLexer.java:57) > at antlr.CharScanner.setTokenObjectClass(CharScanner.java:287) > at org.hibernate.hql.ast.HqlLexer.setTokenObjectClass(HqlLexer.java:31) > at antlr.CharScanner.(CharScanner.java:42) > at antlr.CharScanner.(CharScanner.java:51) > at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:56) > at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:53) > at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:50) > at org.hibernate.hql.ast.HqlLexer.(HqlLexer.java:26) > at org.hibernate.hql.ast.HqlParser.getInstance(HqlParser.java:44) > at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:232) > at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:155) > at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:109) > at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:75) > at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:54) > at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:71) > at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133) > at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112) > at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1583) > at de.laliluna.library.bl.LibraryManager.getAllBooks(LibraryManager.java:35) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Prabhagar (JIRA) <no...@at...> - 2006-06-21 10:25:33
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1777?page=comments#action_23368 ] Prabhagar commented on HHH-1777: -------------------------------- Hi Ranjit, Please add following <property tag> to your configuration file(hibernate.cfg.xml), and then try hope so will works fine. <!-- This is required for weblogic! --> <property name="hibernate.query.factory_class"> org.hibernate.hql.classic.ClassicQueryTranslatorFactory </property> Thanks. > org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken > ------------------------------------------------------------------------------------- > > Key: HHH-1777 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1777 > Project: Hibernate3 > Type: Bug > Versions: 3.1.3 > Environment: Hibernate 3.1.3,mysql-5.0.21-win32,mysql-connector-java-3.0.17-ga,jdk1.4.1_05,Struts 1.1,weblogic 8.1,MyEclipse 4.1.1GA > Reporter: Ranjit Patil > Attachments: AbstractBook.java, Book.hbm.xml, Book.java, BookListAction.java, BookListForm.class, HibernateSessionFactory.java, LibraryManager.java, hibernate.cfg.xml > > > I have two tables book and customer. My index page has two links show book list and Show customer List.Currently I am working on only Book List. It calls BookListAction.java which in turn calls LibraryManager.java in which getAllBooks() has code something like this: > public Book[] getAllBooks() { > /* will hold the books we are going to return later */ > List books = new ArrayList(); > /* a Hibernate session */ > Session session = null; > /* we always need a transaction */ > Transaction tx = null; > /* get session of the current thread */ > session = HibernateSessionFactory.currentSession(); > tx = session.beginTransaction(); > ----------Exception is thrown when the below line of code is executed--------------------- > List tmpBooks = session.createQuery( > "select b from Book as b order by b.author, b.title").list(); > ----------------------------------------------------------------------------------------------------------------- > for (Iterator iter = tmpBooks.iterator(); iter.hasNext();) { > books.add((Book) iter.next()); > } > tx.commit(); > return (Book[]) books.toArray(new Book[0]); > } > In eclipse it runs fine but when i deployed on weblogic i got following error when i clicked the show book list link: > org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [select b from de.laliluna.library.Book as b order by b.author, b.title] > at org.hibernate.hql.ast.HqlLexer.panic(HqlLexer.java:57) > at antlr.CharScanner.setTokenObjectClass(CharScanner.java:287) > at org.hibernate.hql.ast.HqlLexer.setTokenObjectClass(HqlLexer.java:31) > at antlr.CharScanner.(CharScanner.java:42) > at antlr.CharScanner.(CharScanner.java:51) > at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:56) > at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:53) > at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:50) > at org.hibernate.hql.ast.HqlLexer.(HqlLexer.java:26) > at org.hibernate.hql.ast.HqlParser.getInstance(HqlParser.java:44) > at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:232) > at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:155) > at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:109) > at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:75) > at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:54) > at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:71) > at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133) > at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112) > at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1583) > at de.laliluna.library.bl.LibraryManager.getAllBooks(LibraryManager.java:35) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-06-21 16:19:38
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1777?page=comments#action_23372 ] Emmanuel Bernard commented on HHH-1777: --------------------------------------- Prabhagar, your comment is the worst solution. Please guys check the migration guide > org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken > ------------------------------------------------------------------------------------- > > Key: HHH-1777 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1777 > Project: Hibernate3 > Type: Bug > Versions: 3.1.3 > Environment: Hibernate 3.1.3,mysql-5.0.21-win32,mysql-connector-java-3.0.17-ga,jdk1.4.1_05,Struts 1.1,weblogic 8.1,MyEclipse 4.1.1GA > Reporter: Ranjit Patil > Attachments: AbstractBook.java, Book.hbm.xml, Book.java, BookListAction.java, BookListForm.class, HibernateSessionFactory.java, LibraryManager.java, hibernate.cfg.xml > > > I have two tables book and customer. My index page has two links show book list and Show customer List.Currently I am working on only Book List. It calls BookListAction.java which in turn calls LibraryManager.java in which getAllBooks() has code something like this: > public Book[] getAllBooks() { > /* will hold the books we are going to return later */ > List books = new ArrayList(); > /* a Hibernate session */ > Session session = null; > /* we always need a transaction */ > Transaction tx = null; > /* get session of the current thread */ > session = HibernateSessionFactory.currentSession(); > tx = session.beginTransaction(); > ----------Exception is thrown when the below line of code is executed--------------------- > List tmpBooks = session.createQuery( > "select b from Book as b order by b.author, b.title").list(); > ----------------------------------------------------------------------------------------------------------------- > for (Iterator iter = tmpBooks.iterator(); iter.hasNext();) { > books.add((Book) iter.next()); > } > tx.commit(); > return (Book[]) books.toArray(new Book[0]); > } > In eclipse it runs fine but when i deployed on weblogic i got following error when i clicked the show book list link: > org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [select b from de.laliluna.library.Book as b order by b.author, b.title] > at org.hibernate.hql.ast.HqlLexer.panic(HqlLexer.java:57) > at antlr.CharScanner.setTokenObjectClass(CharScanner.java:287) > at org.hibernate.hql.ast.HqlLexer.setTokenObjectClass(HqlLexer.java:31) > at antlr.CharScanner.(CharScanner.java:42) > at antlr.CharScanner.(CharScanner.java:51) > at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:56) > at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:53) > at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:50) > at org.hibernate.hql.ast.HqlLexer.(HqlLexer.java:26) > at org.hibernate.hql.ast.HqlParser.getInstance(HqlParser.java:44) > at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:232) > at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:155) > at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:109) > at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:75) > at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:54) > at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:71) > at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133) > at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112) > at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1583) > at de.laliluna.library.bl.LibraryManager.getAllBooks(LibraryManager.java:35) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: suresh s. (JIRA) <no...@at...> - 2006-07-14 20:53:57
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1777?page=comments#action_23638 ] suresh soundararajan commented on HHH-1777: ------------------------------------------- Put all the jars in your PRE_CLASSPATH of weblogic startup script and try again > org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken > ------------------------------------------------------------------------------------- > > Key: HHH-1777 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1777 > Project: Hibernate3 > Type: Bug > Versions: 3.1.3 > Environment: Hibernate 3.1.3,mysql-5.0.21-win32,mysql-connector-java-3.0.17-ga,jdk1.4.1_05,Struts 1.1,weblogic 8.1,MyEclipse 4.1.1GA > Reporter: Ranjit Patil > Attachments: AbstractBook.java, Book.hbm.xml, Book.java, BookListAction.java, BookListForm.class, HibernateSessionFactory.java, LibraryManager.java, hibernate.cfg.xml > > > I have two tables book and customer. My index page has two links show book list and Show customer List.Currently I am working on only Book List. It calls BookListAction.java which in turn calls LibraryManager.java in which getAllBooks() has code something like this: > public Book[] getAllBooks() { > /* will hold the books we are going to return later */ > List books = new ArrayList(); > /* a Hibernate session */ > Session session = null; > /* we always need a transaction */ > Transaction tx = null; > /* get session of the current thread */ > session = HibernateSessionFactory.currentSession(); > tx = session.beginTransaction(); > ----------Exception is thrown when the below line of code is executed--------------------- > List tmpBooks = session.createQuery( > "select b from Book as b order by b.author, b.title").list(); > ----------------------------------------------------------------------------------------------------------------- > for (Iterator iter = tmpBooks.iterator(); iter.hasNext();) { > books.add((Book) iter.next()); > } > tx.commit(); > return (Book[]) books.toArray(new Book[0]); > } > In eclipse it runs fine but when i deployed on weblogic i got following error when i clicked the show book list link: > org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [select b from de.laliluna.library.Book as b order by b.author, b.title] > at org.hibernate.hql.ast.HqlLexer.panic(HqlLexer.java:57) > at antlr.CharScanner.setTokenObjectClass(CharScanner.java:287) > at org.hibernate.hql.ast.HqlLexer.setTokenObjectClass(HqlLexer.java:31) > at antlr.CharScanner.(CharScanner.java:42) > at antlr.CharScanner.(CharScanner.java:51) > at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:56) > at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:53) > at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:50) > at org.hibernate.hql.ast.HqlLexer.(HqlLexer.java:26) > at org.hibernate.hql.ast.HqlParser.getInstance(HqlParser.java:44) > at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:232) > at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:155) > at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:109) > at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:75) > at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:54) > at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:71) > at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133) > at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112) > at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1583) > at de.laliluna.library.bl.LibraryManager.getAllBooks(LibraryManager.java:35) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |