org.compiere.report.ReportStarter can't find SwingJRViewerProvider / ZkJRViewerProvider

270 views
Skip to first unread message

Daniel Tamm

unread,
Mar 26, 2013, 11:02:51 AM3/26/13
to idem...@googlegroups.com
Just downloaded the latest code and I got a wierd problem when trying to view documents defined in JasperReports.

I figured that the plugin-structure has changed a bit with plugins defined in OSGI-INF and all looks fine as far as I can see.

What happens is that the JRViewerProvider can't be found which results in a NPE

15:50:27.965===========> ProcessUtil.startJavaProcess: org.compiere.report.ReportStarter [13]
java.lang.NullPointerException
at org.compiere.report.ReportStarter.startProcess0(ReportStarter.java:675)
at org.compiere.report.ReportStarter.startProcess(ReportStarter.java:343)
at org.adempiere.util.ProcessUtil.startJavaProcess(ProcessUtil.java:170)
at org.adempiere.util.ProcessUtil.startJavaProcess(ProcessUtil.java:139)
at org.adempiere.util.ProcessUtil.startJavaProcess(ProcessUtil.java:128)
at org.compiere.process.ServerProcessCtl.startProcess(ServerProcessCtl.java:399)
at org.compiere.process.ServerProcessCtl.run(ServerProcessCtl.java:265)
at org.compiere.process.ServerProcessCtl.process(ServerProcessCtl.java:92)
at org.compiere.print.ServerReportCtl.runJasperProcess(ServerReportCtl.java:106)
at org.compiere.print.ReportCtl.startDocumentPrint(ReportCtl.java:316)
at org.compiere.print.ReportCtl.startDocumentPrint(ReportCtl.java:283)
at org.compiere.print.ReportCtl.start(ReportCtl.java:126)
at org.compiere.print.ReportCtl.start(ReportCtl.java:98)
at org.compiere.apps.AbstractProcessCtl.run(AbstractProcessCtl.java:279)

I've checked that the plugins are included in the run configuration, I've recompiled and compared configuration for ZK and Swing. I can't see what's wrong.

The service lookup that fails is this piece in ReportStarter:

                   JRViewerProvider viewerLauncher = Service.locator().locate(JRViewerProvider.class).getService();
                   viewerLauncher.openViewer(jasperPrint, pi.getTitle()+" - " + reportPath);

viewerLauncher gets a null value.

I tried also running a report in ZK (server) and it resulted in OutOfMemoryError...

I'm not running Garden World so some custom settings might disturb but I can't think of what it would be.

Best regards
/Daniel Tamm






Carlos Antonio Ruiz Gomez

unread,
Mar 26, 2013, 11:49:01 AM3/26/13
to idem...@googlegroups.com
Hi Daniel, precisely researched that a few hours ago, answered here:
http://jira.idempiere.com/browse/IDEMPIERE-28?focusedCommentId=13063&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13063

You must start the following bundle via OSGi console:
org.adempiere.report.jasper.swing_1.0.0.qualifier

Making the bundle start automatically get rid of the error - but I think those must be lazy starters - don't know how to make lazy work.

Regards,

Carlos Ruiz

Daniel Tamm

unread,
Mar 26, 2013, 2:25:10 PM3/26/13
to idem...@googlegroups.com
Thanks for a quick response! What a co-incidence that you researched it just before :-)

I changed the run configuration in eclipse to Default auto-start = true and it worked right away.



/Daniel
--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 


-- 

--
Notima AB
Lärjungevägen 6
SE-136 69 Vendelsö
Tel: +46 8 776 31 30 Fax: +46 8 712 95 73
Email: in...@notima.se - Web: http://www.notima.se/
--

Daniel Tamm

unread,
Mar 26, 2013, 2:28:46 PM3/26/13
to idem...@googlegroups.com
Adding

<booleanAttribute key="default_auto_start" value="true"/>

to swingclient.product.launch in org.adempiere.ui.swing-feature would avoid people from running into the problem when running the swing client :-)


/Daniel

Carlos Antonio Ruiz Gomez skrev 2013-03-26 16:49:
--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Anozi Mada

unread,
Mar 26, 2013, 10:23:45 PM3/26/13
to idem...@googlegroups.com

Hi Carlos, thanks for answering there.
Lazy start bundle can be configured in manifest.mf. I have tested it and it works now.

Regards,
Anozi Mada

Anozi Mada

unread,
Mar 26, 2013, 10:31:09 PM3/26/13
to idem...@googlegroups.com
Hi Daniel,

I also got OutOfMemoryError in ZK before. You can try to increase the heap size via VM arguments. I don't really know how to tweak it properly, but I added "-Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m" and it works for me.

Regards,
Anozi Mada

Carlos Antonio Ruiz Gomez

unread,
Mar 26, 2013, 10:52:23 PM3/26/13
to idem...@googlegroups.com
Nice tip Anozi, thanks.

Committed here
https://bitbucket.org/idempiere/idempiere/commits/50217fc



On 26/03/13 21:23, Anozi Mada wrote:

Hi Carlos, thanks for answering there.
Lazy start bundle can be configured in manifest.mf. I have tested it and it works now.


Reply all
Reply to author
Forward
0 new messages