• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB1.1 to EJB 2.0 migration  RSS feed

Raj Puri
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was using Oracle application server(latest 10g) that has EJB 2.0. When I run the old code that was based on EJB 1.1. I get error:
Can not getprimaryket within ejbcreate() - ollyy thing I do in ejbcreate is return null as the key is Oracle system generated.. Believe me there is no call like getprimarykey in my code. Here is the line that fails.

IEventEntityHome eventHome = (IEventEntityHome)getEventEntityBean();
event = eventHome.create( _event.getContact1(), _event.getContact2(), _event.getEventdate(), _event.getStarttime(), _event.getEndtime(), _event.getDescr(), _event.getNotes(), _event.getcustidd());

And code for getEventEntityBean() is below:

private IEventEntityHome getEventEntityBean()
throws Exception
Context ctx = new InitialContext(System.getProperties());

Any ideas?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!