Troubleshooting

Implementation Problems

Q1:Why do I get errors saying that I don't have an ejbCreate method or that the method signature of ejbCreate is invalid?
You may have accidentally declared the ejbCreate method to have a void type. Because CMP entity beans don't return their primary key but return null instead, you might often find yourself declaring the method as void, thinking that there is no return value. There is a return value, but it should always be null.
Q2:Why do I get errors complaining about my field variables?
Remember, under EJB 2.0, you don't declare the field variables as part of the class. You just create the accessor methods (which must be abstract), and let the EJB container worry about the fields.

Deployment Problems

Get Special Edition Using Java™ 2 Enterprise Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.