my dog learned polymorphism*
The moose likes Other Java Products and Servers and the fly likes java.lang.ExceptionInInitializerError Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "java.lang.ExceptionInInitializerError" Watch "java.lang.ExceptionInInitializerError" New topic
Author

java.lang.ExceptionInInitializerError

Krish Khan
Ranch Hand

Joined: Dec 14, 2009
Posts: 46
Hello every one..

I am trying to call jasper report from code then i am getting this error:
exception

javax.servlet.ServletException: Servlet execution threw an exception
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)

root cause

java.lang.ExceptionInInitializerError
net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:177)
net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:78)
net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:60)
net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:147)
net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:57)
net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:421)
com.modular.d2dcms.Report.SampleReportAction.execute(SampleReportAction.java:71)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)

root cause

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dejaVuSansFamily' defined in URL [file:/C:/Documents%20and%20Settings/Administrator/.netbeans/6.5/apache-tomcat-6.0.18_base/work/Catalina/localhost/D2DCMS_111/loader/net/sf/jasperreports/fonts/fonts.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'exportFonts' of bean class [net.sf.jasperreports.engine.fonts.SimpleFontFamily]: Bean property 'exportFonts' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1279)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
java.security.AccessController.doPrivileged(Native Method)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:168)
net.sf.jasperreports.extensions.SpringExtensionsRegistry.getExtensions(SpringExtensionsRegistry.java:81)
net.sf.jasperreports.extensions.DefaultExtensionsRegistry.getExtensions(DefaultExtensionsRegistry.java:107)
net.sf.jasperreports.engine.util.JRStyledTextParser.<clinit>(JRStyledTextParser.java:80)
net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:177)
net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:78)
net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:60)
net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:147)
net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:57)
net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:421)
com.modular.d2dcms.Report.SampleReportAction.execute(SampleReportAction.java:71)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)

root cause

org.springframework.beans.NotWritablePropertyException: Invalid property 'exportFonts' of bean class [net.sf.jasperreports.engine.fonts.SimpleFontFamily]: Bean property 'exportFonts' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:801)
org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:651)
org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:78)
org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:59)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1276)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
java.security.AccessController.doPrivileged(Native Method)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:168)
net.sf.jasperreports.extensions.SpringExtensionsRegistry.getExtensions(SpringExtensionsRegistry.java:81)
net.sf.jasperreports.extensions.DefaultExtensionsRegistry.getExtensions(DefaultExtensionsRegistry.java:107)
net.sf.jasperreports.engine.util.JRStyledTextParser.<clinit>(JRStyledTextParser.java:80)
net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:177)
net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:78)
net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:60)
net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:147)
net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:57)
net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:421)
com.modular.d2dcms.Report.SampleReportAction.execute(SampleReportAction.java:71)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)



I am using netbeans6.5.2 plugins of jasper report3.5.2 and jar files jasperreport3.5.2 , common-javaflow.20060401,jasperreport-fonts 3.6.2
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38509
    
  23
Not a beginning question. Moving thread.

Have you looked up the documentation for that Exception? Have you looked in the initialisers?
srinivas srinivasmeenavalli
Ranch Hand

Joined: Jul 13, 2008
Posts: 65
I guess it's issue with your beans

"Error creating bean with name 'dejaVuSansFamily' "
Have you checked spring configurations ? check your bean definitions.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: java.lang.ExceptionInInitializerError