Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Nested exception...

Status
Not open for further replies.

kanghao

IS-IT--Management
Jul 4, 2004
68
KR
What is the nested exception?
What cause this exception?
How can I trouble shoot this situation?
Thanks.

The log is as follows;

[2005/02/16 10:03] in admin.sb.rm.rm010.RM010Sb_lyr1cg_Impl.updateOriginalDocument() : NullPointerException , appl_no: 102050008399, rs_no: 112005501348864, err_msg: null
[2005/02/16 10:03] in admin.conn.XMLDataAccess.updateOriginalDocument() : EJB Exception: : java.lang.NullPointer
xception
at admin.kipo.sb.rm.rm010.RM010SbBean.updateOriginalDocument(RM010SbBean.java:255)
at admin.kipo.sb.rm.rm010.RM010Sb_lyr1cg_EOImpl.updateOriginalDocument(RM010Sb_lyr1cg_EOImpl.java:98)
at admin.kipo.sb.rm.rm010.RM010Sb_lyr1cg_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
; nested exception is:
java.lang.NullPointerException
 
A nested exception is like this :

Code:
try {
  // somthing
  try {

  } catch (SomeException se) {
      // do something and rethrow
      throw new Exception(se);
  }
} catch (Exception e) {
   e.printStackTrace();
}

The mistake here is that you should always print the stack trace to the logs because if you don't you won't always know the root cause of the original exception - like where your NullPointerException occured.

--------------------------------------------------
Free Database Connection Pooling Software
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top