• Post Reply Bookmark Topic Watch Topic
  • New Topic

CMR Assigning Removed Bean

 
JA Miller
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am just starting out with EJBs, trying to learn CMR. Unfortunately, I am also under a tight deadline. But what else is new. My problem:
As a test case, I have a pair of Oracle tables defined, with a table A in a one-to-many relationship with table B (A=one, B=many). I am using WebLogic 8.1, and JBuilder X to generate the code; local EBs for the tables, with DTOs for each, and a session facade/business delegate on B.
In the session facade class, I create EB A, which works OK (when I do it by itself; otherwise it gets rolled back later). BUT when I execute create on EB B, I get the following in my WebLogic log:
javax.ejb.TransactionRolledbackLocalException: EJB Exception:; nested exception is: java.lang.IllegalArgumentException: [EJB:010133]Illegal attempt to assign a removed bean to a CMR field. The EJB with primary key 'Coll 1' has been removed and cannot be assigned to this CMR field.

Now, I assume that, since I am not doing a remove, that this really means that the bean with key "Coll 1" was never added. But I don't understand why the bean that I am trying to create needs to be there at all. (I played with some of the Persistence tuning parameters, affecting when the DB gets updated, etc. but none have worked so far).
I'm sure this has a simple explanation; I hope someone knows what it is.
Thanks!
 
JA Miller
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We found the solution. The RDBMS Relationships, as set up in JBuilder, had not been changed from the defaults. When the keys were properly related, the problem was resolved.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!