1 Reply Latest reply on Mar 28, 2009 1:13 AM by Walter White

    hibernate-entity-query

    Walter White Novice

      Hi All,


      I am having a problem getting my hibernate entity query working.  I am passing in a hibernate session and the query itself looks valid according to EJBQL.


      This is in components.xml


      <framework:hibernate-entity-query session="#{hibernateSession}" name="administratorQuery" ejbql="SELECT u from User u IN(u.roles) AS role WHERE role.name = 'ADMINISTRATOR' " cacheable="true"/>
      



      This is the error I get:


      Caused by: java.lang.RuntimeException: Error loading element HibernateEntityQuery with component name administratorQuery and component class null
              at org.jboss.seam.init.Initialization.installComponentsFromXmlElements(Initialization.java:352)
              at org.jboss.seam.init.Initialization.initComponentsFromXmlDocument(Initialization.java:227)
      



      I use this query whenever any exception occurs to notify the system administrators.  My User class is a component, what else do I need to do to make this work as expected?



      Thanks,



      Walter