Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

CMR Assigning Removed Bean

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.
JA Miller
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.
    Bookmark Topic Watch Topic
  • New Topic