3 Replies Latest reply on Nov 17, 2007 11:47 AM by zuiwong

    EntityQuery - framework:entity-query not bound

    javalars

      In Eclipse, we trying to copy how it is did in dvdstore sample so we can get list of all values in table adding

       <framework:entity-query name="allAtoms"
       ejbql="select a from Atom a"
       order="a.ptSynbol">
       <!-- waiting for hibernate issue EJB-277
       <framework:hints>
       <key>org.hibernate.cacheable</key>
       <value>true</value>
       </framework:hints>
       -->
       </framework:entity-query>

      to seam-gen eration components.xml but we are braking everything again this night :-((
      We want this so it can show list of atoms in a s:selectItems in JSF. Is that terribel ideas or not so terribel?

      The prefix "framework" for element "framework:entity-query" is not bound. Nested exception: The prefix "framework" for element "framework:entity-query" is not bound.



      components.xml

      <?xml version="1.0" encoding="UTF-8"?>
      <components xmlns="http://jboss.com/products/seam/components"
       xmlns:core="http://jboss.com/products/seam/core"
       xmlns:drools="http://jboss.com/products/seam/drools"
       xmlns:security="http://jboss.com/products/seam/security"
       xmlns:mail="http://jboss.com/products/seam/mail"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation=
       "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-1.2.xsd
       http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-1.2.xsd
       http://jboss.com/products/seam/security http://jboss.com/products/seam/security-1.2.xsd
       http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-1.2.xsd
       http://jboss.com/products/seam/components http://jboss.com/products/seam/components-1.2.xsd
       http://jboss.com/products/seam/framework http://jboss.com/products/seam/framework-1.2.xsd">
      
       <core:init debug="@debug@" jndi-pattern="@jndiPattern@"/>
      
       <core:manager concurrent-request-timeout="500"
       conversation-timeout="120000"
       conversation-id-parameter="cid"
       conversation-is-long-running-parameter="clr"/>
       <!-- waiting for hibernate issue EJB-277
       <framework:hints>
       <key>org.hibernate.cacheable</key>
       <value>true</value>
       </framework:hints>
       -->
      
       <core:managed-persistence-context name="entityManager"
       auto-create="true"
       persistence-unit-jndi-name="java:/moleculeEntityManagerFactory"/>
      
       <core:ejb installed="@embeddedEjb@"/>
      
       <drools:rule-base name="securityRules">
       <drools:rule-files>
       <value>/security.drl</value>
       </drools:rule-files>
       </drools:rule-base>
      
       <security:identity authenticate-method="#{authenticator.authenticate}"
       security-rules="#{securityRules}"/>
      
       <event type="org.jboss.seam.notLoggedIn">
       <action expression="#{redirect.captureCurrentView}"/>
       </event>
       <event type="org.jboss.seam.postAuthenticate">
       <action expression="#{redirect.returnToCapturedView}"/>
       </event>
      
       <mail:mail-session host="localhost" port="2525" username="test" password="test" />
      
       <!-- For use with jBPM pageflow or process management -->
       <!--
       <core:jbpm>
       <core:process-definitions></core:process-definitions>
       <core:pageflow-definitions></core:pageflow-definitions>
       </core:jbpm>
       -->
       <framework:entity-query name="allAtoms"
       ejbql="select a from Atom a"
       order="a.ptSynbol">
       <!-- waiting for hibernate issue EJB-277
       <framework:hints>
       <key>org.hibernate.cacheable</key>
       <value>true</value>
       </framework:hints>
       -->
       </framework:entity-query>
      </components>


        • 1. Re: EntityQuery - framework:entity-query not bound
          gavin.king

          You're missing an xmlns:framework.

          • 2. Re: EntityQuery - framework:entity-query not bound
            javalars

            ... thanking you so muche. That is work good now and my screen show this datas in droplist.
            Next Q from here ...
            We have class Atom and class Molecule. Molecule "has a" Atom (in our codes this in real mean Molecule has atomId property). Molecule has also the another property, atom_quantity.
            We want builder 1 screen with just droplist for show all atoms like original "challenge" in the an other email (the descriptives name is in a property which ptSymbol) and this the screen have also the text input field of atom_quantity.

            But we have teh an other problem wit to convert Atom from droplist user-selection to a atom_id which is need must be a '"java long' in the Exception I am see now because ofcourse, table need must just id *not* all object the Atom.
            Do we need convertEntity somewere to make Atom of list to being a long "id" ? I think this must simple, or ...? Is it an example on web we cannot find it ? I hope you can know the answer because we take time for the small each step forward each day :-))

            • 3. Re: EntityQuery - framework:entity-query not bound
              zuiwong

              I have the same problem ,thanks so much.