0 Replies Latest reply on Dec 30, 2005 6:31 AM by Dennis Meyer

    CMP field not found : fieldName= [NO VALUE???]

    Dennis Meyer Newbie

      Hi,

      I'm facing a strange problem. Strange, because some of that EJBs worked and were not edited. Now for every EJB in my ear I get an error message like the one below. I do not know exacly what to do as I think the beans should be ok. May it depend on only one bean or does it depends on more beans: every bean causes the same exception (I think this is the case, or not?).

      Any hint welcome!!!

      A sample Bean Class and the XML configs are posted below after the exceptions.

      .
      .
      .
       Depends On Me: org.jboss.deployment.DeploymentException: CMP field not found : fieldName=
      ObjectName: jboss.j2ee:service=EJB,plugin=pool,jndiName=local/AdapterImportExceptionBean
       state: CREATED
       I Depend On:
       Depends On Me:
      ObjectName: jboss.j2ee:jndiName=local/BlAdapterProcessIdBean,service=EJB
       state: FAILED
       I Depend On:
       Depends On Me: org.jboss.deployment.DeploymentException: CMP field not found : fieldName=
      ObjectName: jboss.j2ee:service=EJB,plugin=pool,jndiName=local/BlAdapterProcessIdBean
       state: CREATED
       I Depend On:
       Depends On Me:
      ObjectName: jboss.j2ee:jndiName=local/BlAdapterControlBean,service=EJB
       state: FAILED
       I Depend On:
       Depends On Me: org.jboss.deployment.DeploymentException: CMP field not found : fieldName=
      ObjectName: jboss.j2ee:service=EJB,plugin=pool,jndiName=local/BlAdapterControlBean
       state: CREATED
       I Depend On:
       Depends On Me:
      ObjectName: jboss.j2ee:jndiName=xxx/adapter/ejb/cmp/PartsLocalHome,service=EJB
       state: FAILED
       I Depend On:
       Depends On Me: org.jboss.deployment.DeploymentException: CMP field not found : fieldName=
      ObjectName: jboss.j2ee:service=EJB,plugin=pool,jndiName=xxx/adapter/ejb/cmp/PartsLocalHome
       state: CREATED
       I Depend On:
       Depends On Me:
      .
      .
      .
      


      And the:

      
      MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM:
      .
      .
      .
      I Depend On:
       Depends On Me: org.jboss.deployment.DeploymentException: CMP field not found : fieldName=
      ObjectName: jboss.j2ee:jndiName=xxx/adapter/ejb/cmp/WorkorderErrorCodeLocalHome,service=EJB
       state: FAILED
       I Depend On:
       Depends On Me: org.jboss.deployment.DeploymentException: CMP field not found : fieldName=
      ObjectName: jboss.j2ee:jndiName=xxx/adapter/ejb/cmp/PartsLocalHome,service=EJB
       state: FAILED
       I Depend On:
       Depends On Me: org.jboss.deployment.DeploymentException: CMP field not found : fieldName=
      ObjectName: jboss.j2ee:jndiName=local/BlPartCodeBean,service=EJB
       state: FAILED
       I Depend On:
       Depends On Me: org.jboss.deployment.DeploymentException: CMP field not found : fieldName=
      ObjectName: jboss.j2ee:service=EJB,plugin=pool,jndiName=xxx/adapter/ejb/cmp/PartsLocalHome
       state: CREATED
       I Depend On:
       Depends On Me:
      .
      .
      .
      


      The TrackStaces look like this (all the same)
      org.jboss.deployment.DeploymentException: CMP field not found : fieldName=
       at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityMetaData.<init>(JDBCEntityMetaData.java:71 at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCApplicationMetaData.<init>(JDBCApplicationMetaData.java:36 at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCXmlFileLoader.load(JDBCXmlFileLoader.java:7 at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadJDBCEntityMetaData(JDBCStoreManager.java:72 at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.initStoreManager(JDBCStoreManager.java:40 at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:35 at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:15 at org.jboss.ejb.EntityContainer.startService(EntityContainer.java:34 at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:27 at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:22 at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Sourc at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:2 at java.lang.reflect.Method.invoke(Method.java:58 at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:14 at org.jboss.mx.server.Invocation.dispatch(Invocation.java:8 at org.jboss.mx.server.Invocation.invoke(Invocation.java:7 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:24 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:64 at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:89 at $Proxy0.start(Unknown Sourc at org.jboss.system.ServiceController.start(ServiceController.java:41 at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Sourc at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:2 at java.lang.reflect.Method.invoke(Method.java:58 at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:14 at org.jboss.mx.server.Invocation.dispatch(Invocation.java:8 at org.jboss.mx.server.Invocation.invoke(Invocation.java:7 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:24 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:64 at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:17 at $Proxy45.start(Unknown Sourc at org.jboss.ejb.EjbModule.startService(EjbModule.java:39 at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:27 at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:22 at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Sourc at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:2 at java.lang.reflect.Method.invoke(Method.java:58 at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:14 at org.jboss.mx.server.Invocation.dispatch(Invocation.java:8 at org.jboss.mx.server.Invocation.invoke(Invocation.java:7 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:24 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:64 at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:89 at $Proxy0.start(Unknown Sourc at org.jboss.system.ServiceController.start(ServiceController.java:41 at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Sourc at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:2 at java.lang.reflect.Method.invoke(Method.java:58 at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:14 at org.jboss.mx.server.Invocation.dispatch(Invocation.java:8 at org.jboss.mx.server.Invocation.invoke(Invocation.java:7 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:24 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:64 at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:17 at $Proxy19.start(Unknown Sourc at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:60 at org.jboss.deployment.MainDeployer.start(MainDeployer.java:93 at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:74 at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:70 at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Sourc at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:2 at java.lang.reflect.Method.invoke(Method.java:58 at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:14 at org.jboss.mx.server.Invocation.dispatch(Invocation.java:8 at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:11 at org.jboss.mx.server.Invocation.invoke(Invocation.java:7 at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:13 at org.jboss.mx.server.Invocation.invoke(Invocation.java:7 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:24 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:64 at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:17 at $Proxy8.deploy(Unknown Sourc at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:30 at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:48 at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:20 at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:27 at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:27 at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:22 at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Sourc at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:2 at java.lang.reflect.Method.invoke(Method.java:58 at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:14 at org.jboss.mx.server.Invocation.dispatch(Invocation.java:8 at org.jboss.mx.server.Invocation.invoke(Invocation.java:7 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:24 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:64 at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:89 at $Proxy0.start(Unknown Sourc at org.jboss.system.ServiceController.start(ServiceController.java:41 at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Sourc at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:2 at java.lang.reflect.Method.invoke(Method.java:58 at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:14 at org.jboss.mx.server.Invocation.dispatch(Invocation.java:8 at org.jboss.mx.server.Invocation.invoke(Invocation.java:7 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:24 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:64 at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:17 at $Proxy4.start(Unknown Sourc at org.jboss.deployment.SARDeployer.start(SARDeployer.java:26 at org.jboss.deployment.MainDeployer.start(MainDeployer.java:93 at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:74 at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:70 at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:69 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Metho at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:2 at java.lang.reflect.Method.invoke(Method.java:58 at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:14 at org.jboss.mx.server.Invocation.dispatch(Invocation.java:8 at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:11 at org.jboss.mx.server.Invocation.invoke(Invocation.java:7 at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:13 at org.jboss.mx.server.Invocation.invoke(Invocation.java:7 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:24 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:64 at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:17 at $Proxy5.deploy(Unknown Sourc at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:39 at org.jboss.system.server.ServerImpl.start(ServerImpl.java:29 at org.jboss.Main.boot(Main.java:15 at org.jboss.Main$1.run(Main.java:40 at java.lang.Thread.run(Thread.java:5911:26:32,343 ERROR [EntityContainer] Starting failed jboss.j2ee:jndiName=xxx/adapter/ejb/cmp/BlDeviceStatusLocalHome,service=EJB
      
      


      Bean Class:

      package xxx.adapter.ejb.cmp;
      
      import javax.ejb.*;
      
      /**
       * This is the bean class for the PartsBean enterprise bean.
       * Created 30.12.2005 04:29:49
       *
       */
      public abstract class PartsBean implements javax.ejb.EntityBean, xxx.adapter.ejb.cmp.PartsLocalBusiness {
       private javax.ejb.EntityContext context;
      
       // <editor-fold defaultstate="collapsed" desc="EJB infrastructure methods. Click on the + sign on the left to edit the code.">
       // TODO Consider creating Transfer Object to encapsulate data
       // TODO Review finder methods
       /**
       * @see javax.ejb.EntityBean#setEntityContext(javax.ejb.EntityContext)
       */
       public void setEntityContext(javax.ejb.EntityContext aContext) {
       context = aContext;
       }
      
       /**
       * @see javax.ejb.EntityBean#ejbActivate()
       */
       public void ejbActivate() {
      
       }
      
       /**
       * @see javax.ejb.EntityBean#ejbPassivate()
       */
       public void ejbPassivate() {
      
       }
      
       /**
       * @see javax.ejb.EntityBean#ejbRemove()
       */
       public void ejbRemove() {
      
       }
      
       /**
       * @see javax.ejb.EntityBean#unsetEntityContext()
       */
       public void unsetEntityContext() {
       context = null;
       }
      
       /**
       * @see javax.ejb.EntityBean#ejbLoad()
       */
       public void ejbLoad() {
      
       }
      
       /**
       * @see javax.ejb.EntityBean#ejbStore()
       */
       public void ejbStore() {
      
       }
       // </editor-fold>
      
      
       public abstract java.lang.Integer getId();
       public abstract void setId(java.lang.Integer id);
      
       public abstract java.lang.String getWoNo();
       public abstract void setWoNo(java.lang.String woNo);
      
       public abstract java.lang.String getPartNo();
       public abstract void setPartNo(java.lang.String partNo);
      
       public abstract java.lang.String getDescription();
       public abstract void setDescription(java.lang.String description);
      
       public abstract java.lang.Integer getQuantity();
       public abstract void setQuantity(java.lang.Integer quantity);
      
       public abstract java.lang.Integer getCode();
       public abstract void setCode(java.lang.Integer code);
      
       public abstract java.lang.String getTrackingNo();
       public abstract void setTrackingNo(java.lang.String trackingNo);
      
       public abstract java.lang.String getSerialNo();
       public abstract void setSerialNo(java.lang.String serialNo);
      
       public abstract java.lang.String getInfo();
       public abstract void setInfo(java.lang.String info);
      
      
       public java.lang.String ejbCreate(java.lang.Integer id, java.lang.String woNo, java.lang.String partNo, java.lang.String description, java.lang.Integer quantity, java.lang.Integer code, java.lang.String trackingNo, java.lang.String serialNo, java.lang.String info) throws javax.ejb.CreateException {
       if (id == null) {
       throw new javax.ejb.CreateException("The field \"id\" must not be null");
       }
       if (woNo == null) {
       throw new javax.ejb.CreateException("The field \"woNo\" must not be null");
       }
       if (quantity == null) {
       throw new javax.ejb.CreateException("The field \"quantity\" must not be null");
       }
       if (code == null) {
       throw new javax.ejb.CreateException("The field \"code\" must not be null");
       }
      
       // TODO add additional validation code, throw CreateException if data is not valid
       setId(id);
       setWoNo(woNo);
       setPartNo(partNo);
       setDescription(description);
       setQuantity(quantity);
       setCode(code);
       setTrackingNo(trackingNo);
       setSerialNo(serialNo);
       setInfo(info);
      
       return null;
       }
      
       public void ejbPostCreate(java.lang.Integer id, java.lang.String woNo, java.lang.String partNo, java.lang.String description, java.lang.Integer quantity, java.lang.Integer code, java.lang.String trackingNo, java.lang.String serialNo, java.lang.String info) {
       // TODO populate relationships here if appropriate
      
       }
      }
      


      The Local Home:

      
      package xxx.adapter.ejb.cmp;
      
      
      /**
       * This is the local-home interface for Parts enterprise bean.
       */
      public interface PartsLocalHome extends javax.ejb.EJBLocalHome {
      
      
      
       /**
       *
       */
       xxx.adapter.ejb.cmp.PartsLocal findByPrimaryKey(java.lang.String key) throws javax.ejb.FinderException;
      
       public xxx.adapter.ejb.cmp.PartsLocal create(java.lang.Integer id, java.lang.String woNo, java.lang.String partNo, java.lang.String description, java.lang.Integer quantity, java.lang.Integer code, java.lang.String trackingNo, java.lang.String serialNo, java.lang.String info) throws javax.ejb.CreateException;
      
       java.util.Collection findById(java.lang.Integer id) throws javax.ejb.FinderException;
      
       java.util.Collection findByWoNo(java.lang.String woNo) throws javax.ejb.FinderException;
      
       java.util.Collection findByPartNo(java.lang.String partNo) throws javax.ejb.FinderException;
      
       java.util.Collection findByDescription(java.lang.String description) throws javax.ejb.FinderException;
      
       java.util.Collection findByQuantity(java.lang.Integer quantity) throws javax.ejb.FinderException;
      
       java.util.Collection findByCode(java.lang.Integer code) throws javax.ejb.FinderException;
      
       java.util.Collection findByTrackingNo(java.lang.String trackingNo) throws javax.ejb.FinderException;
      
       java.util.Collection findBySerialNo(java.lang.String serialNo) throws javax.ejb.FinderException;
      
       java.util.Collection findByInfo(java.lang.String info) throws javax.ejb.FinderException;
      
      
      }
      


      The Jboss xml entes all look like:
       <entity>
       <ejb-name>PartsBean</ejb-name>
       <local-jndi-name>xxx/adapter/ejb/cmp/PartsLocalHome</local-jndi-name>
      
       <method-attributes>
       </method-attributes>
      
       </entity>
      
      


      The jbosscmp-jdbc entry:

       <entity>
       <ejb-name>PartsBean</ejb-name>
       <table-name>parts</table-name>
       <cmp-field>
       <field-name>id</field-name>
       <column-name>id</column-name>
       <not-null/>
       <auto-increment/>
       </cmp-field>
       <cmp-field>
       <field-name>woNo</field-name>
       <column-name>wo_no</column-name>
       </cmp-field>
       <cmp-field>
       <field-name>partNo</field-name>
       <column-name>part_no</column-name>
       </cmp-field>
       <cmp-field>
       <field-name>description</field-name>
       <column-name>description</column-name>
       </cmp-field>
       <cmp-field>
       <field-name>quantity</field-name>
       <column-name>quantity</column-name>
       </cmp-field>
       <cmp-field>
       <field-name>code</field-name>
       <column-name>code</column-name>
       </cmp-field>
       <cmp-field>
       <field-name>trackingNo</field-name>
       <column-name>tracking_no</column-name>
       </cmp-field>
       <cmp-field>
       <field-name>serialNo</field-name>
       <column-name>serial_no</column-name>
       </cmp-field>
       <cmp-field>
       <field-name>info</field-name>
       <column-name>info</column-name>
       </cmp-field>
       <entity-command name="mysql-get-generated-keys" class="org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCMySQLCreateCommand"/>
       </entity>
      


      The ejb-jar
       <entity>
       <description>jdbc:mysql://localhost/ios [local_user on Default schema]</description>
       <display-name>PartsEB</display-name>
       <ejb-name>PartsBean</ejb-name>
       <local-home>xxx.adapter.ejb.cmp.PartsLocalHome</local-home>
       <local>xxx.adapter.ejb.cmp.PartsLocal</local>
       <ejb-class>xxx.adapter.ejb.cmp.PartsBean</ejb-class>
       <persistence-type>Container</persistence-type>
       <prim-key-class>java.lang.String</prim-key-class>
       <reentrant>false</reentrant>
       <abstract-schema-name>Parts</abstract-schema-name>
       <cmp-field>
       <field-name>id</field-name>
       </cmp-field>
       <cmp-field>
       <field-name>woNo</field-name>
       </cmp-field>
       <cmp-field>
       <field-name>partNo</field-name>
       </cmp-field>
       <cmp-field>
       <field-name>description</field-name>
       </cmp-field>
       <cmp-field>
       <field-name>quantity</field-name>
       </cmp-field>
       <cmp-field>
       <field-name>code</field-name>
       </cmp-field>
       <cmp-field>
       <field-name>trackingNo</field-name>
       </cmp-field>
       <cmp-field>
       <field-name>serialNo</field-name>
       </cmp-field>
       <cmp-field>
       <field-name>info</field-name>
       </cmp-field>
       <primkey-field>serialNo</primkey-field>
       <query>
       <description>auto generated method</description>
       <query-method>
       <method-name>findById</method-name>
       <method-params>
       <method-param>java.lang.Integer</method-param>
       </method-params>
       </query-method>
       <ejb-ql>SELECT OBJECT(p) FROM Parts AS p WHERE p.id = ?1</ejb-ql>
       </query>
       <query>
       <description>auto generated method</description>
       <query-method>
       <method-name>findByWoNo</method-name>
       <method-params>
       <method-param>java.lang.String</method-param>
       </method-params>
       </query-method>
       <ejb-ql>SELECT OBJECT(p) FROM Parts AS p WHERE p.woNo = ?1</ejb-ql>
       </query>
       <query>
       <description>auto generated method</description>
       <query-method>
       <method-name>findByPartNo</method-name>
       <method-params>
       <method-param>java.lang.String</method-param>
       </method-params>
       </query-method>
       <ejb-ql>SELECT OBJECT(p) FROM Parts AS p WHERE p.partNo = ?1</ejb-ql>
       </query>
       <query>
       <description>auto generated method</description>
       <query-method>
       <method-name>findByDescription</method-name>
       <method-params>
       <method-param>java.lang.String</method-param>
       </method-params>
       </query-method>
       <ejb-ql>SELECT OBJECT(p) FROM Parts AS p WHERE p.description = ?1</ejb-ql>
       </query>
       <query>
       <description>auto generated method</description>
       <query-method>
       <method-name>findByQuantity</method-name>
       <method-params>
       <method-param>java.lang.Integer</method-param>
       </method-params>
       </query-method>
       <ejb-ql>SELECT OBJECT(p) FROM Parts AS p WHERE p.quantity = ?1</ejb-ql>
       </query>
       <query>
       <description>auto generated method</description>
       <query-method>
       <method-name>findByCode</method-name>
       <method-params>
       <method-param>java.lang.Integer</method-param>
       </method-params>
       </query-method>
       <ejb-ql>SELECT OBJECT(p) FROM Parts AS p WHERE p.code = ?1</ejb-ql>
       </query>
       <query>
       <description>auto generated method</description>
       <query-method>
       <method-name>findByTrackingNo</method-name>
       <method-params>
       <method-param>java.lang.String</method-param>
       </method-params>
       </query-method>
       <ejb-ql>SELECT OBJECT(p) FROM Parts AS p WHERE p.trackingNo = ?1</ejb-ql>
       </query>
       <query>
       <description>auto generated method</description>
       <query-method>
       <method-name>findBySerialNo</method-name>
       <method-params>
       <method-param>java.lang.String</method-param>
       </method-params>
       </query-method>
       <ejb-ql>SELECT OBJECT(p) FROM Parts AS p WHERE p.serialNo = ?1</ejb-ql>
       </query>
       <query>
       <description>auto generated method</description>
       <query-method>
       <method-name>findByInfo</method-name>
       <method-params>
       <method-param>java.lang.String</method-param>
       </method-params>
       </query-method>
       <ejb-ql>SELECT OBJECT(p) FROM Parts AS p WHERE p.info = ?1</ejb-ql>
       </query>
       </entity>
       </enterprise-beans>
      
      


      THX a lot for any kind of information!!!!