Hi,
When I am calling the create(param1,param2,...)
method null pointer exception comes.I give print
statements in ejbCreate(param1,param2,...) method
and all those statements get printed and after that
its shows the error :null pointer exception from
ejbCreate().
Thanx in advance...
Deepesh
Discussions
EJB programming & troubleshooting: Null Pointer Exception while calling create() in entity bean
-
Null Pointer Exception while calling create() in entity bean (4 messages)
- Posted by: Deepesh jain
- Posted on: September 25 2001 11:13 EDT
Threaded Messages (4)
- Null Pointer Exception while calling create() in entity bean by Gal Binyamini on September 25 2001 17:16 EDT
- Null Pointer Exception while calling create() in entity bean by Deepesh jain on September 25 2001 23:56 EDT
- Null Pointer Exception while calling create() in entity bean by Gal Binyamini on September 29 2001 04:47 EDT
- Null Pointer Exception while calling create() in entity bean by Deepesh jain on September 25 2001 23:56 EDT
- Null Pointer Exception while calling create() in entity bean by Joost van de Wijgerd on October 03 2001 05:52 EDT
-
Null Pointer Exception while calling create() in entity bean[ Go to top ]
- Posted by: Gal Binyamini
- Posted on: September 25 2001 17:16 EDT
- in response to Deepesh jain
What type of persistence are you using?
This is just a shot in the dark, but:
- If you're using BMP make sure you return a PK
- If you're using CMP make sure you update the PK fields before returning.
If these fail I might have other ideas if you post a code snippet+info. This way I'm only guessing...
regards
Gal -
Null Pointer Exception while calling create() in entity bean[ Go to top ]
- Posted by: Deepesh jain
- Posted on: September 25 2001 23:56 EDT
- in response to Gal Binyamini
Hi,
I am using CMP.
Following is the code which I am using-->
dataImplantRequisitionDetailHome.create(param1,param2,....);
I have given the print statements in
ejbCreate(param1,param2,....) which prints the value of
various parameters passed to the create().
After printing the values and before calling ejbPostCreate()
it gives null pointer exception.
Waiting for quick reply....
Thanks and regards,
Deepesh -
Null Pointer Exception while calling create() in entity bean[ Go to top ]
- Posted by: Gal Binyamini
- Posted on: September 29 2001 16:47 EDT
- in response to Deepesh jain
I ment the code of your ejbCreate method... I can't make any new ideas with the info you just gave me...
Regards
Gal -
Null Pointer Exception while calling create() in entity bean[ Go to top ]
- Posted by: Joost van de Wijgerd
- Posted on: October 03 2001 05:52 EDT
- in response to Deepesh jain
Hi,
If this is an entity bean you should return the Primary Key. What could be happening is that you return a null object.
Joost.