Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Customer Bean, Head First EJB

 
Anjali S Sharma
Ranch Hand
Posts: 279
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to deploy the Cusotmer Bean on JBoss. This is my code


But when I run the server it gives me a message.


15:13:26,187 WARN [verifier] EJB spec violation:
Bean : CustomerBeanCMP
Method : public String ejbCreate(String, String, String, String) throws CreateException
Section: 10.6.4
Warning: The return type of an ejbCreate(...) method must be the entity bean's primary key type.

Please tell me how to correct this error. I have written the bean as per the book.
 
sawan parihar
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
What is the <prim-key-class> in the DD. Please post your home interface and ejb-jar.xml.

Make sure that in ejb-jar.xml you have
<prim-key class>java.lang.String</prim-key-class> and the return type is correct in the home interface create method.

Hope it helps.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic