Hi, I am trying to implement a CMP to learn how does it work. I created a table on Oracle 9i with the following script -
CREATE TABLE Employee ( EmpNo NUMBER(5, 0) CONSTRAINT pk_empno PRIMARY KEY, EmpName VARCHAR2(50) ); I am using NetBeans 5.0 IDE; thru NetBeans wizard I created an entity bean for this table; the findByPrimaryKey method takes a java.math.BigDecimal parameter. The ejb-jar.xml snippet is - jdbc:oracle:thin:@192.168.4.184:1521:NITIN [NitinTest on NITINTEST] <display-name>EmployeeEB</display-name> <ejb-name>EmployeeBean</ejb-name> <local-home>com.newgen.ejb.EmployeeLocalHome</local-home> com.newgen.ejb.EmployeeLocal <ejb-class>com.newgen.ejb.EmployeeBean</ejb-class> <persistence-type>Container</persistence-type> <prim-key-class>java.math.BigDecimal</prim-key-class> false <abstract-schema-name>Employee</abstract-schema-name> <cmp-field> <field-name>empno</field-name> </cmp-field> <cmp-field> <field-name>empname</field-name> </cmp-field> <primkey-field>empno</primkey-field> auto generated method <query-method> <method-name>findByEmpno</method-name> <method-params> <method-param>java.math.BigDecimal</method-param> </method-params> </query-method> <ejb-ql>SELECT OBJECT(e) FROM Employee AS e WHERE e.empno = ?1</ejb-ql> auto generated method <query-method> <method-name>findByEmpname</method-name> <method-params> <method-param>java.lang.String</method-param> </method-params> </query-method> <ejb-ql>SELECT OBJECT(e) FROM Employee AS e WHERE e.empname = ?1</ejb-ql> I wrote a SessionFacade for this entity bean, which calls the findByPrimaryKey method of the entity bean. The problem I am facing is, even when I am passing the correct data (a primary key for which a row exists), the entity bean is throwing a FinderException. Any idea why this might be happening? Thanx and Regards Nitin View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3925209#3925209 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3925209 ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user