Important Announcement

This forum will be discontinued.

The creation of new topics is disabled.

Please open GitHub issues for the corresponding topics/products in the following Trivadis repositories:

A lot of users have already a GitHub account and the management of the issues is better than in this forum. For example, closing a forum topic is never related to a product change. Closing a GitHub issue for an accepted bug means that the bug is fixed. This should simplify the work for all involved parties.

See this blog post for more information.

Thank you for your understanding.

Notifications
Clear all

[Solved] java.lang.NullPointerException in XMLIssuePrinterStrategy.endResource

2 Posts
2 Users
1 Likes
927 Views
0
Topic starter

Tvdcc stops from time to time on the above mentioned error (let's say once every 10 runs):

The reported java line is systematically the same: XMLIssuePrinterStrategy.java:468.

Environment:

  • Windows 7
  • jdk1.8.0_231
  • tvdcc-2.3.0
  • validators.jar (latest version from Trivadis, not customized)

Here is an example:

Trivadis PL/SQL Cop Version 2.3.0 (2019-09-28 21:09:46 +0200)
for Trivadis PL/SQL & SQL Coding Guidelines Version 3.3
Copyright 2010-2019 by Philipp Salvisberg (philipp.salvisberg@trivadis.com)
Trivadis AG (www.trivadis.com)

Trial/Preview version
- valid thru: 2020-03-31
- valid for versions less than: 3
- max. files: unlimited
- max. lines: 5000
- max. commands: 200
- max. bytes: 400000

Parameters:
- path: H:\Projects\dbcc-internal-dev\qc_utility
- filter: (pkb|pks)$
- timeout: 10
- complexity: 0
- output: H:\Projects\dbcc-internal-dev\qc_utility\.scannerwork\tvdcc-result.html
- template: html.xsl
- excel: false
- html: false
- transonly: false
- cleanup: false
- check:
- skip:
- nosonar: true
- license:
- validator: com.trivadis.tvdcc.validators.TrivadisGuidelines3Plus
- genmodel: false

processing file 'qc_opsys_demand_cfg.pks'... 1 issue found.
processing file 'QC_TPL_DEFINES.pks'... 1 issue found.
processing file 'QC_UTILITY_KRN.pks'... 112 issues found.
processing file 'QC_UTILITY_MSG.pks'... 51 issues found.
processing file 'QC_UTILITY_ORA_04068.pks'... 4 issues found.
processing file 'QC_UTILITY_STAT.pks'... 47 issues found.
47 issues found.
0 ERROR CodeChecker - java.lang.NullPointerException
java.lang.RuntimeException: java.lang.NullPointerException
at com.trivadis.tvdcc.printer.XMLIssuePrinterStrategy.endResource(XMLIssuePrinterStrategy.java:468)
at com.trivadis.tvdcc.printer.CompositePrinterStrategy.endResource(CompositePrinterStrategy.java:46)
at com.trivadis.tvdcc.process.ProcessResourceTask.stopGracefully(ProcessResourceTask.java:86)
at com.trivadis.tvdcc.process.SQLPLUSReader.processSerialResource(SQLPLUSReader.java:283)
at com.trivadis.tvdcc.CodeChecker.doCodeCheck(CodeChecker.java:574)
at com.trivadis.tvdcc.CodeChecker.mainFunction(CodeChecker.java:605)
at com.trivadis.tvdcc.CodeChecker.main(CodeChecker.java:625)
Caused by: java.lang.NullPointerException
at com.trivadis.tvdcc.printer.XMLIssuePrinterStrategy.endResource(XMLIssuePrinterStrategy.java:275)
... 6 more

Note: it's another issue than the performance problem so I've created a separate question.

Topic Tags
2 Answers
1
Topic starter

Indeed, I cannot reproduce the problem since the slowness issue is solved. I ran successfully several tenths of scans without any crash. This is reassuring.

Thanks

0

This is related to the other issue. The NPE occurs after reaching the timeout. Something goes wrong during cancelling of the task. That's strange, but nonetheless the root cause is somewhere else. It will not happen if you increase the timeout.