• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

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.
 
Get off me! Here, read this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic