Jasperreports6.9.0 version of this Java. Lang. NoClassDefFoundError

0

In jasperreports6.2.0 can be normal access but when upgrading to jasperreports6.9.0 tomcat to Java. Lang. NoClassDefFoundError: Could not initialize class net. Sf. The jasperreports. Engine. Util. JRStyledTextParser

Jdk8 and tomcat8 are used

490703178's picture
Joined: Aug 6 2019 - 8:14pm
Last seen: 12 months 4 days ago

JasperReports Library    

Access is normal in report 6.2.0, but tomcat reported the following error when upgrading the jar to report 6.9.0

java.lang.NoClassDefFoundError: Could not initialize class net.sf.jasperreports.engine.util.JRStyledTextParser
net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:116)
net.sf.jasperreports.engine.fill.JRHorizontalFiller.<init>(JRHorizontalFiller.java:85)
net.sf.jasperreports.engine.fill.JRFiller.createBandReportFiller(JRFiller.java:246)
net.sf.jasperreports.engine.fill.JRFiller.createReportFiller(JRFiller.java:272)
net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:114)
net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:319)
net.sf.jasperreports.engine.JasperRunManager.runToPdf(JasperRunManager.java:242)
net.sf.jasperreports.engine.JasperRunManager.runReportToPdf(JasperRunManager.java:723)
com.cnhis.cloudhealth.pmsweb.print.PrintToolRest.printToPdf(PrintToolRest.java:96)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137)
org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:296)
org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:250)
org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:237)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179)
org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)
javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
com.cnhis.cloudhealth.commons.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:73)
com.cnhis.cloudhealth.commons.interceptor.SessionFilter.doFilterInternal(SessionFilter.java:64)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

Jdk8 and tomcat8 are used

490703178 - 12 months 4 days ago

1 Answer:

0

I've such used the search function....

Have you already checked, whether all libraries are also within your tomcat classpath?

https://community.jaspersoft.com/wiki/error-when-running-reports-could-not-initialize-class

and

https://stackoverflow.com/questions/4998762/could-not-initialize-class-net-sf-jasperreports-engine-util-jrstyledtextparser

hth + regards

C-Box

C-Box's picture
2373
Joined: Jul 19 2006 - 5:58pm
Last seen: 1 month 3 days ago
Feedback
randomness