gengon555 Posted December 27, 2019 Share Posted December 27, 2019 Hi!I have ReportBook which consists of two same reports with different input data. That is: <part uuid="f771936d-e47f-4ecb-abb9-b205bff40816"> <p:subreportPart xmlns:p="http://jasperreports.sourceforge.net/jasperreports/parts" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/parts http://jasperreports.sourceforge.net/xsd/parts.xsd"> <subreportParameter name="REPORT_CONNECTION"> <subreportParameterExpression><![CDATA[$P{REPORT_CONNECTION}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="OPER_GROUP"> <subreportParameterExpression><![CDATA[1]]></subreportParameterExpression> </subreportParameter> <subreportExpression><![CDATA["test1.jasper"]]></subreportExpression> </p:subreportPart> </part> <part uuid="af7aceb6-10ce-4732-a263-411a37c124ac"> <p:subreportPart xmlns:p="http://jasperreports.sourceforge.net/jasperreports/parts" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/parts http://jasperreports.sourceforge.net/xsd/parts.xsd"> <subreportParameter name="REPORT_CONNECTION"> <subreportParameterExpression><![CDATA[$P{REPORT_CONNECTION}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="OPER_GROUP"> <subreportParameterExpression><![CDATA[2]]></subreportParameterExpression> </subreportParameter> <subreportExpression><![CDATA["test1.jasper"]]></subreportExpression> </p:subreportPart> </part> </groupHeader>When I try to publish it to server, Studio throws exception:java.lang.NullPointerException at com.jaspersoft.studio.server.publish.JrxmlPublishContributor.publishParts(JrxmlPublishContributor.java:140) at com.jaspersoft.studio.server.publish.JrxmlPublishContributor.publishJrxml(JrxmlPublishContributor.java:125) at com.jaspersoft.studio.server.publish.JrxmlPublishContributor.publishJrxml(JrxmlPublishContributor.java:81) at com.jaspersoft.studio.server.publish.FindResources.findResources(FindResources.java:99) at com.jaspersoft.studio.server.publish.FindResources.find(FindResources.java:41) at com.jaspersoft.studio.server.publish.wizard.Publish2ServerWizard$2.run(Publish2ServerWizard.java:259) at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:438) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:354) at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:1035) at com.jaspersoft.studio.server.publish.wizard.Publish2ServerWizard.doFindDependentResources(Publish2ServerWizard.java:255) at com.jaspersoft.studio.server.publish.wizard.Publish2ServerWizard$1$1.run(Publish2ServerWizard.java:205) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3919) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3550) at org.eclipse.jface.window.Window.runEventLoop(Window.java:823) at org.eclipse.jface.window.Window.open(Window.java:799) at com.jaspersoft.studio.server.publish.action.JrxmlPublishAction.publishReportUnit(JrxmlPublishAction.java:132) at com.jaspersoft.studio.server.publish.action.JrxmlPublishAction$2.run(JrxmlPublishAction.java:94) at org.eclipse.ui.internal.PendingSyncExec.run(PendingSyncExec.java:68) at org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:171) at org.eclipse.ui.internal.UISynchronizer.lambda$0(UISynchronizer.java:152) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3919) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3550) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1173) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1062) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155) at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:635) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:559) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150) at com.jaspersoft.studio.rcp.intro.Application.start(Application.java:91) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:660) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597) at org.eclipse.equinox.launcher.Main.run(Main.java:1468)Should I clone the report to test2.jasper and change the name of the second report in the reportbook (test1.jasper -> test2.jasper), no error occurs. Link to comment Share on other sites More sharing options...
gengon555 Posted December 27, 2019 Author Share Posted December 27, 2019 The workaround by cloning reports is not solution, because in other cases I need to add the same report with different params in one reportbook many times. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now