IBM Support

Running an ANT script to create a BIRT report results in "NullPointerException" error

Troubleshooting


Problem

Attempts to run an ANT script in order to generate a BIRT report using IBM Rational Software Architect results in the error "NullPointerException".

Symptom

To recreate the problem scenario:

  1. Follow the instructions in the Using Ant scripts to generate UML model reports section in the InfoCenter
  2. Locate the reportDesignFile line in the code of the ANT script and remove the file:/ string in front of the path to the .rptdesign file
  3. Save the changes and run the ANT script

Result: The error message:

Failure of Background Ant Build: [path to build.xml] org.eclipse.swt.SWTException: Failed to execute runnable (com.ibm.ccl.erf.core.exception.PublishRuntimeException)

image

The .log output is as follows:

!ENTRY org.eclipse.ui 4 0 2012-01-17 11:28:15.439

!MESSAGE Unhandled event loop exception

!STACK 0

org.eclipse.swt.SWTException: Failed to execute runnable (com.ibm.ccl.erf.core.exception.PublishRuntimeException)

at org.eclipse.swt.SWT.error(Unknown Source)

at org.eclipse.swt.SWT.error(Unknown Source)

at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Unknown Source)

at org.eclipse.swt.widgets.Display.runAsyncMessages(Unknown Source)

at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)

at org.eclipse.ui.internal.Workbench.runEventLoop(Unknown Source)

at org.eclipse.ui.internal.Workbench.runUI(Unknown Source)

at org.eclipse.ui.internal.Workbench.access$4(Unknown Source)

at org.eclipse.ui.internal.Workbench$5.run(Unknown Source)

at org.eclipse.core.databinding.observable.Realm.runWithDefault(Unknown Source)

at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Unknown Source)

at org.eclipse.ui.PlatformUI.createAndRunWorkbench(Unknown Source)

at org.eclipse.ui.internal.ide.application.IDEApplication.start(Unknown Source)

at org.eclipse.equinox.internal.app.EclipseAppHandle.run(Unknown Source)

at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(Unknown Source)

at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(Unknown Source)

at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source)

at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at org.eclipse.equinox.launcher.Main.invokeFramework(Unknown Source)

at org.eclipse.equinox.launcher.Main.basicRun(Unknown Source)

at org.eclipse.equinox.launcher.Main.run(Unknown Source)

at org.eclipse.equinox.launcher.Main.main(Unknown Source)

Caused by: com.ibm.ccl.erf.core.exception.PublishRuntimeException

at com.ibm.ccl.erf.rsa.report.ic.ant.CLUMLBirtReportPublish$1.run(Unknown Source)

at org.eclipse.swt.widgets.RunnableLock.run(Unknown Source)

... 24 more

Caused by: java.lang.NullPointerException

at com.ibm.ccl.erf.rsa.report.ic.ant.CLUMLBirtReportPublish.runReport(Unknown Source)

... 26 more

Cause

Rational Software Architect is not able to find the report file without the preceding file:/ string in front of the path to the .rptdesign file. As a result, a NullPointerException is thrown.

Resolving The Problem

Follow these steps in order to successfully generate the BIRT report with the ANT script:

  1. Open the build.xml file and locate the reportDesignFile line in the code

  2. Add the string file:/ string in front of the path to the .rptdesign file

  3. Save the changes and execute the ANT script
[{"Product":{"code":"SS4JE2","label":"Rational Software Architect Standard Edition"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Ant","Platform":[{"code":"PF033","label":"Windows"}],"Version":"7.5.5.2","Edition":"","Line of Business":{"code":"LOB36","label":"IBM Automation"}},{"Product":{"code":"SS4JCV","label":"Rational Software Architect for WebSphere Software"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Ant","Platform":[{"code":"PF033","label":"Windows"}],"Version":"7.5.5.2","Edition":"","Line of Business":{"code":"LOB15","label":"Integration"}}]

Document Information

More support for:
Rational Software Architect Standard Edition

Software version:
7.5.5.2

Operating system(s):
Windows

Document number:
467523

Modified date:
29 September 2018

UID

swg21585436