• Post Reply Bookmark Topic Watch Topic
  • New Topic

problem with entity bean  RSS feed

 
Kirk Lee
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have already depoyed ejb to jboss,when I run entity bean client which creat a row to the database, the console shows everything is ok, but when I connect to database, execute select sql statement,but what a surprise! the data does not insert to database,Why??? furthermore,when I run the client with the same data again, the console shows that "javax.ejb.DuplicateKeyException: Entity with key XXX already exists",what's the reason,anybody can tell me? thanks.
 
Thomas Smets
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would first ask you if you could read the data back from an EntityBean ? If that's the case you are sure you did "push" the data into the Application Server correctly !
Are you (auto-)committing, then ?
Are you sure your Bean is BMP & not CMP & the data is somewhere else ?
Thomas,
 
Malli Raman
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Check the table values.Already a record with the same primary key value be present in the table.
check for other primary key values.
Regards,
M.S. Raman.

Originally posted by kirk lee:
Hi

I have already depoyed ejb to jboss,when I run entity bean client which creat a row to the database, the console shows everything is ok, but when I connect to database, execute select sql statement,but what a surprise! the data does not insert to database,Why??? furthermore,when I run the client with the same data again, the console shows that "javax.ejb.DuplicateKeyException: Entity with key XXX already exists",what's the reason,anybody can tell me? thanks.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!