0 Replies Latest reply on Nov 30, 2005 11:42 AM by Abhijeet Sarwate

    no persistent classes found for query class: Got this except

    Abhijeet Sarwate Newbie

      I have a jboss sar deployed in farm directory. The sar is in exploded format

      zySar1.sar
      +META-INF/jboss-service.xml
      +com/..... all my classes: This contains the hibernate class mapping
      +hbcfg -- this contains main hibernate configuration

      The jboss-service.xml is as follows:
      ---------------------------------------------
      <?xml version="1.0" encoding="UTF-8" ?>
      <!DOCTYPE server>




      jboss:service=Naming

      <!-- StartDate M/d/yy h:mm a
      -->

      jboss:service=${jboss.partition.name:DefaultPartition}
      jboss:service=ScheduleManager
      cec.nightly:service=TL1PasswordUpdateTask
      true
      ${jboss.partition.name:DefaultPartition}
      jboss:service=ScheduleManager
      cec.nightly:service=TL1PasswordUpdateTask
      <!-- attribute name="TargetMethod">execute( NOTIFICATION, DATE, REPETITIONS, SCHEDULER_NAME, java.lang.String )</attribute-->
      startPasswordUpdates()
      <!-- myStart() -->

      <!-- 11/25/05 11:00 am -->
      NOW
      60000
      -1



      ----------------------------

      As is seen, a scheduler is called and then it calls the MBean. When this Mbean tries to query hibernate, I get following warning:

      WARN [net.sf.hibernate.hql.QueryTranslator] no persistent classes found for query class:

      from PasswordUpdateOperationDetails


      Here PasswordUpdateOperationDetails is my persistent class

      Here is the mapping file for it:

      ------------------------------------------------------------
      <?xml version="1.0"?>
      <!DOCTYPE hibernate-mapping PUBLIC
      "-//Hibernate/Hibernate Mapping DTD 2.0//EN"
      "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" >

      <hibernate-mapping package="com.cec.nadb.hibernate.pwd.pojo">



      SEQ#PASSWORD_UPDATE#TIME











      <![CDATA[
      from PasswordUpdateOperationDetails
      ]]>


      <![CDATA[
      from PasswordUpdateOperationDetails d where d.startTime >= :startTime
      ]]>


      <![CDATA[
      from PasswordUpdateOperationDetails d where d.endTime <= :endTime
      ]]>


      <![CDATA[
      from PasswordUpdateOperationDetails d where d.neFamilyModel = :neFamilyModel
      ]]>


      <![CDATA[
      from PasswordUpdateOperationDetails d where d.userid = :userid
      ]]>


      <![CDATA[
      from PasswordUpdateOperationDetails d where d.startTime >= :startTime
      and d.endTime <= :endTime and d.userid = :userid and d.neFamilyModel = :neFamilyModel
      ]]>


      <![CDATA[
      from PasswordUpdateOperationDetails d where d.startTime >= :startTime
      and d.endTime <= :endTime and d.neFamilyModel = :neFamilyModel
      ]]>


      <![CDATA[
      from PasswordUpdateOperationDetails d where d.startTime >= :startTime
      and d.userid = :userid and d.neFamilyModel = :neFamilyModel
      ]]>


      <![CDATA[
      from PasswordUpdateOperationDetails d where d.endTime <= :endTime and
      d.userid = :userid and d.neFamilyModel = :neFamilyModel
      ]]>


      <![CDATA[
      from PasswordUpdateOperationDetails d where d.userid = :userid and d.neFamilyModel = :neFamilyModel
      ]]>


      <![CDATA[
      from PasswordUpdateOperationDetails d where d.startTime >= :startTime
      and d.neFamilyModel = :neFamilyModel
      ]]>


      <![CDATA[
      from PasswordUpdateOperationDetails d where d.endTime <= :endTime
      and d.neFamilyModel = :neFamilyModel
      ]]>


      <![CDATA[
      from PasswordUpdateOperationDetails d where d.userid = :userid and
      d.endTime <= :endTime and d.startTime >= :startTime
      ]]>


      <![CDATA[
      from PasswordUpdateOperationDetails d where
      d.userid = :userid and d.startTime >= :startTime
      ]]>


      <![CDATA[
      from PasswordUpdateOperationDetails d where
      d.userid = :userid and d.endTime <= :endTime
      ]]>


      <![CDATA[
      from PasswordUpdateOperationDetails d where d.endTime <= :endTime and
      d.startTime >= :startTime
      ]]>


      <![CDATA[
      from PasswordUpdateOperationDetails d where d.startTime = :startTime and
      d.ipAddress = :ipAddress
      ]]>


      <![CDATA[
      select d.neFamilyModel, d.ipAddress from PasswordUpdateOperationDetails d where
      d.startTime = :startTime and d.neFamilyModel = :neFamilyModel
      ]]>

      </hibernate-mapping>


      -------------------------------------------------------------------------------
      any clue to why this is happening ?

      Now I have the same classes packaged in ear and called from jsp/dao etc works fine.