Jump to content
We've recently updated our Privacy Statement, available here ×

Null Pointer Exception in Jaspersoft Studio/JasperReports Server 5.6 when Publishing


richbl

Recommended Posts

Hello All,

 

I have run into a repeatable NPE (null pointer exception) when attempting to publish a report with no datasource under JasperReports Server 5.6.

 

To repro:

 

  1. From Jaspersoft Studio 5.6, create a simple report. Assign no datasource to that report.
  2. Save the report, and note the prompt to publish. Choose Yes (alternately, you can choose the Publish Report button in the main report window).
  3. In the "Report Publishing Wizard", identify the appropriate repository (JRS 5.6) and folder location (e.g., /Public/Reports).
  4. When prompted for datasource, select the "Don't use any Data Source" radio button.
  5. Choose Finish to publish.
  6. Note the Success! messagebox.

Without making any changes to the report, follow the steps above (2 - 5). The action now forces an exception messagebox. Details of that exception are as follows:

java.lang.NullPointerException

at com.jaspersoft.studio.server.model.datasource.filter.DatasourcesAllFilter.isDatasource(DatasourcesAllFilter.java:54)

at com.jaspersoft.studio.server.wizard.resource.page.selector.SelectorDatasource.isDatasource(SelectorDatasource.java:114)

at com.jaspersoft.studio.server.publish.Publish.publishResources(Publish.java:118)

at com.jaspersoft.studio.server.publish.Publish.publish(Publish.java:47)

at com.jaspersoft.studio.server.publish.wizard.Publish2ServerWizard$3.run(Publish2ServerWizard.java:277)

at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)


There are two temporary work-arounds:

 

  • For each publish activity, first delete the published report at the JRS and re-publish.

OR


  • In the "Report Publishing Wizard", when prompted for datasource, instead of selecting the "Don't use any Data Source" radio button, select either of the remaining options and associate any datasource to the report.

This has been repro'd under the following configurations (I suspect platforms are not a factor):

 

  • JasperReports Studio 5.6 running Windows 8.1 / JRS 5.6 running Windows 8.1
  • JasperReports Studio 5.6 running Windows 8.1 / JRS 5.6 running Ubuntu 14.04
  • JasperReports Studio 5.6 running Ubuntu 14.04 / JRS 5.6 running Ubuntu 14.04


It's currently unclear if this NPE can be regressed to prior releases of either Jaspersoft product.

 

It seems to me that the logic to process a report for publishing with no datasource when a pre-existing report exists on the JRS is suspect. 

 

If there's more that I can do to help debug this issue, please let me know.

 

Link to comment
Share on other sites

  • 1 month later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

I have been experiencing similar problem but the other way round.  upload with a datasource then amend the report in studio, go back to republish it and null point error.  However republish without the datasource works ok.

Now we just go on the reports properties and overwrite from workspace its easier than trying to work out what's going on - and no one from Jaspersoft ever replies to the problems listed in this site anyway. 

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...