From noreply at atlassian.com Mon Mar 24 14:54:33 2008 Content-Type: multipart/mixed; boundary="===============3940077375382651160==" MIME-Version: 1.0 From: Chris Bredesen (JIRA) To: hibernate-issues at lists.jboss.org Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (ANN-714) @NamedQuery always gives an Exception "unexpected token" no matter what query is used Date: Mon, 24 Mar 2008 13:54:33 -0500 Message-ID: <106325932.1206384873103.JavaMail.j2ee@atlassian01.managed.contegix.com> In-Reply-To: 135927775.1206126935395.JavaMail.j2ee@atlassian01.managed.contegix.com --===============3940077375382651160== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable [ http://opensource.atlassian.com/projects/hibernate/browse/ANN-714?pag= e=3Dcom.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action= _29859 ] = Chris Bredesen commented on ANN-714: ------------------------------------ Use the support forum and post your code & mappings. > @NamedQuery always gives an Exception "unexpected token" no matter what q= uery is used > -------------------------------------------------------------------------= ------------ > > Key: ANN-714 > URL: http://opensource.atlassian.com/projects/hibernate/b= rowse/ANN-714 > Project: Hibernate Annotations > Issue Type: Bug > Affects Versions: 3.3.1.GA > Environment: Windows XPP SP2, Weblogic Server wlserver_10.0, jdk1= 50_11, Weblogic Workshop > Reporter: VPC > > @Entity = > @Table(name=3D"CONTACT") = > @NamedQueries({ @NamedQuery(name =3D "selectall", query =3D "SELECT * FRO= M CONTACT") }) = > public class Contact { = > ---usual setter getters---- > } > @NamedQuery annotation always throws the following exception at the follo= wing line: SessionFactory sessionFactory =3D new AnnotationConfiguration().= configure().buildSessionFactory(); = > The stack trace of the exception is as follows: > = > = > = > = > = > = > = > = > = > = > = > = > org.hibernate.HibernateException: Errors in named queries: selectall > at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:= 365) > at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.jav= a:1300) > at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(Annotat= ionConfiguration.java:859) > at hib.FirstExample.main(FirstExample.java:18) > <--- HQL AST --- > \-[QUERY] 'query' > \-[SELECT_FROM] 'SELECT_FROM' > \-[FROM] 'FROM' > \-[RANGE] 'RANGE' > \-[IDENT] 'CONTACT' > > = > = > = -- = This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: htt= p://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira =20 --===============3940077375382651160==--