Jump to content

Null pointer issue with jasperserver 9


Recommended Posts

We have an issue with a dashboard, that it fails with a null pointer, once and once only - see attached

This seems to be a timing issue of some kind, or caching.  How to fix it ?

Caused by: java.lang.NullPointerException
	at java.base/java.util.Objects.requireNonNull(Objects.java:222)
	at java.base/java.util.Optional.<init>(Optional.java:107)
	at java.base/java.util.Optional.of(Optional.java:120)
	at java.base/java.util.stream.FindOps$FindSink$OfRef.get(FindOps.java:194)
	at java.base/java.util.stream.FindOps$FindSink$OfRef.get(FindOps.java:191)
	at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:543)
	at com.jaspersoft.ji.adhoc.metadata.AdhocMetadataFactory.getTopicMetadata(AdhocMetadataFactory.java:374)
	at com.jaspersoft.ji.adhoc.strategy.StrategyAwareDomainQueryExecuter.createDatasource(StrategyAwareDomainQueryExecuter.java:161)

 

 

jasperserver-blue.log PMSX_Dashboard.xml

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Hi David,

The NullPointerException error message is quite generic, and unfortunately, it doesn't provide specific details about the root cause. Here are some steps you might consider to help troubleshoot this issue:

 

  1. Verify Platform Compatibility: Ensure that all prerequisites (such as your database and application server) align with the platform support guide for version 9.0.0 of Jaspersoft Reporting Server (JRS). Pay close attention to database compatibility.

  2. Check Adhoc View or Report Dashlet: Confirm that the Adhoc view or report dashlet you added in your database works individually without query issues. Running it on its own might reveal any specific data-related problems.

  3. Enable Debug Logging: Changing certain loggers from “ERROR” to “DEBUG” mode can help produce a more detailed error log. This may provide more insight than the generic NullPointerException.

    To do this:

    • Go to Manage > Server Settings > Log Settings.
    • Change the mode to DEBUG for the following loggers:
      • com.jaspersoft.commons.semantic.dsimpl.JdbcBaseDataSet
      • net.sf.jasperreports.engine.query.JRJdbcQueryExecuter
      • com.jaspersoft.commons.datarator.WorkingDataSet
      • com.jaspersoft.commons.util.JSControlledJdbcQueryExecuter
  4. Clear Cache and Restart: Try clearing the temp/work folder in your Tomcat server and then restart the server. Caching issues can sometimes be the cause of such problems.

Once you've made these adjustments, run the dashboard again and review the logs for more detailed information.

 

Thanks

Link to comment
Share on other sites

The second time we run this is works, so it seems 1 & 2 are OK

We'll try #3

This is the error received by visualize.js:

GET https://<server URL>/jasperserver-pro/rest_v2/reports/AMS/Ad_Hoc_Views/PMSX/Overall_Current_Network_Performance_for_Dashlet/inputControls/network_type_name_1;wc_name1_1;jurisdiction_name1_1

{code:json}
{
    "message": "There was an error on the server. Try again or contact site administrators. (Error UID: d2d60a85-ccc6-4b54-9298-fae738aa9f34)",
    "errorCode": "generic.error.message",
    "errorUid": "d2d60a85-ccc6-4b54-9298-fae738aa9f34"
}

Link to comment
Share on other sites

Logs with debug attached.

Also image of network tab for the page - note the failure in the first run one, and that it succeeds in the second one.

The query at line 996 in the log does not appear earlier in the log file - should be about line 89 - and this is part of the missing data - so it seems the caching of this occurs asynchronously - hence it works on the second run

second run network log.png

first run network log.png

jasperserver-blue.log

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...