• Post Reply Bookmark Topic Watch Topic
  • New Topic

Beginner needs help with CMR field problem

 
Julien Martin
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I have two ejbs, one called EstablishmentEJB and another called VisitorCommentsEJB. The relationship is of one EstablishmentEJB instance to many VisitorCommentsEJB instances.

Here are the definitions for the tables:



Here are the xml DDs:




Here are the two classes for the beans



I get the following error from MYSQL:




Can anyone bail me out please?

Thanks in advance,

Julien Martin.
 
Dale Seng
Ranch Hand
Posts: 275
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about putting a println or debug in the create and see if the id that's getting passed in is actually null?

--Dale--
 
Julien Martin
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am just reactivating my thread hoping someone will answer.
Thanks in advance,
Julien.
 
sarah Marsh
Ranch Hand
Posts: 282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
check when you create the bean, does it have the value in DB_ESTABLISHMENT_ID?
 
sarah Marsh
Ranch Hand
Posts: 282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I meant when you call the setXXX
 
Julien Martin
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What I don't understand is that I have followed to the letter the Cabin cruise application example. The equivalent to the phone ejb is my visitorcomment ejb; the equivalent to the customer ejb is my establishment ejb. Why is my app not working?
Julien.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!