#48 Null pointer at ArrayDataResultSet.next()

open
nobody
Monitoring (9)
9
2009-10-15
2009-10-14
No

Request urgent help!

Trying my EAR to monitor using Glassbox on Weblogic 8.1Sp4. Application startup is fine and could browse many pages. But getting NullPointerException at rs.next() whenever it encounters the following. This type of code is used in multiple places within our application and it falters at all instance with similar exception -

Array array = cstmt.getArray(5); rs = array.getResultSet(); while(rs.next()) {};

============= Details of the exception follows -

java.lang.NullPointerException at glassbox.monitor.resource.JdbcMonitor.ajc$interFieldGetDispatch$glassboxmonitorresourceJdbcMonitor$glassboxmonitorresourceJdbcMonitor$TrackedStatement$key(JdbcMonitor.aj) at glassbox.monitor.resource.JdbcMonitor.getStatementKey(JdbcMonitor.aj: 418) at glassbox.monitor.resource.JdbcMonitor.ajc$if_5(JdbcMonitor.aj:133) at oracle.jdbc.driver.ArrayDataResultSet.next(ArrayDataResultSet.java:13 7)

Discussion

  • Joydeep Sarkar

    Joydeep Sarkar - 2009-10-15

    Thanks. I tried but did not work. Let me provide some more details about the problem and what all I tried.

    - The application under test has a set of JSP, EJB and connects to Oracle using classes12.zip/ojdbc14.jar
    - I just enabled the appserver with galssbox and started.
    - it serves nullpointer exception whenever it executed rs.next(). Detail code and exception block follows
    - As such the glassbox console did only listed jsps and nop further detail instrimentation details.This was okay perhaps becasue I did not do a offline weaving of the EJB jars etc.
    - In this statet it should work .. but failing.
    - I even offline weaved the ojdbc14.jar and tried. It still failed.

    Please help. Also, how can I see instrumentation details for all menthod calls and SQL invocations .

    Code

    cstmt = conn.prepareCall("{call IIMS_SEC.DASECLOGONSELLST(?, ?, ?, ?, ?) }");
    if(logHandle.boolCheckDebugLevelforPrint(IIMSUtility.INFO)) logHandle.log("Inside IIMS_SEC.DASECLOGONSELLST INPUT PARAMETERS ARE" + " PROLEID= " + PROLEID + ", PUSERROLEID= " + PUSERROLEID);
    if(PROLEID == Long.MIN_VALUE)
    {
    cstmt.setNull(1 , java.sql.Types.VARCHAR);
    }
    else
    {
    cstmt.setString(1 , IIMSOracleFunc.to_char(PROLEID));
    }
    if(PUSERROLEID == Long.MIN_VALUE)
    {
    cstmt.setNull(2 , java.sql.Types.VARCHAR);
    }
    else
    {
    cstmt.setString(2 , IIMSOracleFunc.to_char(PUSERROLEID));
    }
    cstmt.registerOutParameter(3 , java.sql.Types.ARRAY ,"COMMON.TRECORDTAB");
    cstmt.registerOutParameter(4 , java.sql.Types.DOUBLE);
    cstmt.registerOutParameter(5 , java.sql.Types.VARCHAR);
    cstmt.execute();
    PRETCODE = cstmt.getLong(4);
    PRETERR = cstmt.getString(5);
    PLOGONSTATUSLIST = new COMMON.TRECORDTAB();
    if(logHandle.boolCheckDebugLevelforPrint(IIMSUtility.INFO)) logHandle.log("Inside IIMS_SEC.DASECLOGONSELLST OUTPUT PARAMETERS ARE" + " PRETCODE= " + PRETCODE + ", PRETERR= " + PRETERR + ", PLOGONSTATUSLIST= " + PLOGONSTATUSLIST);
    if(PRETCODE == 0)
    {
    Array array = cstmt.getArray(3);
    rs = array.getResultSet();
    int count = 1;
    boolean blnFound = false;
    while(rs.next())
    {
    blnFound = true;
    int intTempCount = count;
    PLOGONSTATUSLIST.set(intTempCount ,(String) rs.getObject(2));
    count = count + 1;
    }
    if(blnFound)
    {
    PLOGONSTATUSLIST.extend(1);
    PLOGONSTATUSLIST.delete(PLOGONSTATUSLIST.getCount());
    }
    }
    }
    =========================================================================

    Exception

    15 Oct 2009 14:45:59 Inside IIMS_SEC.DASECLOGONSELLST OUTPUT PARAMETERS ARE PRETCODE= 0, PRETERR= null, PLOGONSTATUSLIST= []
    15 Oct 2009 14:45:59 java.lang.NullPointerException
    at glassbox.monitor.resource.JdbcMonitor.ajc$interFieldGetDispatch$glassbox_monitor_resource_JdbcMonitor$glassbox_monitor_resource_JdbcMonitor$TrackedStatement$key(JdbcMonitor.aj)
    at glassbox.monitor.resource.JdbcMonitor.getStatementKey(JdbcMonitor.aj:418)
    at glassbox.monitor.resource.JdbcMonitor.ajc$if_5(JdbcMonitor.aj:133)
    at oracle.jdbc.driver.ArrayDataResultSet.next(ArrayDataResultSet.java:157)
    at iims.SECURITY.SRSECBean.SRSECLOGON_LISTLOGONSTATUS(SRSECBean.java:570)
    at iims.SECURITY.SRSEC_bc19n4_ELOImpl.SRSECLOGON_LISTLOGONSTATUS(SRSEC_bc19n4_ELOImpl.java:321)
    at iims.SECURITY.BPSECSERVICEFUNCTIONSBean.SEARCHPASSWORD(BPSECSERVICEFUNCTIONSBean.java:385)
    at iims.SECURITY.BPSECSERVICEFUNCTIONS_gcogb4_ELOImpl.SEARCHPASSWORD(BPSECSERVICEFUNCTIONS_gcogb4_ELOImpl.java:375)
    at iims.SECURITY.TCSECBean.TRANSACTIONCONTROL(TCSECBean.java:2037) at iims.SECURITY.TCSEC_vblskw_ELOImpl.TRANSACTIONCONTROL(TCSEC_vblskw_ELOImpl.java:46)
    at jsp_servlet._target._source._security.__pcsec_process.processBody(__pcsec_process.java:2058)
    at jsp_servlet._target._source._security.__pcsec_process._jspService(__pcsec_process.java:3150)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:33) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
    at iims.filter.IIMSRestrictDirectURLAccessFilter.doFilter(IIMSRestrictDirectURLAccessFilter.java:212)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6724)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    =========================================================================

     
  • Joydeep Sarkar

    Joydeep Sarkar - 2009-10-15
    • priority: 5 --> 9
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks