tfendall Posted June 10, 2009 Share Posted June 10, 2009 Using iReport I have designed a report, and the report runs fine on my local machine. I then used the Repository Navigator (within iReport) to connect to my Jasper Server installation, and then added my report to a new report unit within my repository.Now when I log into my jasper server, and try to run my report unit from there I get an error:com.jaspersoft.jasperserver.api.JSExceptionWrapper: org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute 'splitType' is not allowed to appear in element 'band'.The same report runs fine on my local machine, but when I try and run it from the repository it always errors. I am not an expert on the internals of iReport or Jasper Server, but the error message suggests to me that report engines being used in each location are different, and expect different schema in the report definition xml.If anyone could help me resolve this issue it would be much appreciated. Am I doing something wrong? Is there a work around?Thanks in advance!Code:com.jaspersoft.jasperserver.api.JSExceptionWrapper: org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute 'splitType' is not allowed to appear in element 'band'.com.jaspersoft.jasperserver.api.JSExceptionWrapper: net.sf.jasperreports.engine.JRException: org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute 'splitType' is not allowed to appear in element 'band'. at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:243) at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:226) at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:214) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.compileReport(EngineServiceImpl.java:891) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.compileReport(EngineServiceImpl.java:1260) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.CacheableCompiledReports.getData(CacheableCompiledReports.java:58) at com.jaspersoft.jasperserver.api.metadata.common.service.impl.hibernate.HibernateRepositoryCache.saveData(HibernateRepositoryCache.java:180) at com.jaspersoft.jasperserver.api.metadata.common.service.impl.hibernate.HibernateRepositoryCache.getCachedItem(HibernateRepositoryCache.java:110) at com.jaspersoft.jasperserver.api.metadata.common.service.impl.hibernate.HibernateRepositoryCache.cache(HibernateRepositoryCache.java:70) at sun.reflect.GeneratedMethodAccessor355.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176) at com.jaspersoft.jasperserver.api.common.util.spring.ReattemptMethodInterceptor.invoke(ReattemptMethodInterceptor.java:51) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210) at $Proxy7.cache(Unknown Source) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.getCompiledReport(EngineServiceImpl.java:901) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.getJasperReport(EngineServiceImpl.java:705) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.fillReport(EngineServiceImpl.java:351) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.executeReport(EngineServiceImpl.java:876) at com.jaspersoft.jasperserver.api.engine.jasperreports.domain.impl.ReportUnitRequest.execute(ReportUnitRequest.java:60) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.execute(EngineServiceImpl.java:301) at com.jaspersoft.jasperserver.war.action.ViewReportAction.executeReport(ViewReportAction.java:329) at com.jaspersoft.jasperserver.war.action.ViewReportAction.verifyData(ViewReportAction.java:222) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.webflow.util.DispatchMethodInvoker.invoke(DispatchMethodInvoker.java:103) at org.springframework.webflow.action.MultiAction.doExecute(MultiAction.java:136) at org.springframework.webflow.action.AbstractAction.execute(AbstractAction.java:203) at org.springframework.webflow.engine.AnnotatedAction.execute(AnnotatedAction.java:142) at org.springframework.webflow.engine.ActionExecutor.execute(ActionExecutor.java:61) at org.springframework.webflow.engine.ActionState.doEnter(ActionState.java:180) at org.springframework.webflow.engine.State.enter(State.java:200) at org.springframework.webflow.engine.Transition.execute(Transition.java:229) at org.springframework.webflow.engine.TransitionableState.onEvent(TransitionableState.java:112) at org.springframework.webflow.engine.Flow.onEvent(Flow.java:572) at org.springframework.webflow.engine.impl.RequestControlContextImpl.signalEvent(RequestControlContextImpl.java:207) at org.springframework.webflow.engine.ActionState.doEnter(ActionState.java:185) at org.springframework.webflow.engine.State.enter(State.java:200) at org.springframework.webflow.engine.Flow.start(Flow.java:557) at org.springframework.webflow.engine.impl.RequestControlContextImpl.start(RequestControlContextImpl.java:195) at org.springframework.webflow.engine.impl.FlowExecutionImpl.start(FlowExecutionImpl.java:189) at org.springframework.webflow.executor.FlowExecutorImpl.launch(FlowExecutorImpl.java:206) at sun.reflect.GeneratedMethodAccessor152.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154) at org.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:66) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210) at $Proxy17.launch(Unknown Source) at org.springframework.webflow.executor.support.FlowRequestHandler.handleFlowRequest(FlowRequestHandler.java:131) at org.springframework.webflow.executor.mvc.FlowController.handleRequestInternal(FlowController.java:170) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:45) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:820) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:755) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:396) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:350) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.jaspersoft.jasperserver.war.common.UploadMultipartFilter.doFilter(UploadMultipartFilter.java:86) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264) at org.acegisecurity.ui.switchuser.SwitchUserProcessingFilter.doFilter(SwitchUserProcessingFilter.java:335) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at com.jaspersoft.jasperserver.api.metadata.user.service.impl.MetadataAuthenticationProcessingFilter.doFilter(MetadataAuthenticationProcessingFilter.java:142) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at com.jaspersoft.jasperserver.war.util.RequestParameterAuthenticationFilter.doFilter(RequestParameterAuthenticationFilter.java:97) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:181) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at com.jaspersoft.jasperserver.war.UserPreferencesFilter.doFilter(UserPreferencesFilter.java:178) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:217) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at com.jaspersoft.jasperserver.war.UserPreferencesFilter.doFilter(UserPreferencesFilter.java:178) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:191) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148) at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:90) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.jaspersoft.jasperserver.war.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:70) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:138) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) Link to comment Share on other sites More sharing options...
tfendall Posted June 10, 2009 Author Share Posted June 10, 2009 I did manage to get my report working by manually editing the xml of my report and removing all of the splitType="Stretch" attributes. However, surely there must be a better solution than this? I am running iReport 3.5.2 on Windows, and Jasper Server 3.5.0 on Linux. Link to comment Share on other sites More sharing options...
franzkrauth Posted June 11, 2009 Share Posted June 11, 2009 Same problem here... I wonder if this is the problem: # Updated to JasperReports 3.5.2 and this the solution: # New ability to generate jrxml compatible with old versions of JasperReports copied from here: http://jasperforge.org/website/ireportwebsite/IR%20Website/nb-3.5.2.html?group_id=243&header=project&leftnav=yes&target=ireport Link to comment Share on other sites More sharing options...
tfendall Posted June 11, 2009 Author Share Posted June 11, 2009 Thanks for replying. I have confirmed that if I downgrade to iReport 3.5.0, then the problem does not occur. Link to comment Share on other sites More sharing options...
franzkrauth Posted June 11, 2009 Share Posted June 11, 2009 you can use iReport 3.5.2 as well Just configure compatibility with JasperReports 3.5.0 like this:Tools/Options/General/Compatibility Select the JR version you use on your JS.../uploads/projects/ireport/howto_compatibility.pngPost Edited by franzkrauth at 06/11/2009 03:03Post Edited by franzkrauth at 06/11/2009 03:04 Link to comment Share on other sites More sharing options...
kalevisiren Posted June 11, 2009 Share Posted June 11, 2009 The compatibility does not seem to work. I tried it many times with compatibility to JR 3.0.0, 3.1.0 and 3.5.0. Every time the jrxml had those "splitType=stretch" tags. Only by manually removing them helps. Link to comment Share on other sites More sharing options...
Gaby38 Posted June 11, 2009 Share Posted June 11, 2009 Same thing for me : since I upgraded in 3.5.2 I am unable to run a report in Jasperserver due to the unrecognized "stretchType".For me 3.5.2 is unusable : I downgraded to 3.5.1. Link to comment Share on other sites More sharing options...
tfendall Posted June 11, 2009 Author Share Posted June 11, 2009 I found that when running in compatability mode, the splitType attributes were still visible in the xml, but when I the report into my repository it prompted me with a message saying that some features of the report were not supported in v3.5.0 I clicked ok, and the report was uploaded to the repository with the offending xml attributes removed (even though they still existed in my local file). Hope that helps someone Link to comment Share on other sites More sharing options...
kalevisiren Posted June 12, 2009 Share Posted June 12, 2009 How did you deploy the report to JasperServer?I tried it from iReport, and it did not ask any questions, and the report could not be run from JS. Link to comment Share on other sites More sharing options...
franzkrauth Posted June 16, 2009 Share Posted June 16, 2009 Open the Repository: /uploads/projects/ireport/js_repository.png Configure your server: /uploads/projects/ireport/js_plugin.png And publish away: /uploads/projects/ireport/publish_js.png Link to comment Share on other sites More sharing options...
nikunj321 Posted June 16, 2009 Share Posted June 16, 2009 There may be two possible reasons for this error.1.Reports which you are uploading from iReport to jasperserver,both of them should use same Jasperreports library.Please make sure you are using ireport3.5.0 and Jasperserver 3.5 2.While adding a report from ireport to jasperserver,you may be importing database connection from ireport,so please make sure datasource has proper connection defined...like there should not be localhost for database server.Please notify us if these solves your problem. Link to comment Share on other sites More sharing options...
Gaby38 Posted June 16, 2009 Share Posted June 16, 2009 In my case, I use the last released version of iReport and Jasperserver, that is 3.5.2 for iReport and 3.5.1 for jasperserver.If I use ireport 3.5.1 all is OK. For me, at least, there is an incompatibility issue between the generated jxrml and the ".xsd" definition file which is refered to at the beginning of the jrxml because it doesn't content the definition of the property "stretchType" in the object "band".So, for me, your recommendation doesn't fix my problem and I downgraded to iReport 3.5.1 Link to comment Share on other sites More sharing options...
drodinthe559 Posted July 31, 2009 Share Posted July 31, 2009 I had the same problem. I changed the compatibility to 3.5.0 as suggested in the in one of the previous threads. After the change, I changed something in my report so it would enable the save button. Then I pressed the save button which iReport promted me to keep the report in the most current version or older version. I added it to my repository, and it worked. Link to comment Share on other sites More sharing options...
fleveneur Posted August 19, 2009 Share Posted August 19, 2009 I have upgrade from 3.2.1 to 3.5.2 and faced the same issue after uploading a report with some Pivot table. I did try to set the report compatibility (as mentioned above to 3.2.1) but that did not fix it. I had to remove all the "band" i don't use with my Pivot (header, footer, background...). FOr the rest (Title and Summary) , i select "default" for "split type".I also have non Pivot report (tabular) and i also set the split type to default and i can upload them and run them.Franck Link to comment Share on other sites More sharing options...
rodriguezum Posted August 19, 2009 Share Posted August 19, 2009 i handled the splitType problem the same way you guys, but now upgrading to 3.5.3, it gives new errors for the jrxml, it runs fine in IReport but on server it throws me an error on itemLabel and that one i cant find in the jrxml, anyone with the same problem? Link to comment Share on other sites More sharing options...
mcaton Posted August 25, 2009 Share Posted August 25, 2009 I am on 3.5.3 for iReport and 3.5.1 for JasperServer and have come across the sliptype error but not any of the new ones (haven't yet done a great deal of development).So is it recommended that my iReport is 3.5.1 to match the JasperServer install so that the libraries match?thanks Link to comment Share on other sites More sharing options...
sadhat Posted December 15, 2009 Share Posted December 15, 2009 Hello..i am using netbeans to develop my project so i have downloaded jasperreport plugin ins -3.5.2 and have jar files of 3.5.2 and i have developed a .jrxml file.. with the code i try to call it and i get error like... exceptionjavax.servlet.ServletException: Servlet execution threw an exception org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)root causejava.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 causeorg.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 causeorg.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)Please help me out and this is my code ....i have attached the files of jrxml and code.. please reply as soon as possible..ASAPCode:<?xml version="1.0" encoding="UTF-8"?><jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="ireportsample" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20"> <queryString language="SQL"> <![CDATA[select a.team as "branch" , count(b.[user_id])as "Total calls" ,count(b.account_id) as "File"from [user] a, phone bwhere a.team is NOT NUll and a.[user_id]=b.[user_id]group by a.team;]]> </queryString> <field name="branch" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="Total calls" class="java.lang.Integer"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="File" class="java.lang.Integer"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <background> <band splitType="Stretch"/> </background> <title> <band height="79" splitType="Stretch"> <staticText> <reportElement x="0" y="36" width="300" height="24"/> <textElement> <font size="16"/> </textElement> <text><![CDATA[MONTHLY-ACTIVITIES]]></text> </staticText> </band> </title> <pageHeader> <band height="35" splitType="Stretch"> <staticText> <reportElement x="0" y="15" width="100" height="20"/> <textElement textAlignment="Center"/> <text><![CDATA[bRANCH]]></text> </staticText> <staticText> <reportElement x="100" y="15" width="100" height="20"/> <textElement textAlignment="Center"/> <text><![CDATA[Total Calls]]></text> </staticText> <staticText> <reportElement x="200" y="15" width="100" height="20"/> <textElement textAlignment="Center"/> <text><![CDATA[File]]></text> </staticText> </band> </pageHeader> <columnHeader> <band height="21" splitType="Stretch"> <textField> <reportElement x="0" y="0" width="100" height="20"/> <textElement textAlignment="Center"> <font size="8"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{branch}]]></textFieldExpression> </textField> <textField> <reportElement x="100" y="0" width="100" height="20"/> <textElement textAlignment="Center"> <font size="8"/> </textElement> <textFieldExpression class="java.lang.Integer"><![CDATA[$F{Total calls}]]></textFieldExpression> </textField> <textField> <reportElement x="200" y="0" width="100" height="20"/> <textElement textAlignment="Center"> <font size="8"/> </textElement> <textFieldExpression class="java.lang.Integer"><![CDATA[$F{File}]]></textFieldExpression> </textField> </band> </columnHeader> <detail> <band height="125" splitType="Stretch"/> </detail> <columnFooter> <band height="45" splitType="Stretch"/> </columnFooter> <pageFooter> <band height="54" splitType="Stretch"/> </pageFooter> <summary> <band height="42" splitType="Stretch"/> </summary></jasperReport>0-------------------------------------------------------------------------------0/* * To change this template, choose Tools | Templates * and open the template in the editor. */package com.modular.d2dcms.Report;import com.d2dcms.dbutil.DBUtil;import java.io.File;import java.io.IOException;import java.sql.Connection;import java.sql.ResultSet;import java.sql.Statement;import java.util.HashMap;import java.util.Map;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;import net.sf.jasperreports.engine.JRException;import net.sf.jasperreports.engine.JasperCompileManager;import net.sf.jasperreports.engine.JasperExportManager;import net.sf.jasperreports.engine.JasperFillManager;import net.sf.jasperreports.engine.JasperPrint;import net.sf.jasperreports.engine.JasperPrintManager;import net.sf.jasperreports.engine.JasperReport;import net.sf.jasperreports.view.JasperViewer;import org.apache.struts.action.Action;import org.apache.struts.action.ActionForm;import org.apache.struts.action.ActionForward;import org.apache.struts.action.ActionMapping;/** * * @author Administrator */public class SampleReportAction extends Action{ private ActionForward forward; public SampleReportAction(){ super(); System.out.println("Call of Constructor"); } DBUtil mdbc=new DBUtil(); Connection con = null; Statement st=null; ResultSet rs=null; public ActionForward execute(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response)throws Exception{ Statement stmt=null; File path=new File("."); //String SrcFolder="",reportSource="",reportDest="";/* try { // SrcFolder = path.getCanonicalPath(); } catch (IOException ex) {} //reportSource = SrcFolder + File.separatorChar + "report" + File.separatorChar + "templates" + File.separatorChar + "report1.jrxml"; // System.out.println("After report source ----"+reportSource); */ Map params=new HashMap(); String mode = request.getParameter("mode"); System.out.println("mode value :::" +mode); if(mode.equalsIgnoreCase("print")){ try{ con=mdbc.getConnection(); System.out.println("After getting connection----"); String abc=getQuery(); params.put("Query",abc); System.out.println(abc); JasperReport jasperReport =JasperCompileManager.compileReport("C:/Reports_Sadhat/FirstIReport.jrxml"); System.out.println("after the compile manager statement..."); JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport,params,con); JasperExportManager.exportReportToPdfFile(jasperPrint, "C:/Sadhat/sample_report/FirstIReport.pdf"); boolean isExitOnClose = false; JasperViewer view = new JasperViewer(jasperPrint,isExitOnClose); view.pack(); view.setTitle("FirstIReport"); view.setSize(1020,720); view.setLocation(0,30); view.setVisible(true); JasperPrintManager.printReport(jasperPrint,true); } catch(JRException ex){ ex.printStackTrace(); } } return forward; } public String getQuery(){ String Query=""; Query="select a.team,count(b.[user_id]),count(b.account_id) from [user] a, phone b where a.team is NOT NUll and a.[user_id]=b.[user_id] group by a.team;"; return Query; } } Link to comment Share on other sites More sharing options...
acarmar Posted May 4, 2012 Share Posted May 4, 2012 The tool JDeploy! on http://sourceforge.net/projects/jaspertools/?source=directoryallows to deal with reports deployment on diferents environments (development, pre production, production). It dont touch the datasources when deploying a report, so the systems department can define it. It also defines a estandarized way to package the reports and subreports of a project on a zip file. And includes other utils to list reports, create datasources,...I hope to helped you.bye. Link to comment Share on other sites More sharing options...
acarmar Posted May 4, 2012 Share Posted May 4, 2012 The tool JDeploy! on http://sourceforge.net/projects/jaspertools/?source=directoryallows to deal with reports deployment on diferents environments (development, pre production, production). It dont touch the datasources when deploying a report, so the systems department can define it. It also defines a estandarized way to package the reports and subreports of a project on a zip file. And includes other utils to list reports, create datasources,...I hope to helped you.bye. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now