Forum Stats

  • 3,758,923 Users
  • 2,251,475 Discussions


Sqlcl gives an NullPointer Exception on a break

Peter van der Spoel
Peter van der Spoel Member Posts: 1
edited Feb 14, 2019 7:02AM in SQLcl


I'm getting a NullPointer Exception when running the following query in Sqlcl 18.4:

col datum       head 'Date'col state       head 'State'            for 99col status      head 'Description'      for a32col cnt         head 'Count'            for 999G999G999compute sum label Total of cnt on reportbreak on state skip 1 on status on reportttitle left 'Number of ECIDs by state' skip left ==================================select  state,       (case   when state = 0 then 'Running'                when state = 1 then 'Completed'                when state = 2 then 'Running with faults'                when state = 3 then 'Completed with faults'                when state = 4 then 'Running with recovery required'                when state = 5 then 'Completed with recovery required'        else                state || ''        end) as status,       trunc (created_time) datum,       count(*) cntfrom    composite_instancegroup by state, trunc(created_time)order by state, datum;

This is the stack trace I'm getting:

Feb 12, 2019 10:42:55 AM oracle.dbtools.raptor.newscriptrunner.ScriptExecutor runSEVERE: oracle.dbtools.db.SQLPLUSCmdFormatter.generateBrkComputeColKeys( oracle.dbtools.db.SQLPLUSCmdFormatter.generateBrkComputeColKeys( oracle.dbtools.db.SQLPLUSCmdFormatter.rset2sqlplus( oracle.dbtools.db.ResultSetFormatter.rset2sqlplus( oracle.dbtools.db.ResultSetFormatter.rset2sqlplus( oracle.dbtools.db.ResultSetFormatter.formatResults( oracle.dbtools.db.ResultSetFormatter.formatResults( oracle.dbtools.raptor.newscriptrunner.SQL.processResultSet( oracle.dbtools.raptor.newscriptrunner.SQL.executeQuery( oracle.dbtools.raptor.newscriptrunner.ScriptRunner.runSQL( oracle.dbtools.raptor.newscriptrunner.SQLPLUS.runExecuteFile( oracle.dbtools.raptor.newscriptrunner.ScriptRunner.runSQLPLUS( oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.process( oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.processLine( oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.startSQLPlus( oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.main(

When I change the break command to:

     break on status skip 1 on report

the query runs fine, but that is not what I want ;-)

Sounds like a bug in the parser  where the break on 'state' is causing Sqlcl to throw the stack trace. How would one go about reporting this to the Sqlcl team ?