Class-Error in Jasper

Bug and problem reporting on Cyclos 4 version

Moderators: hugo, alexandre, rmvanarkel

Post Reply
admin_de2
Posts: 37
Joined: Wed Dec 31, 1969 9:00 pm

Class-Error in Jasper

Post by admin_de2 »

Dear Cyclosians,

i got an error at the module for printing the account history from the account transaction list:

Code: Select all

java.lang.NoClassDefFoundError: Could not initialize class net.sf.jasperreports.engine.util.JRStyledTextParser
at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:104)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:72)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:60)
at net.sf.jasperreports.engine.fill.JRFiller.createBandReportFiller(JRFiller.java:201)
at net.sf.jasperreports.engine.fill.JRFiller.createReportFiller(JRFiller.java:216)
at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:116)
at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:667)
at net.sf.jasperreports.engine.JasperFillManager.fillToFile(JasperFillManager.java:556)
at net.sf.jasperreports.engine.JasperFillManager.fillReportToFile(JasperFillManager.java:916)
at org.cyclos.impl.utils.reports.ReportHandlerImpl.executeReport(ReportHandlerImpl.java:214)
at org.cyclos.impl.utils.reports.ReportHandlerImpl.runReport(ReportHandlerImpl.java:135)
at org.cyclos.impl.banking.AccountServiceImpl.printAccountHistory(AccountServiceImpl.java:1968)
at org.cyclos.security.banking.AccountServiceSecurity.printAccountHistory(AccountServiceSecurity.java:348)
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.cyclos.impl.ServiceInvokerHandlerImpl$ServiceInvocationTransactionCallback.performInvocation(ServiceInvokerHandlerImpl.java:308)
at org.cyclos.impl.InvokerHandlerImpl.runAs(InvokerHandlerImpl.java:109)
at org.cyclos.impl.ServiceInvokerHandlerImpl$ServiceInvocationTransactionCallback.doInTransaction(ServiceInvokerHandlerImpl.java:255)
at org.cyclos.impl.ServiceInvokerHandlerImpl$ServiceInvocationTransactionCallback.doInTransaction(ServiceInvokerHandlerImpl.java:234)
at org.cyclos.impl.utils.transaction.TransactionHandlerImpl.runEnsuringInvocationContext(TransactionHandlerImpl.java:190)
at org.cyclos.impl.utils.transaction.TransactionHandlerImpl.doRun(TransactionHandlerImpl.java:110)
at org.cyclos.impl.utils.transaction.TransactionHandlerImpl.run(TransactionHandlerImpl.java:166)
at org.cyclos.impl.utils.transaction.TransactionHandlerImpl.run(TransactionHandlerImpl.java:80)
at org.cyclos.impl.InvokerHandlerImpl.performInTransaction(InvokerHandlerImpl.java:236)
at org.cyclos.impl.InvokerHandlerImpl.doRunAsInTransaction(InvokerHandlerImpl.java:185)
at org.cyclos.impl.InvokerHandlerImpl.runAsInTransaction(InvokerHandlerImpl.java:165)
at org.cyclos.impl.ServiceInvokerHandlerImpl.doInvoke(ServiceInvokerHandlerImpl.java:661)
at org.cyclos.impl.ServiceInvokerHandlerImpl.invoke(ServiceInvokerHandlerImpl.java:534)
at org.cyclos.impl.access.ServiceFacadeImpl.invoke(ServiceFacadeImpl.java:135)
at org.cyclos.server.spring.root.RequestServiceFactory$ServiceProxyInvocationHandler.invoke(RequestServiceFactory.java:74)
at com.sun.proxy.$Proxy72.printAccountHistory(Unknown Source)
at org.cyclos.server.content.banking.AccountsController.printAccountHistory(AccountsController.java:96)
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.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.cyclos.server.http.CORSFilter.doFilterInternal(CORSFilter.java:65)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.cyclos.server.http.RequestDataFilter.doFilterInternal(RequestDataFilter.java:208)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.cyclos.server.http.RequestContextFilter.doFilterInternal(RequestContextFilter.java:52)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1457)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
Any idea to what this error relates and where i can gather more information about it?
Cyclos 4.8.5 running on CentOS.

Many, many thanks!
Sam
+ ~ + * + ~ + * + ~ + * + ~ + * + ~ + * +
Thomas Sam Wittich
https://www.bueffelsoft.de

alexandre
Posts: 888
Joined: Wed Sep 06, 2006 9:06 am

Re: Class-Error in Jasper

Post by alexandre »

Hi,

It seems to be a environment problem. Can you send more information about your installation, tomcat, java version and from where it was installed ( from package manager or downloaded ).
Also you can send the catalina.out file with the startup server lines.

