• 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.
 
If you try to please everybody, your progress is limited by the noisiest fool. And this tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!