Hi all,
I defined a finder method findMalfLock() for an entity bean
but when I try do deploy the .ear file I get this JBoss's Exception:


  | 2004-08-06 11:44:08,265 WARN  [org.jboss.ejb.EJBDeployer.verifier] EJB spec 
violation: 
  | Bean   : MalfEntity
  | Method : public abstract MalfEntityLocal findMalfLock(String, Integer, boolean) 
throws FinderException
  | Section: 10.5.6
  | Warning: Every finder method except findByPrimaryKey(key) must be associated with 
a query element in the deployment descriptor.
  | 
  | 2004-08-06 11:44:08,357 ERROR [org.jboss.deployment.MainDeployer] could not create 
deployment: 
file:/webdata/SPDS/jboss-3.2.3/server/xmalf/tmp/deploy/tmp42995XMALF.ear-contents/XMALF-EJB.jar
  | org.jboss.deployment.DeploymentException: Verification of Enterprise Beans failed, 
see above for error messages.
  | 

Here is ejb-jar.xml:


  | <entity >
  |          <description><![CDATA[Entity CMP che mappa tabella MALF]]></description>
  |          <display-name>Malf Entity Bean</display-name>
  | 
  |          <ejb-name>MalfEntity</ejb-name>
  | 
  |          <local-home>server.entity.interfacce.MalfEntityLocalHome</local-home>
  |          <local>server.entity.interfacce.MalfEntityLocal</local>
  | 
  |          <ejb-class>server.entity.beans.MalfEntityBean</ejb-class>
  |          <persistence-type>Container</persistence-type>
  |          <prim-key-class>server.entity.primaryKey.MalfEntityPK</prim-key-class>
  |          <reentrant>False</reentrant>
  |          <cmp-version>2.x</cmp-version>
  |          <abstract-schema-name>MalfEntity</abstract-schema-name>
  |          <cmp-field >
  |             <description><![CDATA[]]></description>
  |             <field-name>prodotto</field-name>
  |          </cmp-field>
  |          <cmp-field >
  |             <description><![CDATA[]]></description>
  |             <field-name>idMalf</field-name>
  |          </cmp-field>
  |          <cmp-field >
  |             <description><![CDATA[]]></description>
  |             <field-name>stato</field-name>
  |          </cmp-field>
  |          <cmp-field >
  |             <description><![CDATA[]]></description>
  |             <field-name>tipo</field-name>
  |          </cmp-field>
  |          <cmp-field >
  |             <description><![CDATA[]]></description>
  |             <field-name>relOrig</field-name>
  |          </cmp-field>
  |          <cmp-field >
  |             <description><![CDATA[]]></description>
  |             <field-name>sub</field-name>
  |          </cmp-field>
  |          <cmp-field >
  |             <description><![CDATA[]]></description>
  |             <field-name>lockModif</field-name>
  |          </cmp-field>
  | 
  |          <resource-ref >
  |             <res-ref-name>jdbc/XmalfDB</res-ref-name>
  |             <res-type>javax.sql.DataSource</res-type>
  |             <res-auth>Container</res-auth>
  |          </resource-ref>
  | 
  |          <query>
  |             <query-method>
  |                <method-name>findMalfLock</method-name>
  |                <method-params>
  |                   <method-param>String</method-param>
  |                   <method-param>Integer</method-param>
  |                   <method-param>boolean</method-param>
  |                </method-params>
  |             </query-method>
  |             <ejb-ql><![CDATA[SELECT OBJECT(c) FROM MalfEntity c WHERE c.prodotto = 
?1 AND c.idMalf = ?2 and c.lockModif = ?3]]></ejb-ql>
  |          </query>
  |       <!-- Write a file named ejb-finders-MalfEntityBean.xml if you want to define 
extra finders. -->
  |       </entity>
  | 

Here is jbosscmp-jdbc.xml:


  | <entity>
  |          <ejb-name>MalfEntity</ejb-name>
  |          <table-name>malf</table-name>
  | 
  |          <cmp-field>
  |             <field-name>prodotto</field-name>
  |             <column-name>prodotto</column-name>
  |                     <not-null/>
  | 
  |         </cmp-field>
  |          <cmp-field>
  |             <field-name>idMalf</field-name>
  |             <column-name>id_malf</column-name>
  |                     <not-null/>
  | 
  |         </cmp-field>
  |          <cmp-field>
  |             <field-name>stato</field-name>
  |             <column-name>stato</column-name>
  |                     <not-null/>
  | 
  |         </cmp-field>
  |          <cmp-field>
  |             <field-name>tipo</field-name>
  |             <column-name>tipo</column-name>
  |                     <not-null/>
  | 
  |         </cmp-field>
  |          <cmp-field>
  |             <field-name>relOrig</field-name>
  |             <column-name>rel_orig</column-name>
  |                     <not-null/>
  | 
  |         </cmp-field>
  |          <cmp-field>
  |             <field-name>sub</field-name>
  |             <column-name>sub</column-name>
  | 
  |         </cmp-field>
  |          <cmp-field>
  |             <field-name>lockModif</field-name>
  |             <column-name>lock_modif</column-name>
  | 
  |         </cmp-field>
  | 
  |          <query>
  |             <query-method>
  |                <method-name>findMalfLock</method-name>
  |                <method-params>
  |                   <method-param>String</method-param>
  |                   <method-param>Integer</method-param>
  |                   <method-param>boolean</method-param>
  |                </method-params>
  |             </query-method>
  |         <jboss-ql><![CDATA[SELECT OBJECT(c) FROM MalfEntity c WHERE c.prodotto = 
?1 AND c.idMalf = ?2 and c.lockModif = ?3]]></jboss-ql>
  |      </query>
  | 
  | <!-- jboss 3.2 features -->
  | <!-- optimistic locking does not express the exclusions needed -->
  |       </entity>
  | 

Here is jboss.xml:


  | <entity>
  |          <ejb-name>MalfEntity</ejb-name>
  |          <local-jndi-name>ejb/MalfEntity</local-jndi-name>
  |          <configuration-name>XMALF CMP 2.x EntityBean</configuration-name>
  |          <resource-ref>
  |             <res-ref-name>jdbc/XmalfDB</res-ref-name>
  |             <jndi-name>java:/PostgresDS</jndi-name>
  |          </resource-ref>
  | 
  |         <method-attributes>
  |         </method-attributes>
  | 
  |       </entity>
  | 

Many thanks in advance for any helps
Moreno

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3844375#3844375

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3844375


-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to