Topic
  • 4 replies
  • Latest Post - ‏2013-02-07T15:05:57Z by Kendall.Coolidge
Kendall.Coolidge
Kendall.Coolidge
84 Posts

Pinned topic RBD 8.5.1 NPE when call to i5 stored proc returns empty result set (debug)

‏2013-01-04T20:05:30Z |
This is new since we upgraded some of our machines to RBD 8.5.1. Does not happen in RBD 8.5.

When a call to one of our i5 stored procedures returns what should be an empty result set, the cursor acts like it's null and when we try to read through it we get a NullPointerException.

This only happens in debug or preview. When deployed on WAS 8.5 it all works as it should.

Here's a snip of code from our service:


// get Financial Statement Type codes   SIFTIDchar = common.libraries.constants.PINFO_FIN_STMT_TYPE_CODES; SIFCDchar = 
"";   open rs1 with #sql
{ CALL SPINFOCR04(:SIFTIDchar, :SIFCDchar) 
};   recordCount = 0; PINFOResultSPs.removeAll();   forEach(from rs1 into PINFOResultSP_rec)
// <-- NPE thrown when this line is reached   PINFOResultSPs.appendElement(PINFOResultSP_rec); recordCount += 1;   end


We use SqlLib.connect(jndi, user, password) in our service code. In debug/preview our Services.eglbd (Build Descriptor) has the URL that is used, for example:

<BuildDescriptor name=
"ServicesDebugBuildOptions" genProject=
"Services" system=
"WIN" J2EE=
"NO" genProperties=
"GLOBAL" genDataTables=
"YES" dbms=
"DB2" sqlJDBCDriverClass=
"com.ibm.as400.access.AS400JDBCDriver" deploymentDescriptor=
"Services"> <database serverName=
"jdbc/strategy" databaseName=
"jdbc:as400:BIGDEV;prompt=false;naming=system;libraries=*libl;date format=iso"/> </BuildDescriptor>


We could work around this with a try/onException, but we have tons of existing code where this wasn't a problem before 8.5.1.

Thanks for your help,
Kendall
Updated on 2013-02-07T15:05:57Z at 2013-02-07T15:05:57Z by Kendall.Coolidge
  • markevans
    markevans
    2807 Posts

    Re: RBD 8.5.1 NPE when call to i5 stored proc returns empty result set (debug)

    ‏2013-01-04T22:30:10Z  
    Kendall,
    I would suggest opening a PMR. This sounds like something the development team should take a look at.
  • Kendall.Coolidge
    Kendall.Coolidge
    84 Posts

    Re: RBD 8.5.1 NPE when call to i5 stored proc returns empty result set (debug)

    ‏2013-01-05T14:24:01Z  
    • markevans
    • ‏2013-01-04T22:30:10Z
    Kendall,
    I would suggest opening a PMR. This sounds like something the development team should take a look at.
    OK, thanks Mark.
  • Kendall.Coolidge
    Kendall.Coolidge
    84 Posts

    Re: RBD 8.5.1 NPE when call to i5 stored proc returns empty result set (debug)

    ‏2013-01-05T14:44:48Z  
    OK, thanks Mark.
    Here is the PMR#: 25396 L6Q 000
  • Kendall.Coolidge
    Kendall.Coolidge
    84 Posts

    Re: RBD 8.5.1 NPE when call to i5 stored proc returns empty result set (debug)

    ‏2013-02-07T15:05:57Z  
    Here is the PMR#: 25396 L6Q 000
    IBM provided me a fixtest for this and it checks out fine.

    Kendall