0 Replies Latest reply on Jan 14, 2004 3:31 PM by sumudu67

    Unusual FinderException with JBoss 3.2.2 and Oracle 8i... Pl

    sumudu67 Newbie

      Hi,

      I get the following error when i execute the findByplayerID Finder. I generate the primary-key through the container hence the primary key is not specified.

      02:49:00,387 DEBUG [PlayerEntityBean#findByPlayerID] Executing SQL: SELECT t0_p.PlayerEntityBean_upk FROM PLAYER_T
      t0_p WHERE (t0_p.PLAYER_ID = ?)
      02:49:00,397 DEBUG [PlayerEntityBean#findByPlayerID] Find failed
      java.sql.SQLException: ORA-00904: invalid column name

      My table description is as follows,

      SQL> desc player_t
      Name Null? Type
      ----------------------------------------- -------- ----------------------------
      PID_PK NOT NULL NUMBER(9)
      PLAYER_ID VARCHAR2(24)
      EMAIL VARCHAR2(64)
      GENDER CHAR(6)

      The EJB-QL for the finder is:
      SELECT OBJECT(p)
      FROM Player p
      WHERE p.playerID = ?1

      <ejb.jar> entries are as follows
      -------------------------------------
      <display-name>PlayerEntityBean</display-name>
      <ejb-name>PlayerEntityBean</ejb-name>
      <local-home>com.harbinger.domain.entity.PlayerEntityHome</local-home>
      com.harbinger.domain.entity.PlayerEntity
      <ejb-class>com.harbinger.domain.entity.PlayerEntityBean</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>java.lang.Object</prim-key-class>
      False
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>Player</abstract-schema-name>

      <jbosscmp-jdbc.jar> entries are as follows
      ----------------------------------------------------

      <ejb-name>PlayerEntityBean</ejb-name>
      <table-name>PLAYER_T</table-name>
      <cmp-field>
      <field-name>email</field-name>
      <column-name>EMAIL</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>playerID</field-name>
      <column-name>PLAYER_ID</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>playerPKID</field-name>
      <column-name>PID_PK</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>gender</field-name>
      <column-name>GENDER</column-name>
      </cmp-field>



      I would be extremely extremely greately if sombody could spot my mistake, coz im beginning to tear my hair out!!

      -thanx
      Sumudu