Hi,
This is exception we are facing with. This happens after 10 minutes of the client idle time start.
Could anyone help in this.
Exception in non-transactional EJB invoke:
javax.ejb.CreateException: A bean primary key field may not be null after ejbCreate has been called
at weblogic.ejb.internal.StatefulEJBObject.postCreate (StatefulEJBObject.java:227)
at
justarrive.backend.billing.PaymentDataBeanEOImpl.create (PaymentDataBeanEOImpl.java:60)
at
justarrive.backend.billing.PaymentDataBeanHomeImpl.create (PaymentDataBeanHomeImpl.java:32)
at
justarrive.backend.billing.PaymentDataBeanHomeImpl_ServiceStub.cr eate(PaymentDataBeanHomeImpl_ServiceStub.java:180)
at justarrive.backend.ICSBillDataBean.ccAuthBill (ICSBillDataBean.java:206)
at justarrive.backend.ICSBillDataBeanEOImpl.ccAuthBill (ICSBillDataBeanEOImpl.java:142)
at justarrive.backend.ICSBillDataBeanEOImpl_WLSkel.invoke (ICSBillDataBeanEOImpl_WLSkel.java:79)
at
weblogic.rmi.extensions.BasicServerObjectAdapter.invoke (BasicServerObjectAdapter.java:338)
at
weblogic.rmi.extensions.BasicRequestHandler.handleRequest (BasicRequestHandler.java:69)
at weblogic.rmi.internal.BasicExecuteRequest.execute (BasicExecuteRequest.java:15)
at weblogic.kernel.ExecuteThread.run
(ExecuteThread.java:120)
Tue Aug 15 17:52:27 PDT 2000:<I> <DGCserver> tried to renew lease for 1 lost reference(s).
Tue Aug 15 17:52:27 PDT 2000:<I> <DGCserver> tried to renew lease for 1 lost reference(s).
Tue Aug 15 17:52:27 PDT 2000:<I> <DGCserver> tried to renew lease for 1 lost reference(s).
Tue Aug 15 17:52:27 PDT 2000:<I> <DGCserver> tried to renew lease for 1 lost reference(s).
Tue Aug 15 17:52:27 PDT 2000:<I> <DGCserver> tried to renew lease for 1 lost reference(s).
Tue Aug 15 17:53:26 PDT 2000:<I> <DGCserver> tried to renew lease for 1 lost reference(s).
Tue Aug 15 17:53:26 PDT 2000:<I> <DGCserver> tried to renew lease for 1 lost reference(s).
Tue Aug 15 17:53:26 PDT 2000:<I> <DGCserver> tried to renew lease for 1 lost reference(s).
Tue Aug 15 17:53:26 PDT 2000:<I> <DGCserver> tried to renew lease for 1 lost reference(s).
Thanks,
Nicklesh
-
Lease value error (10 messages)
- Posted by: nicklesh madoori
- Posted on: October 25 2000 17:23 EDT
Threaded Messages (10)
- Lease value error by Filip Hanik on October 25 2000 18:01 EDT
- Lease value error by nicklesh madoori on October 25 2000 18:10 EDT
-
Lease value error by Filip Hanik on October 25 2000 06:36 EDT
-
Lease value error by nicklesh madoori on October 25 2000 08:23 EDT
-
Lease value error by nicklesh madoori on October 25 2000 08:29 EDT
-
Lease value error by Dimitri Rakitine on October 25 2000 10:29 EDT
-
Lease value error by nicklesh madoori on October 26 2000 12:09 EDT
-
Lease value error by Filip Hanik on October 26 2000 12:51 EDT
- Lease value error by nicklesh madoori on October 26 2000 01:54 EDT
-
Lease value error by Filip Hanik on October 26 2000 12:51 EDT
-
Lease value error by nicklesh madoori on October 26 2000 12:09 EDT
-
Lease value error by Dimitri Rakitine on October 25 2000 10:29 EDT
-
Lease value error by nicklesh madoori on October 25 2000 08:29 EDT
-
Lease value error by nicklesh madoori on October 25 2000 08:23 EDT
-
Lease value error by Filip Hanik on October 25 2000 06:36 EDT
- Lease value error by nicklesh madoori on October 25 2000 18:10 EDT
- Lease value error by Dimitri Rakitine on October 25 2000 20:18 EDT
-
Lease value error[ Go to top ]
- Posted by: Filip Hanik
- Posted on: October 25 2000 18:01 EDT
- in response to nicklesh madoori
Looks like the ejbCreate doesn't return a primary key properly.
If you look at the error it says "A bean primary key field may not be null after ejbCreate has been called"
During the ejbCreate the primary key has to be complete, and not contain any nullvalues
Filip -
Lease value error[ Go to top ]
- Posted by: nicklesh madoori
- Posted on: October 25 2000 18:10 EDT
- in response to Filip Hanik
Hi Philip,
I have fixed that. Inspite of that it still returns the same error.
Additions:
the environment here is EJB, JSP and weblogic 5.1
Thanks,
N -
Lease value error[ Go to top ]
- Posted by: Filip Hanik
- Posted on: October 25 2000 18:36 EDT
- in response to nicklesh madoori
what does your ejbCreate code look like?
are you using CMP or BMP?
Filip -
Lease value error[ Go to top ]
- Posted by: nicklesh madoori
- Posted on: October 25 2000 20:23 EDT
- in response to Filip Hanik
Hi Filip,
We have a stateful session bean which calls the entity bean based on different validations. This session bean basically keeps track of the users from the login to logout. The entity beans are called when the user makes any kind of transactions. One entity bean hold the user details and the other entity bean holds the transactional information.
The error we are getting is when the user is idle for 10 minutes. He automatically loses connection with the server. The server keeps sending the message...
<DGCserver> tried to renew lease for 1 lost reference(s).
I hope this information is enough. If not let me know.
Thanks,
N -
Lease value error[ Go to top ]
- Posted by: nicklesh madoori
- Posted on: October 25 2000 20:29 EDT
- in response to nicklesh madoori
This is the ejbCreate method:
public PaymentDataPK ejbCreate(Payment payment) throws CreateException, SQLException, RemoteException, EJBException {
declarations;
try{
defining connection;
PaymentDataPK primaryKey = new PaymentDataPK(paymentID);
creating statement;
if(ps.executeUpdate() != 1) {
throw new CreateException("Failed to add Payment to database.");
}
return primaryKey;
}catch(Exception se) {
se.printStackTrace();
} finally {
try{
if(result != null)
result.close();
if (ps != null)
ps.close();
if(conn != null)
conn.close();
}catch (SQLException se) {
se.printStackTrace();
}
}
return null;
}
-
Lease value error[ Go to top ]
- Posted by: Dimitri Rakitine
- Posted on: October 25 2000 22:29 EDT
- in response to nicklesh madoori
It looks like it throws an exception, catches it, and returns null:
try{
...
return pk;
}catch(Exception se) {
se.printStackTrace();
} finally {
...
}
return null;
-
Lease value error[ Go to top ]
- Posted by: nicklesh madoori
- Posted on: October 26 2000 12:09 EDT
- in response to Dimitri Rakitine
I tried as you have advised but this is what i get
Tue Oct 24 19:22:20 PDT 2000:<I> <DGCserver> tried to renew lease for 1 lost reference(s).
Tue Oct 24 19:22:20 PDT 2000:<I> <DGCserver> tried to renew lease for 1 lost reference(s).
Tue Oct 24 19:22:20 PDT 2000:<I> <DGCserver> tried to renew lease for 1 lost reference(s).
Tue Oct 24 19:22:20 PDT 2000:<I> <DGCserver> tried to renew lease for 1 lost reference(s).
Tue Oct 24 19:22:20 PDT 2000:<I> <DGCserver> tried to renew lease for 1 lost reference(s).
This is after fixing the primarykey problem
Thanks,
N -
Lease value error[ Go to top ]
- Posted by: Filip Hanik
- Posted on: October 26 2000 12:51 EDT
- in response to nicklesh madoori
do you still return null in the ejbCreate method?
The ejbCreate method should never return null, it should throw a CreateException.
Please, post the complete code
thanks
Filip -
Lease value error[ Go to top ]
- Posted by: nicklesh madoori
- Posted on: October 26 2000 13:54 EDT
- in response to Filip Hanik
Here is the actual code for ejbCreate():
public PaymentDataPK ejbCreate(Payment pymt) throws CreateException, SQLException, RemoteException, EJBException {
this.jID = pymt.getJID();
this.pymtTpID = pymt.getPymtTpID();
this.cCNo = pymt.getCCNo();
this.expMnth = pymt.getExpMnth();
Connection conn = null;
PreparedStatement ps = null;
ResultSet result = null;
try{
Class.forName("weblogic.jdbc.pool.Driver").newInstance();
conn = DriverManager.getConnection("jdbc:weblogic:pool:oraclePool", null);
ps = conn.prepareStatement("SELECT PYMT_ID_SEQ.NEXTVAL FROM DUAL");
result = ps.executeQuery();
if(!result.next()) {
throw new ObjectNotFoundException("Unable to get next PAYMENT_ID_SEQ"
+" value.");
} else {
this.pymtID = result.getInt(1);
}
PaymentDataPK primaryKey = new PaymentDataPK(pymtID);
ps = conn.prepareStatement("INSERT INTO pymt_trans (j_id, "
+"pymt_id, pymt_tp_id, c_c_no, exp_mnth) VALUES(?,?,?,?,?)");
ps.setInt(1, jID);
ps.setInt(2, pymtID);
ps.setInt(3, pymtTpID);
ps.setString(4, cCNo);
ps.setString(5, expMnth);
if(ps.executeUpdate() != 1) {
throw new CreateException("Failed to add Payment to database.");
}
return primaryKey;
}catch(Exception se) {
se.printStackTrace();
} finally {
try{
if(result != null)
result.close();
if (ps != null)
ps.close();
if(conn != null)
conn.close();
}catch (SQLException se) {
se.printStackTrace();
}
}
return null;
}
Thanks,
Nicklesh -
Lease value error[ Go to top ]
- Posted by: Dimitri Rakitine
- Posted on: October 25 2000 20:18 EDT
- in response to nicklesh madoori
It definitely looks like your ejbCreate method returns null.