Project

General

Profile

Defect #848

.jasper report fails when fired for the first time in webclient!

Added by Harjo Kompagnie about 9 years ago. Updated almost 9 years ago.

Status:
Resolved
Priority:
Urgent
Assignee:
-
Start date:
04/17/2015
Due date:
% Done:

0%

Estimated time:
Browser (if web client):

Description

Hi, we have an issue, when a .jasper report is fired the first time in webclient!
We use the Basic version 4.0.2 (we also tried other packages like ChartNScript etc.. but there is no difference.) with Servoy 7.4.3

I have included a zip file, with all the plugins files, included a font extension jar and two jars (spring-beans-2.5.5.jar and spring-core-2.5.5.jar)
These 3 extra files are also added to the jnlp file, because we need to show these fonts also in smart-client in the viewer.

I also added two reports: customersReport_SQL.jasper and customersReport_SQL.jrxml and a sample-solution: jasper_issue.servoy (with sample data)
To reproduce do as follows:

  • important, start or restart Servoy developer (fresh start)
  • import the sample-solution with sample data (data is just two records)
  • place the two reports in a folder, and set your report folder accordingly via the servoy-admin page
  • the sample solution just fires one call: plugins.jasperPluginRMI.runReport('user_data', 'customersReport_SQL.jasper', null, plugins.jasperPluginRMI.OUTPUT_FORMAT.VIEW,null);
    in our case we have the database: user_data, make sure you have the same, or adjust it.
  • Now fire the a webclient first!
  • hit the button: run Report.

the report does not appear, and the following error will appear:

java.lang.ExceptionInInitializerError
at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:121)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:88)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:103)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:61)
at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:153)
at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:55)
at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:446)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:849)
at com.servoy.plugins.jasperreports.JasperReportRunner.getJasperPrint(JasperReportRunner.java:470)
at com.servoy.plugins.jasperreports.JasperReportsServer.getJasperPrint(JasperReportsServer.java:293)
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 com.servoy.j2db.util.AbstractRemoteInvocationHandler.invokeMethod(AbstractRemoteInvocationHandler.java:77)
at com.servoy.j2db.util.ThreadingRemoteInvocationHandler$1.run(ThreadingRemoteInvocationHandler.java:79)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [net.sf.jasperreports.engine.fonts.SimpleFontFamily] for bean with name 'fontBean127789685334036218' defined in URL [jar:file:/D:/Servoy/Servoy74/developer/../application_server/plugins/servoy_jasperreports/CorbelExt.jar!/fonts/fonts1277896853338.xml]; nested exception is java.lang.ClassNotFoundException: net.sf.jasperreports.engine.fonts.SimpleFontFamily
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1138)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:524)
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1174)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:222)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:202)
at net.sf.jasperreports.extensions.SpringExtensionsRegistry.findExtensionBeanNames(SpringExtensionsRegistry.java:100)
at net.sf.jasperreports.extensions.SpringExtensionsRegistry.getExtensionBeanNames(SpringExtensionsRegistry.java:91)
at net.sf.jasperreports.extensions.SpringExtensionsRegistry.getExtensions(SpringExtensionsRegistry.java:67)
at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.getExtensions(DefaultExtensionsRegistry.java:110)
at net.sf.jasperreports.engine.util.JRStyledTextParser.<clinit>(JRStyledTextParser.java:83)
... 19 more
Caused by: java.lang.ClassNotFoundException: net.sf.jasperreports.engine.fonts.SimpleFontFamily
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:242)
at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:383)
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1135)
... 28 more

  • when this happens, every report will fail, also the smart-client.
  • Restart your Servoy Developer.
  • First fire a smart-client!
  • Hit the run Report button now the report works.
  • From this point, now also a webclient works!
    We also could reproduce this in a real server situation. After a server restart, we MUST start a report in smart-client first, before webclient is starting to work.

we came accross, that if you use the .jrxml report, the above issue does not happen! You can start it the .jrxml file fine the first time in webclient!
(important: please be aware to restart Servoy Developer after every test!)

I hope this can be looked at (and fixed) on a short term.


Files

plugins.zip (15.4 MB) plugins.zip Harjo Kompagnie, 04/17/2015 09:13 AM

History

#1

Updated by Gabi Boros almost 9 years ago

  • Status changed from New to Resolved

Also available in: Atom PDF