hello,
i have constructed a simple CMP bean and checked the
compliance for EJB1.1 spec using the tool provided by the
Weblogic 5.1 server. the bean passed the compliance test.
nevertheless while generating the container classes i get the following error:
error occurred compiling CustomerBeanEOImpl.java
expected primary key type - com.cust.CustomerPK
found primary key type - int
XML Deployment descriptors are OK
can anyone help?
thanks in advance
muthukumaran
-
Primary Key Error in Weblogic (2 messages)
- Posted by: muthukumaran kothandaraman
- Posted on: July 24 2000 17:38 EDT
Threaded Messages (2)
- Primary Key Error in Weblogic by kaustubh asai on July 24 2000 18:39 EDT
- Primary Key Error in Weblogic by s omeone on July 25 2000 07:42 EDT
-
Primary Key Error in Weblogic[ Go to top ]
- Posted by: kaustubh asai
- Posted on: July 24 2000 18:39 EDT
- in response to muthukumaran kothandaraman
Hi,
When you use wizard for CMP, the wizard generates weblogic-cmp-rdbms-jar.xml file with <primkey-field> tag which is optional. Try specifying custom primary key class tag <prim-key-class> with your custom primary class name(com.cust.CustomerPK ).
harish -
Primary Key Error in Weblogic[ Go to top ]
- Posted by: s omeone
- Posted on: July 25 2000 07:42 EDT
- in response to muthukumaran kothandaraman
As Harish says you require a primary key class wrapper.You cannot use primitive data types.
I think you should be able to use java.lang.Integer as a primary key, if you have a real aversion to defining your own.