regards
Alexandre Caurrinhos
Cyclos development team.

canoodle
Posts: 7
Joined: Sun Feb 04, 2018 8:33 pm

Re: Class-Error in Jasper

Post by canoodle »

cyclos java is running inside a docker container example-app which is using https://alpinelinux.org/

cyclos database postgres is running inside a docker container example-db which is using https://alpinelinux.org/

tutorial used to install: https://hub.docker.com/r/cyclos/cyclos/

Code: Select all

pwd
set
BASH=/bin/bash
BASHOPTS=cmdhist:complete_fullquote:extquote:force_fignore:hostcomplete:interactive_comments:progcomp:promptvars:sourcepath
BASH_VERSION='4.3.48(1)-release'
CATALINA_HOME=/usr/local/tomcat
CYCLOS_HOME=/usr/local/cyclos
CYCLOS_LOGDIR=/var/log/cyclos
CYCLOS_VERSION=4.8.5
DB_HOST=XYZ
DB_NAME=XYZ
DB_PASSWORD=XYZ
DB_USER=XYZ
DIRSTACK=()
EUID=0
GPG_KEYS='05AB33110949707C93A279E3D3EFE6B686867BA6 07E48665A34DCAFAE522E5E6266191C37C037D42 47309207D818FFD8DCD3F83F1931D684307A10A5 541FBE7D8F78B25E055DDEE13C370389288584E7 61B832AC2F1C5A90F0F9B00A1C506407564C17A3 713DA88BE50911535FE716F5208B0AB1D63011C7 79F7026C690BAA50B92CD8B66A3AD3F4F22C4FED 9BA44C2621385CB966EBA586F72C284D731FABEE A27677289986DB50844682F8ACB77FC2E86E29AC A9C5DF4D22E99998D9875A5110C01C5A2F6059E7 DCFD35E0BF8CA7344752DE8B6FB21E8933C60243 F3A04C595DB5B6A5F1ECA43E3B7BBB100D811BBE F7DA48BB64BCB84ECBA7EE6935CD23C10D498E23'
GROUPS=()
HOME=/root
HOSTNAME=6cc69af71770
HOSTTYPE=x86_64
IFS=$' \t\n'
JAVA_ALPINE_VERSION=8.131.11-r2
JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk/jre
JAVA_VERSION=8u131
LANG=C.UTF-8
LD_LIBRARY_PATH=/usr/local/tomcat/native-jni-lib
MACHTYPE=x86_64-alpine-linux-musl
OPTERR=1
OPTIND=1
OSTYPE=linux-musl
PATH=/usr/local/tomcat/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/jvm/java-1.8-openjdk/jre/bin:/usr/lib/jvm/java-1.8-openjdk/bin
PIPESTATUS=([0]="0")
PPID=0
PS4='+ '
PWD=/usr/local/cyclos
SHELL=/bin/ash
SHELLOPTS=braceexpand:hashall:interactive-comments
SHLVL=1
TERM=dumb
TOMCAT_ASC_FALLBACK_URL=https://archive.apache.org/dist/tomcat/tomcat-8/v8.5.20/bin/apache-tomcat-8.5.20.tar.gz.asc
TOMCAT_ASC_URL=https://www.apache.org/dist/tomcat/tomcat-8/v8.5.20/bin/apache-tomcat-8.5.20.tar.gz.asc
TOMCAT_MAJOR=8
TOMCAT_NATIVE_LIBDIR=/usr/local/tomcat/native-jni-lib
TOMCAT_TGZ_FALLBACK_URL=https://archive.apache.org/dist/tomcat/tomcat-8/v8.5.20/bin/apache-tomcat-8.5.20.tar.gz
TOMCAT_TGZ_URL='https://www.apache.org/dyn/closer.cgi?action=download&filename=tomcat/tomcat-8/v8.5.20/bin/apache-tomcat-8.5.20.tar.gz'
TOMCAT_VERSION=8.5.20
check screenshots.

hope this helps.
Attachments
Screenshot2.png
Screenshot2.png (211.97 KiB) Viewed 1956 times
Screenshot1.png
Screenshot1.png (107.95 KiB) Viewed 1956 times

canoodle
Posts: 7
Joined: Sun Feb 04, 2018 8:33 pm

Re: Class-Error in Jasper

Post by canoodle »

search: https://www.google.de/search?q="Could+n ... extParser"

possible hits: https://community.jaspersoft.com/wiki/e ... lize-class

"This error is normally associated with a JVM not being started on a Linux machine in AWT headless mode. JasperReports Server doesn’t provide a virtual X frame buffer on Linux. To prevent Java from trying to connect to an X-Server for image processing in JRS, please modify your application server's startup script to include the following JAVA_OPTS

-Djava.awt.headless=true

make sure to restart the server after this modification before testing the report again.

The other possible causes of this error are:

- one or more jar files are missing from Jasperreports Server installation for some reason
- one or more default system fonts are not accessible in this environment

I'd start by checking if all jars are present in the <js-webapp>/WEB-INF/libs folder by comparing the contents of it with the same folder in a working environment.

If that doesn't help, here is a stackoverflow.com thread where people were having the same error and provide a couple of solutions that worked: https://stackoverflow.com/questions/499 ... textparser"

canoodle
Posts: 7
Joined: Sun Feb 04, 2018 8:33 pm

Re: Class-Error in Jasper

Post by canoodle »

Caused by: java.io.IOException: Problem reading font data.
at java.awt.Font.createFont0(Font.java:1000)
at java.awt.Font.createFont(Font.java:877)
at net.sf.jasperreports.engine.fonts.SimpleFontFace.setTtf(SimpleFontFace.java:173)

detailed error message from logs:

Code: Select all

==> /var/log/cyclos/sandbox-services.0.log <==
2018-02-05T23:00:31.488Z	main	37.157.40.83	UserName	LoginService	login	NULL	1s
2018-02-05T23:00:39.474Z	main	37.157.40.83	UserName	NetworkService	resolveNetworkUrl	2	78ms

