• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

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

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
A berm makes a great wind break. And we all like to break wind once in a while. Like this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic