Hello, I’m an user of jasper plugin and ireport to desing and make my reports, and the point is, if we install a new version of jasperReport and compile the report, this don’t run in the application of servoy, appears an error just when the report is launched with runReport function:
I have created reports in iReport version 4.0.0 without any problems with the jasperreports plugin vers. 3.3.0_b1. For this iReport version you have nothing to change in the servoy_jasperreports folder.
For me iReport 4.5.1 and jasperreports plugin vers. 3.3.0_b1 is also working, but you have to replace the jar files
commons-beanutils
commons-digester
jasperreports
poi
and to edit the servoy_jasperreports.jar.jnlp file.
I believe the file extension you are specifying ‘.jrxml’ is incorrect for the method plugins.jasperPluginRMI.runReport() as the method is expecting a compiled report file ‘.jasper’. You either have to provide the pre-compiled file or use the ‘compileReport()’ method to generate the requiste ‘.jasper’ file.
When you design & compile your report with a more recent version of iReport and JasperReports (eg. 4.5.1) then make sure you delete any compiled reports (.jasper) before starting your Servoy application.
(or copy the .jrxml files to a separate folder for the Servoy jaspersoft plugin).
The .jasper file is not required, as the jaspersoft plugin will compile the report on-the-fly.
I have created reports in iReport version 4.0.0 without any problems with the jasperreports plugin vers. 3.3.0_b1. For this iReport version you have nothing to change in the servoy_jasperreports folder.
For me iReport 4.5.1 and jasperreports plugin vers. 3.3.0_b1 is also working, but you have to replace the jar files
commons-beanutils
commons-digester
jasperreports
poi
and to edit the servoy_jasperreports.jar.jnlp file.
But we not edited “servoy_jasperreports.jar.jnlp” because we don’t know what edit in that file, you can help us a bit more?
Thanks for all!
kwpsd:
I believe the file extension you are specifying ‘.jrxml’ is incorrect for the method plugins.jasperPluginRMI.runReport() as the method is expecting a compiled report file ‘.jasper’. You either have to provide the pre-compiled file or use the ‘compileReport()’ method to generate the requiste ‘.jasper’ file.
I hope this helps!
Hi!
We verified this and works correctly “.jrxml” but thanks for your time!
pentamsi:
But we not edited “servoy_jasperreports.jar.jnlp” because we don’t know what edit in that file, you can help us a bit more?
You have to edit the servoy_jasperreport.jar.jnlp entries if you replaced the original jars by the files of iReport 4.5.1 to get it working! This are my edited entries in the servoy_jasperreports.jar.jnlp:
The differences to the original are the new jar file names. I think the best way to edit the file is to do it in the Terminal by “sudo nano servoy_jasperreports.jar.jnlp”. BTW you can also use vi as editor or any other (I prefer nano).
But if we replace all the entire folders and files? and not only the one who changed? is necesary to edit anyone? i mean if we copy al new files of the new plugin. And if we put the new files the reports don’t run.
in the /Applications/Servoy/application_server/plugins/servoy_jasperreports folder. You will find/get the matching jar files at /Applications/iReport>Contents/Resources/ireport/ireport/modules/ext.
To get it work with the new jar files you have to rename the also matching entries in the servoy_jasperreports.jar.jnlp file.
Hans Nieuwenhuis:
This will cause no certificate/signing issues ??
Hello Hans,
perhaps this could cause signing issues! But I’m using the signtester tool for my production solutions and for that it doesn’ t matter and is more comfortable for the customers, loading their solution.
tgs:
perhaps this could cause signing issues! But I’m using the signtester tool for my production solutions and for that it doesn’ t matter and is more comfortable for the customers, loading their solution.
Hello Thomas,
Thanks for the signtester tool info. This solved my certificate signing issue.
I’ve solved more problem by following this post.
All works fine except for the application server.
If I try to use a jasper report from the developer all works fine.
I’m using: servoy 5.2.13 java 1.6.31 windows 7
And the “ChartNScript_Servoy_JasperReports_Plugin_v.3.3.0_b1.zip” version of the plugin (I’ve replaced the jasper engine with the new one version 4.5.1 by following this topic)
But when I try to use the smart client I obtain this error into the console:
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: Could not initialize class net.sf.jasperreports.extensions.ExtensionsEnvironment
at net.sf.jasperreports.repo.RepositoryUtil.getRepositoryServices(RepositoryUtil.java:63)
at net.sf.jasperreports.repo.RepositoryUtil.revertRepositoryContext(RepositoryUtil.java:109)
at net.sf.jasperreports.engine.JRAbstractExporter.resetExportContext(JRAbstractExporter.java:797)
at net.sf.jasperreports.engine.export.JRGraphics2DExporter.exportReport(JRGraphics2DExporter.java:175)
at net.sf.jasperreports.view.JRViewer.paintPage(JRViewer.java:2029)
at net.sf.jasperreports.view.JRViewer$PageRenderer.paintComponent(JRViewer.java:2179)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JViewport.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JLayeredPane.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paintToOffscreen(Unknown Source)
at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)
at javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
at javax.swing.RepaintManager.paint(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at java.awt.GraphicsCallback$PaintCallback.run(Unknown Source)
at sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source)
at sun.awt.SunGraphicsCallback.runComponents(Unknown Source)
at java.awt.Container.paint(Unknown Source)
at java.awt.Window.paint(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.access$700(Unknown Source)
at javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: Could not initialize class net.sf.jasperreports.extensions.ExtensionsEnvironment
at net.sf.jasperreports.repo.RepositoryUtil.getRepositoryServices(RepositoryUtil.java:63)
at net.sf.jasperreports.repo.RepositoryUtil.revertRepositoryContext(RepositoryUtil.java:109)
at net.sf.jasperreports.engine.JRAbstractExporter.resetExportContext(JRAbstractExporter.java:797)
at net.sf.jasperreports.engine.export.JRGraphics2DExporter.exportReport(JRGraphics2DExporter.java:175)
at net.sf.jasperreports.view.JRViewer.paintPage(JRViewer.java:2029)
at net.sf.jasperreports.view.JRViewer$PageRenderer.paintComponent(JRViewer.java:2179)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JViewport.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JLayeredPane.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paintToOffscreen(Unknown Source)
at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)
at javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
at javax.swing.RepaintManager.paint(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at java.awt.GraphicsCallback$PaintCallback.run(Unknown Source)
at sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source)
at sun.awt.SunGraphicsCallback.runComponents(Unknown Source)
at java.awt.Container.paint(Unknown Source)
at java.awt.Window.paint(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.access$700(Unknown Source)
at javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: Could not initialize class net.sf.jasperreports.extensions.ExtensionsEnvironment
at net.sf.jasperreports.repo.RepositoryUtil.getRepositoryServices(RepositoryUtil.java:63)
at net.sf.jasperreports.repo.RepositoryUtil.revertRepositoryContext(RepositoryUtil.java:109)
at net.sf.jasperreports.engine.JRAbstractExporter.resetExportContext(JRAbstractExporter.java:797)
at net.sf.jasperreports.engine.export.JRGraphics2DExporter.exportReport(JRGraphics2DExporter.java:175)
at net.sf.jasperreports.view.JRViewer.paintPage(JRViewer.java:2029)
at net.sf.jasperreports.view.JRViewer$PageRenderer.paintComponent(JRViewer.java:2179)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JViewport.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JLayeredPane.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paintToOffscreen(Unknown Source)
at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)
at javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
at javax.swing.RepaintManager.paint(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at java.awt.GraphicsCallback$PaintCallback.run(Unknown Source)
at sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source)
at sun.awt.SunGraphicsCallback.runComponents(Unknown Source)
at java.awt.Container.paint(Unknown Source)
at java.awt.Window.paint(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.access$700(Unknown Source)
at javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
The result is that the jasper windows is opened but missing the report inside.
Could you please provide some code you are using and that is causing this?
Also, did you have this error using a standard version of the plugin (not updating the jasper engine to version 4.5.1, but using the version supplied with the plugin)? And, when updating the jasper library version, have you also replaced the other mentioned libs and edited the jnlp file of the plugin?
by using the standard version of the plugin I can’t run anything ( I don’t know why). When I’ve replaced the jasper library I’ve also replaced all the jars involved (I’ve taken the list from the jnlp) and I’ve modified the
jnlp. To check if I’ve done all well I’ve launched a client from another machine and all works fine. I’ve solved the problem of using the report from application server.
I’m using this code (nothing of particular I think):
application.updateUI(); //to make sure the Servoy window doesn't grab focus after showing the Jasper Viewer
application.output(plugins.jasperPluginRMI.reportDirectory) //print the folder in wich the plugin will find the report
plugins.jasperPluginRMI.runReport("mydb",'marcoReport.jrxml',null,OUTPUT_FORMAT.VIEW,null);
In fact all works fine if I don’t use a subreport that use another datasource like this:
Into the subreport properties:
as “Connection type”: “Use a connection expression”
as “Connection Expression” : “java.sql.DriverManager.getConnection(“jdbc:postgresql://localhost:5532/mydb”, “DBA”, “”)”
And into the Main Report:
“language” : “java”
In iReport it works fine but it doesn’t into the application server.