==> /var/log/cyclos/-services.0.log <==
2018-02-05T23:01:02.339Z	main	37.157.40.83	UserName	AccountService	getAccountHistoryData	16,PARAM_NO_UNLIMITED	620ms
2018-02-05T23:01:03.785Z	main	37.157.40.83	UserName	AccountService	getAccountHistoryStatus	{accessClients=NULL,account=16,amount=NULL,broker=NULL,by=NULL,channels=NULL,chargedBack=NULL,currentPage=0,customValues=NULL,description=NULL,direction=NULL,excludedIds=NULL,fromCurrentAccessClient=false,fromNature=NULL,groups=[9,8,6],includeGeneratedByAccessClient=false,natures=NULL,orderBy=DATE_DESC,pageSize=40,period={begin={date=6,hours=0,milliseconds=0,minutes=0,month=1,seconds=0,timeZone=+01:00,year=2017},end={date=6,hours=23,milliseconds=999,minutes=59,month=1,seconds=59,timeZone=+01:00,year=2018}},preselectedPeriod={defaultOption=true,name=Last 12 months,period=OBJECT,type=PRESELECTED},statuses=[],toNature=NULL,transactionNumber=NULL,transferFilters=NULL,user=NULL,usersWithImage=false}	393ms
2018-02-05T23:01:03.996Z	main	37.157.40.83	UserName	AccountService	searchAccountHistory	{accessClients=NULL,account=16,amount=NULL,broker=NULL,by=NULL,channels=NULL,chargedBack=NULL,currentPage=0,customValues=NULL,description=NULL,direction=NULL,excludedIds=NULL,fromCurrentAccessClient=false,fromNature=NULL,groups=[9,8,6],includeGeneratedByAccessClient=false,natures=NULL,orderBy=DATE_DESC,pageSize=40,period={begin={date=6,hours=0,milliseconds=0,minutes=0,month=1,seconds=0,timeZone=+01:00,year=2017},end={date=6,hours=23,milliseconds=999,minutes=59,month=1,seconds=59,timeZone=+01:00,year=2018}},preselectedPeriod={defaultOption=true,name=Last 12 months,period=OBJECT,type=PRESELECTED},statuses=[],toNature=NULL,transactionNumber=NULL,transferFilters=NULL,user=NULL,usersWithImage=false}	1s
2018-02-05T23:01:08.693Z	main	37.157.40.83	UserName	AccountService	exportAccountHistoryToCSV	{accessClients=NULL,account=16,amount=NULL,broker=NULL,by=NULL,channels=NULL,chargedBack=NULL,currentPage=0,customValues=NULL,description=NULL,direction=NULL,excludedIds=NULL,fromCurrentAccessClient=false,fromNature=NULL,groups=[9,8,6],includeGeneratedByAccessClient=false,natures=NULL,orderBy=DATE_DESC,pageSize=40,period={begin={date=6,hours=0,milliseconds=0,minutes=0,month=1,seconds=0,timeZone=+01:00,year=2017},end={date=6,hours=23,milliseconds=999,minutes=59,month=1,seconds=59,timeZone=+01:00,year=2018}},preselectedPeriod={defaultOption=true,name=Last 12 months,period=OBJECT,type=PRESELECTED},statuses=[],toNature=NULL,transactionNumber=NULL,transferFilters=NULL,user=NULL,usersWithImage=false}	845ms
2018-02-05T23:01:17.299Z	main	37.157.40.83	UserName	AccountService	printAccountHistory	{accessClients=NULL,account=16,amount=NULL,broker=NULL,by=NULL,channels=NULL,chargedBack=NULL,currentPage=0,customValues=NULL,description=NULL,direction=NULL,excludedIds=NULL,fromCurrentAccessClient=false,fromNature=NULL,groups=[9,8,6],includeGeneratedByAccessClient=false,natures=NULL,orderBy=DATE_DESC,pageSize=40,period={begin={date=6,hours=0,milliseconds=0,minutes=0,month=1,seconds=0,timeZone=+01:00,year=2017},end={date=6,hours=23,milliseconds=999,minutes=59,month=1,seconds=59,timeZone=+01:00,year=2018}},preselectedPeriod={defaultOption=true,name=Last 12 months,period=OBJECT,type=PRESELECTED},statuses=[],toNature=NULL,transactionNumber=NULL,transferFilters=NULL,user=NULL,usersWithImage=false}	5s
org.cyclos.model.ReportExecutionException: net.sf.jasperreports.engine.JRRuntimeException: java.io.IOException: Problem reading font data.
	at org.cyclos.impl.utils.reports.ReportHandlerImpl.executeReport(ReportHandlerImpl.java:225)
	at org.cyclos.impl.utils.reports.ReportHandlerImpl.runReport(ReportHandlerImpl.java:135)
	at org.cyclos.impl.banking.AccountServiceImpl.printAccountHistory(AccountServiceImpl.java:1968)
	at org.cyclos.security.banking.AccountServiceSecurity.printAccountHistory(AccountServiceSecurity.java:348)
	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.cyclos.impl.ServiceInvokerHandlerImpl$ServiceInvocationTransactionCallback.performInvocation(ServiceInvokerHandlerImpl.java:308)
	at org.cyclos.impl.InvokerHandlerImpl.runAs(InvokerHandlerImpl.java:109)
	at org.cyclos.impl.ServiceInvokerHandlerImpl$ServiceInvocationTransactionCallback.doInTransaction(ServiceInvokerHandlerImpl.java:255)
	at org.cyclos.impl.ServiceInvokerHandlerImpl$ServiceInvocationTransactionCallback.doInTransaction(ServiceInvokerHandlerImpl.java:234)
	at org.cyclos.impl.utils.transaction.TransactionHandlerImpl.runEnsuringInvocationContext(TransactionHandlerImpl.java:190)
	at org.cyclos.impl.utils.transaction.TransactionHandlerImpl.doRun(TransactionHandlerImpl.java:110)
	at org.cyclos.impl.utils.transaction.TransactionHandlerImpl.run(TransactionHandlerImpl.java:166)
	at org.cyclos.impl.utils.transaction.TransactionHandlerImpl.run(TransactionHandlerImpl.java:80)
	at org.cyclos.impl.InvokerHandlerImpl.performInTransaction(InvokerHandlerImpl.java:236)
	at org.cyclos.impl.InvokerHandlerImpl.doRunAsInTransaction(InvokerHandlerImpl.java:185)
	at org.cyclos.impl.InvokerHandlerImpl.runAsInTransaction(InvokerHandlerImpl.java:165)
	at org.cyclos.impl.ServiceInvokerHandlerImpl.doInvoke(ServiceInvokerHandlerImpl.java:661)
	at org.cyclos.impl.ServiceInvokerHandlerImpl.invoke(ServiceInvokerHandlerImpl.java:534)
	at org.cyclos.impl.access.ServiceFacadeImpl.invoke(ServiceFacadeImpl.java:135)
	at org.cyclos.server.spring.root.RequestServiceFactory$ServiceProxyInvocationHandler.invoke(RequestServiceFactory.java:74)
	at com.sun.proxy.$Proxy72.printAccountHistory(Unknown Source)
	at org.cyclos.server.content.banking.AccountsController.printAccountHistory(AccountsController.java:96)
	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.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.cyclos.server.http.CORSFilter.doFilterInternal(CORSFilter.java:65)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:728)
	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:467)
	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:392)
	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:311)
	at org.cyclos.server.http.RequestDataFilter.doFilterInternal(RequestDataFilter.java:216)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.cyclos.server.http.RequestContextFilter.doFilterInternal(RequestContextFilter.java:52)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1457)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:748)
