wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes My Entity beans are not saved (stored) on data base Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "My Entity beans are not saved (stored) on data base" Watch "My Entity beans are not saved (stored) on data base" New topic
Author

My Entity beans are not saved (stored) on data base

Neo tnt
Greenhorn

Joined: Mar 02, 2011
Posts: 2
Hi,

I work with Ejb2.1, oc4j et xdoctlet.
I have a problem with my entity beans CMP:

In this case my bean is created and i can manipulate it but it is not stored on data base.

if i look up for an id in the data base i got this exception



here is the file ejb-jar.xml



Thanks in advance.
Neo tnt
Greenhorn

Joined: Mar 02, 2011
Posts: 2
Here is what it tries to do:

1) Create a bean
2) Find it by primary key
3) Find all beans of that type by primary key
4) Remove all beans of that type by primary key

Here's what happens:

1) Bean is created
2) Bean cannot be found by primary key
3) findAll() returns a Collection of size 0
4) Nothing to remove

Now, if I try to create the bean again, I get an
exception because it's already there. But I can't find
it. So, next step:

1) Is anything is the database?

Answer: no. No database entries have been made. The
database is 100% empty.

This leads me to the conclusion that Entity bean is in
cache but not in the database and that the finders are
looking in the database.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: My Entity beans are not saved (stored) on data base
 
Similar Threads
error initializing Jboss-3.2.3
SAXParseException: The content of element type "enterprise-beans" is incomplete, it m
Urgent help needed - Thanks
how debug a CMP entity error?
error while deploying ejb in jboss