1 Reply Latest reply on Jun 17, 2015 6:24 PM by manan28

    org.hibernate.hql.ast.QuerySyntaxException: for ear deployed via jboss

    manan28

      Hi,

      We are getting the below error whenever we try to load the values of table TBDIT_REF_DATA via hibernate.

      2491c242

      5:43:36,272 INFO  [org.hibernate.type.BasicTypeRegistry] Type registration [blob] overrides previous : org.hibernate.type.BlobType@5d688dcf

      5:43:36,274 INFO  [org.hibernate.type.BasicTypeRegistry] Type registration [java.sql.Blob] overrides previous : org.hibernate.type.BlobType@5d688dcf

      5:43:36,281 INFO  [org.hibernate.impl.SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured

      5:43:36,310 ERROR [STDERR] org.hibernate.hql.ast.QuerySyntaxException: DitRefDataDB is not mapped [FROM DitRefDataDB]

      5:43:36,312 ERROR [STDERR]     at org.hibernate.hql.ast.util.SessionFactoryHelper.requireClassPersister(SessionFactoryHelper.java:180)

       

      Our entity class is defined as below:

      @Entity

      @Table(name="TBUPDATE_TEMPLATE")

      public class UpdateTemplate

      {


      We also have an entry in hibernate.cfg.xml for mapping class.

      We are querying the table using the class name

      public static final String refDitQueryAll = "FROM DitRefDataDB";

       

      The class DitRefDataDB is inside a jar which is placed in lib folder of the ear.

       

      Any help is appreciated.

        • 1. Re: org.hibernate.hql.ast.QuerySyntaxException: for ear deployed via jboss
          manan28

          Just to add a few more things, when we use the hibernate3.jar in eclipse, the same code works fine.

           

          When we pack hibernate3.jar in ear, jboss deployment fails with below error:

          java.lang.ClassCastException: org.hibernate.hql.ast.HqlToken cannot be cast to antlr.Token

           

          So the solution we found online was to remove the hibernate3.jar as Jboss uses its own hibernate.

          Once we removed the hibernate3.jar it failed with the exception mentioned in above post

          5:43:36,310 ERROR [STDERR] org.hibernate.hql.ast.QuerySyntaxException: DitRefDataDB is not mapped [FROM DitRefDataDB] - See more at: https://developer.jboss.org/inbox#sthash.RdkEu77G.dpuf