Caused by: net.sf.jasperreports.engine.JRRuntimeException: java.io.IOException: Problem reading font data.
	at net.sf.jasperreports.engine.fonts.SimpleFontFace.setTtf(SimpleFontFace.java:181)
	at net.sf.jasperreports.engine.fonts.SimpleFontExtensionHelper.parseFontFace(SimpleFontExtensionHelper.java:342)
	at net.sf.jasperreports.engine.fonts.SimpleFontExtensionHelper.parseFontFamily(SimpleFontExtensionHelper.java:275)
	at net.sf.jasperreports.engine.fonts.SimpleFontExtensionHelper.parseFontFamilies(SimpleFontExtensionHelper.java:239)
	at net.sf.jasperreports.engine.fonts.SimpleFontExtensionHelper.loadFontFamilies(SimpleFontExtensionHelper.java:200)
	at net.sf.jasperreports.engine.fonts.SimpleFontExtensionHelper.loadFontFamilies(SimpleFontExtensionHelper.java:169)
	at net.sf.jasperreports.engine.fonts.FontExtensionsRegistry.getExtensions(FontExtensionsRegistry.java:58)
	at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.getExtensions(DefaultExtensionsRegistry.java:109)
	at net.sf.jasperreports.engine.DefaultJasperReportsContext.getExtensions(DefaultJasperReportsContext.java:271)
	at net.sf.jasperreports.engine.fonts.FontUtil.getFontFamilyNames(FontUtil.java:229)
	at org.cyclos.impl.utils.reports.ReportHandlerImpl.fillBasicParameters(ReportHandlerImpl.java:244)
	at org.cyclos.impl.utils.reports.ReportHandlerImpl.executeReport(ReportHandlerImpl.java:169)
	... 89 more
Caused by: java.io.IOException: Problem reading font data.
	at java.awt.Font.createFont0(Font.java:1000)
	at java.awt.Font.createFont(Font.java:877)
	at net.sf.jasperreports.engine.fonts.SimpleFontFace.setTtf(SimpleFontFace.java:173)
	... 100 more

alexandre
Posts: 888
Joined: Wed Sep 06, 2006 9:06 am

Re: Class-Error in Jasper

Post by alexandre »

Hi,

We cannot reproduce the problem using the docker release.
I Tested it on a fresh install of ubuntu server and CentOs-7.

Maybe you can try to stop your docker and start again with this flag and check if it works:

docker stop example-app
docker start example-app -e JAVA_OPTS="-Djava.awt.headless=true"

If it not work you can try to stop the remove the container and the local image of cyclos and download it again connecting on the same database (no data will be lost).

regards
Alexandre Caurrinhos
Cyclos development team.

canoodle
Posts: 7
Joined: Sun Feb 04, 2018 8:33 pm

Re: Class-Error in Jasper

Post by canoodle »

thanks for your support!

good idea... but same error when hitting that print button. :shock:

"setting the headless property in your tomcat startup command as -Djava.awt.headless=true"

is this different from your approach?

there seem to be MULTIPLE tomcat startup scripts, with the sole purpose to confuse us all.

/usr/local/tomcat/bin/catalina.sh

-is-calling?-> /usr/local/tomcat/bin/startup.sh

Caused by: java.io.IOException: Problem reading font data.
at java.awt.Font.createFont0(Font.java:1000)
at java.awt.Font.createFont(Font.java:877)
at net.sf.jasperreports.engine.fonts.SimpleFontFace.setTtf(SimpleFontFace.java:173)
... 100 more

java starts like this:

/usr/lib/jvm/java-1.8-openjdk/jre/bin/java -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.awt.headless=true -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -classpath /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start

wasn't the use idea of docker exactly to address such "misconfig" problems :-D? i am just guessing.

The other possible causes of this error are:

- one or more jar files are missing from Jasperreports Server installation for some reason

- one or more default system fonts are not accessible in this environment

I'd start by checking if all jars are present in the <js-webapp>/WEB-INF/libs folder by comparing the contents of it with the same folder in a working environment.

maybe i should reinstall cyclos 4 by myself and not rely on https://hub.docker.com/r/cyclos/cyclos/

canoodle
Posts: 7
Joined: Sun Feb 04, 2018 8:33 pm

Re: Class-Error in Jasper

Post by canoodle »

without further redo: this fixed the problem for alpine linux:

Code: Select all

apk update; apk add ttf-dejavu;
.. missing fonts.

8) :mrgreen:

https://www.youtube.com/watch?v=ESVQknHESuA
Attachments
More-People-want-to-do-good-than-harm-768x432.jpg
More-People-want-to-do-good-than-harm-768x432.jpg (42.4 KiB) Viewed 1938 times

Post Reply