0 Replies Latest reply on May 19, 2003 10:57 AM by joavila

    Finder Problem

    joavila Newbie

      hi everybody!
      I use middlegen for generating table-bean descriptors.
      Then I use Xdoclet to make the ejb-jar, jboss and jbosscmp-jdbc xml files. Deploy has no error. But when I try to use finder, any one, the client and server gives me this Exception:

      javax.ejb.EJBException: Method is not a known CMP field accessor, CMR field accessor, or ejbSelect method: methodName=setEntityContext

      In my files I see the finder defined.

      Do not understand what's happening.

      I tried to find some information about it in this Forum and in google, but nothing appeared. Should I look for information in other forum??
      Use .net technology =) ???
      Dedicate my life to another no-computer thing????
      Thanxs in advance.



      I got this specifications:

      jbosscmp-jdbc.xml


      <ejb-name>Usuario</ejb-name>
      <table-name>dbo.USUARIO</table-name>

      <cmp-field>
      <field-name>idUsuario</field-name>
      <column-name>ID_USUARIO</column-name>

      </cmp-field>
      <cmp-field>
      <field-name>codigoInstitucion</field-name>
      <column-name>CODIGO_INSTITUCION</column-name>

      </cmp-field>
      <cmp-field>
      <field-name>codigoJpl</field-name>
      <column-name>CODIGO_JPL</column-name>

      </cmp-field>
      <cmp-field>
      <field-name>codigoMunicipalidad</field-name>
      <column-name>CODIGO_MUNICIPALIDAD</column-name>

      </cmp-field>
      <cmp-field>
      <field-name>codigoPermiso</field-name>
      <column-name>CODIGO_PERMISO</column-name>

      </cmp-field>
      <cmp-field>
      <field-name>passwordUsuario</field-name>
      <column-name>PASSWORD_USUARIO</column-name>

      </cmp-field>
      <cmp-field>
      <field-name>runUsuario</field-name>
      <column-name>RUN_USUARIO</column-name>

      </cmp-field>
      <cmp-field>
      <field-name>nombresUsuario</field-name>
      <column-name>NOMBRES_USUARIO</column-name>

      </cmp-field>
      <cmp-field>
      <field-name>apellido1Usuario</field-name>
      <column-name>APELLIDO1_USUARIO</column-name>

      </cmp-field>
      <cmp-field>
      <field-name>apellido2Usuario</field-name>
      <column-name>APELLIDO2_USUARIO</column-name>

      </cmp-field>
      <cmp-field>
      <field-name>fechaVigenciaCuenta</field-name>
      <column-name>FECHA_VIGENCIA_CUENTA</column-name>

      </cmp-field>

      <!-- merge point: jbosscmp-jdbc-load-{0}.xml -->



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

      jboss.xml


      <ejb-name>Usuario</ejb-name>
      <local-jndi-name>ejb/contabilidad/UsuarioLocalHome</local-jndi-name>



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

      ejb-jar.xml


      <![CDATA[]]>

      <ejb-name>Usuario</ejb-name>

      <local-home>indecs.contabilidad.persistence.UsuarioLocalHome</local-home>
      indecs.contabilidad.persistence.UsuarioLocal

      <ejb-class>indecs.contabilidad.persistence.UsuarioBean</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>java.lang.String</prim-key-class>
      False
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>Usuario</abstract-schema-name>
      <cmp-field >
      <![CDATA[Returns the idUsuario]]>
      <field-name>idUsuario</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[Returns the codigoInstitucion]]>
      <field-name>codigoInstitucion</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[Returns the codigoJpl]]>
      <field-name>codigoJpl</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[Returns the codigoMunicipalidad]]>
      <field-name>codigoMunicipalidad</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[Returns the codigoPermiso]]>
      <field-name>codigoPermiso</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[Returns the passwordUsuario]]>
      <field-name>passwordUsuario</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[Returns the runUsuario]]>
      <field-name>runUsuario</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[Returns the nombresUsuario]]>
      <field-name>nombresUsuario</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[Returns the apellido1Usuario]]>
      <field-name>apellido1Usuario</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[Returns the apellido2Usuario]]>
      <field-name>apellido2Usuario</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[Returns the fechaVigenciaCuenta]]>
      <field-name>fechaVigenciaCuenta</field-name>
      </cmp-field>
      <primkey-field>idUsuario</primkey-field>


      <query-method>
      <method-name>findAll</method-name>
      <method-params>
      </method-params>
      </query-method>
      <result-type-mapping>Local</result-type-mapping>
      <ejb-ql><![CDATA[SELECT OBJECT(o) FROM Usuario o]]></ejb-ql>


      <![CDATA[CODIGO_INSTITUCION is not indexed.]]>
      <query-method>
      <method-name>findByCodigoInstitucion</method-name>
      <method-params>
      <method-param>byte</method-param>
      </method-params>
      </query-method>
      <result-type-mapping>Local</result-type-mapping>
      <ejb-ql><![CDATA[SELECT DISTINCT OBJECT(o) FROM Usuario o WHERE o.codigoInstitucion = ?1]]></ejb-ql>


      <![CDATA[CODIGO_JPL is not indexed.]]>
      <query-method>
      <method-name>findByCodigoJpl</method-name>
      <method-params>
      <method-param>long</method-param>
      </method-params>
      </query-method>
      <result-type-mapping>Local</result-type-mapping>
      <ejb-ql><![CDATA[SELECT DISTINCT OBJECT(o) FROM Usuario o WHERE o.codigoJpl = ?1]]></ejb-ql>


      <![CDATA[CODIGO_MUNICIPALIDAD is not indexed.]]>
      <query-method>
      <method-name>findByCodigoMunicipalidad</method-name>
      <method-params>
      <method-param>java.lang.String</method-param>
      </method-params>
      </query-method>
      <result-type-mapping>Local</result-type-mapping>
      <ejb-ql><![CDATA[SELECT DISTINCT OBJECT(o) FROM Usuario o WHERE o.codigoMunicipalidad = ?1]]></ejb-ql>


      <![CDATA[CODIGO_PERMISO is not indexed.]]>
      <query-method>
      <method-name>findByCodigoPermiso</method-name>
      <method-params>
      <method-param>short</method-param>
      </method-params>
      </query-method>
      <result-type-mapping>Local</result-type-mapping>
      <ejb-ql><![CDATA[SELECT DISTINCT OBJECT(o) FROM Usuario o WHERE o.codigoPermiso = ?1]]></ejb-ql>


      <![CDATA[PASSWORD_USUARIO is not indexed.]]>
      <query-method>
      <method-name>findByPasswordUsuario</method-name>
      <method-params>
      <method-param>java.lang.String</method-param>
      </method-params>
      </query-method>
      <result-type-mapping>Local</result-type-mapping>
      <ejb-ql><![CDATA[SELECT DISTINCT OBJECT(o) FROM Usuario o WHERE o.passwordUsuario = ?1]]></ejb-ql>


      <![CDATA[RUN_USUARIO is not indexed.]]>
      <query-method>
      <method-name>findByRunUsuario</method-name>
      <method-params>
      <method-param>java.lang.String</method-param>
      </method-params>
      </query-method>
      <result-type-mapping>Local</result-type-mapping>
      <ejb-ql><![CDATA[SELECT DISTINCT OBJECT(o) FROM Usuario o WHERE o.runUsuario = ?1]]></ejb-ql>


      <![CDATA[NOMBRES_USUARIO is not indexed.]]>
      <query-method>
      <method-name>findByNombresUsuario</method-name>
      <method-params>
      <method-param>java.lang.String</method-param>
      </method-params>
      </query-method>
      <result-type-mapping>Local</result-type-mapping>
      <ejb-ql><![CDATA[SELECT DISTINCT OBJECT(o) FROM Usuario o WHERE o.nombresUsuario = ?1]]></ejb-ql>


      <![CDATA[APELLIDO1_USUARIO is not indexed.]]>
      <query-method>
      <method-name>findByApellido1Usuario</method-name>
      <method-params>
      <method-param>java.lang.String</method-param>
      </method-params>
      </query-method>
      <result-type-mapping>Local</result-type-mapping>
      <ejb-ql><![CDATA[SELECT DISTINCT OBJECT(o) FROM Usuario o WHERE o.apellido1Usuario = ?1]]></ejb-ql>


      <![CDATA[APELLIDO2_USUARIO is not indexed.]]>
      <query-method>
      <method-name>findByApellido2Usuario</method-name>
      <method-params>
      <method-param>java.lang.String</method-param>
      </method-params>
      </query-method>
      <result-type-mapping>Local</result-type-mapping>
      <ejb-ql><![CDATA[SELECT DISTINCT OBJECT(o) FROM Usuario o WHERE o.apellido2Usuario = ?1]]></ejb-ql>


      <![CDATA[FECHA_VIGENCIA_CUENTA is not indexed.]]>
      <query-method>
      <method-name>findByFechaVigenciaCuenta</method-name>
      <method-params>
      <method-param>java.sql.Timestamp</method-param>
      </method-params>
      </query-method>
      <result-type-mapping>Local</result-type-mapping>
      <ejb-ql><![CDATA[SELECT DISTINCT OBJECT(o) FROM Usuario o WHERE o.fechaVigenciaCuenta = ?1]]></ejb-ql>

      <!-- Write a file named ejb-finders-UsuarioBean.xml if you want to define extra finders. -->