bhathmr Posted May 23, 2009 Share Posted May 23, 2009 I upgraded the jasper report 3.5.0 to 3.5.1..i developed web application in netbeans. before that i created the report in 3.5.0. its working fine. when i upgrade, i cant bale to compie as well as run the jasper report.eports encountered this error :java.lang.NoClassDefFoundError: Could not initialize class net.sf.jasperreports.components.ComponentsExtensionsRegistryFactory at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at net.sf.jasperreports.engine.util.JRClassLoader.loadClassForRealName(JRClassLoader.java:161) at net.sf.jasperreports.engine.util.JRClassLoader.loadClassForName(JRClassLoader.java:119) at net.sf.jasperreports.engine.util.ClassUtils.instantiateClass(ClassUtils.java:57) at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.instantiateRegistry(DefaultExtensionsRegistry.java:211) at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.loadRegistries(DefaultExtensionsRegistry.java:188) at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.loadRegistries(DefaultExtensionsRegistry.java:141) at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.getRegistries(DefaultExtensionsRegistry.java:127) at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.getExtensions(DefaultExtensionsRegistry.java:104) at net.sf.jasperreports.engine.component.ComponentsEnvironment.findComponentBundles(ComponentsEnvironment.java:94) at net.sf.jasperreports.engine.component.ComponentsEnvironment.getCachedComponentBundles(ComponentsEnvironment.java:82) at net.sf.jasperreports.engine.component.ComponentsEnvironment.getComponentBundles(ComponentsEnvironment.java:70) at net.sf.jasperreports.engine.xml.JRReportSaxParserFactory.getSchemaLocations(JRReportSaxParserFactory.java:162) at net.sf.jasperreports.engine.xml.JRReportSaxParserFactory.configureParser(JRReportSaxParserFactory.java:143) at net.sf.jasperreports.engine.xml.JRReportSaxParserFactory.createParser(JRReportSaxParserFactory.java:108) at net.sf.jasperreports.engine.xml.JRXmlDigesterFactory.createParser(JRXmlDigesterFactory.java:1303) at net.sf.jasperreports.engine.xml.JRXmlDigesterFactory.createDigester(JRXmlDigesterFactory.java:1278) at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:203) at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:168) at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:152) at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:89) at org.apache.jsp.compile_jsp._jspService(compile_jsp.java:61) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619)i direclt compiled in i report and tr y to fill in web application it gives a error. HTTP Status 500 -type Exception reportmessagedescription The server encountered an internal error () that prevented it from fulfilling this request.exceptionorg.apache.jasper.JasperException: An exception occurred processing JSP page /report_bul_display.jsp at line 6764: parameters.put("flore",flore );65: 66: jasperPrint = 67: JasperFillManager.fillReport(68: jasperReport, 69: parameters, 70: conStacktrace: org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390) root causejavax.servlet.ServletException: java.lang.NoSuchMethodError: net.sf.jasperreports.engine.component.DefaultComponentManager.setDesignConverter(Lnet/sf/jasperreports/engine/component/ComponentDesignConverter;)V org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:850) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779) org.apache.jsp.report_005fbul_005fdisplay_jsp._jspService(report_005fbul_005fdisplay_jsp.java:393) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390) root causejava.lang.NoSuchMethodError: net.sf.jasperreports.engine.component.DefaultComponentManager.setDesignConverter(Lnet/sf/jasperreports/engine/component/ComponentDesignConverter;)V net.sf.jasperreports.components.ComponentsExtensionsRegistryFactory.<clinit>(ComponentsExtensionsRegistryFactory.java:84) java.lang.Class.forName0(Native Method) java.lang.Class.forName(Class.java:247) net.sf.jasperreports.engine.util.JRClassLoader.loadClassForRealName(JRClassLoader.java:161) net.sf.jasperreports.engine.util.JRClassLoader.loadClassForName(JRClassLoader.java:119) net.sf.jasperreports.engine.util.ClassUtils.instantiateClass(ClassUtils.java:57) net.sf.jasperreports.extensions.DefaultExtensionsRegistry.instantiateRegistry(DefaultExtensionsRegistry.java:211) net.sf.jasperreports.extensions.DefaultExtensionsRegistry.loadRegistries(DefaultExtensionsRegistry.java:188) net.sf.jasperreports.extensions.DefaultExtensionsRegistry.loadRegistries(DefaultExtensionsRegistry.java:141) net.sf.jasperreports.extensions.DefaultExtensionsRegistry.getRegistries(DefaultExtensionsRegistry.java:127) net.sf.jasperreports.extensions.DefaultExtensionsRegistry.getExtensions(DefaultExtensionsRegistry.java:104) net.sf.jasperreports.engine.util.JRStyledTextParser.<clinit>(JRStyledTextParser.java:80) net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:176) net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:77) net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:59) 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) org.apache.jsp.report_005fbul_005fdisplay_jsp._jspService(report_005fbul_005fdisplay_jsp.java:130) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390) note The full stack trace of the root cause is available in the Apache Tomcat/6.0.16 logs.Apache Tomcat/6.0.16Rajendra Bhat Link to comment Share on other sites More sharing options...
Teodor Danciu Posted May 27, 2009 Share Posted May 27, 2009 Hi, I suspect you are running with multiple versions of JR at the same time. Make sure you remove older versions from classpath and try again. I hope this helps.Teodor Link to comment Share on other sites More sharing options...
tonydsouza Posted July 23, 2009 Share Posted July 23, 2009 Hi Teodor,In my project there were a lot of reports created using the jasperreports0.6.1 version and now the organization is planning to move to the new version 3.5.2.Is there a way where i could compile / execute the old reports using the older version of jars and the new one with the new version of jars?Appreciate you helpTony Link to comment Share on other sites More sharing options...
Teodor Danciu Posted August 20, 2009 Share Posted August 20, 2009 Hi, Having two versions of the same library in the same application and using one or the other based on some conditions is a use case scenario that sounds very uncommon and produces unecessary hurdles.I suggest you upgrade to the latest JasperReports to benefit from the latest functionality and bug fixes accross your entire application and then you simply make sure you migrate the old reports to newer version either manually, by opening the JRXMLs in the iReport designer and saving them back, or by using a small program that loads them with JRLoader or JRXmlLoader and saves them back with JRXmlWriter and then compiles them with JasperCompilerManager. You might want to check this upgrate tool here, which is Ant based and comes with a sample under the /demo folder:http://jasperforge.org/projects/jasperreportsupdatetool/code I hope this helps.Teodor Link to comment Share on other sites More sharing options...
throwcode Posted February 25, 2010 Share Posted February 25, 2010 Hi, did anyone find a solution to this error. We just upgraded to JasperReports and iReport 3.7.1 and we now receive this error on ALL reports. They all work in iReports but fail with the above mentioned error in java execution! Even very simple reports created new in iReports 3.7.1, compiled by iReport 3.7.1 and used in java as *.jasper as file in InputStream.Any assistance would be greatly appreciated.TC Link to comment Share on other sites More sharing options...
ajithn Posted March 8, 2010 Share Posted March 8, 2010 Hi , I found the reason for this issue ,The jasperreports 3.7.1.jar containning the iReports (iReport-3.7.1/ireport/modules/ext) has the net.sf.jasperreports.components.ComponentsExtensionsRegistryFactory class. but somtime when we download jasperreports jar from the out side repository it does not containning the above package.simple solutionadd the jasperreports 3.7.1 jar containing the iReports to your class pathThanksajithn Post Edited by ajithn at 03/08/2010 04:40 Link to comment Share on other sites More sharing options...
ajithn Posted March 8, 2010 Share Posted March 8, 2010 Hi all ,Find the complete jasperreports 3.7.1.jar from sourceforge repository. it will be fixed the following issueshttp://jasperreports.sourceforge.net/maven2/jasperreports/jasperreports/3.7.1/[1] net.sf.jasperreports.engine.JRRuntimeException: Could not load class net.sf.jasperreports.components.ComponentsExtensionsRegistryFactoryOR[2] Caused by: java.lang.ClassNotFoundException: net.sf.jasperreports.components.ComponentsExtensionsRegistryFactoryThanksajithnPost Edited by ajithn at 03/08/2010 15:17 Link to comment Share on other sites More sharing options...
throwcode Posted March 8, 2010 Share Posted March 8, 2010 Hi ajithn, thanks for the info. Unfortunately you seem to identified another problem. I re-dwonloaded the jar 'jasperreport-3.7.1.jar' and compare the two side by side. They both contained 'net.sf.jasperreports.components.ComponentsExtensionsRegistryFactory.class'And both still result in the following error:SEVERE: java.lang.NoSuchMethodError: net.sf.jasperreports.engine.component.DefaultComponentManager.setDesignConverter(Lnet/sf/jasperreports/engine/component/ComponentDesignConverter;)V at net.sf.jasperreports.components.ComponentsExtensionsRegistryFactory.<clinit>(ComponentsExtensionsRegistryFactory.java:95) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at net.sf.jasperreports.engine.util.JRClassLoader.loadClassForRealName(JRClassLoader.java:161) at net.sf.jasperreports.engine.util.JRClassLoader.loadClassForName(JRClassLoader.java:119) at net.sf.jasperreports.engine.util.ClassUtils.instantiateClass(ClassUtils.java:57) at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.instantiateRegistry(DefaultExtensionsRegistry.java:211) at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.loadRegistries(DefaultExtensionsRegistry.java:188) at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.loadRegistries(DefaultExtensionsRegistry.java:141) at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.getRegistries(DefaultExtensionsRegistry.java:127) at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.getExtensions(DefaultExtensionsRegistry.java:104) at net.sf.jasperreports.engine.util.JRQueryExecuterUtils.getQueryExecuterFactory(JRQueryExecuterUtils.java:57) at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:664) at net.sf.jasperreports.engine.fill.JRFillDataset.initDatasource(JRFillDataset.java:588) at net.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:1212) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:842) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:791) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:63) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:402) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:363) at org.pae.rec.module.core.JasperRptControl.ListLeaguesBySport(JasperRptControl.java:195) at org.pae.rec.leaguedesign.LeaRptClientBB.jbuReportActionListener(LeaRptClientBB.java:76) 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:597) at org.apache.el.parser.AstValue.invoke(AstValue.java:172) at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276) at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68) at javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:99) at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88) at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:771) at javax.faces.component.UICommand.broadcast(UICommand.java:372) at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475) at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756) at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100) at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:18) at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCycle(ReceiveSendUpdates.java:132) at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:74) at com.icesoft.faces.webapp.http.core.RequestVerifier.service(RequestVerifier.java:31) at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24) at com.icesoft.faces.webapp.http.servlet.BasicAdaptingServlet.service(BasicAdaptingServlet.java:16) at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23) at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:53) at com.icesoft.faces.webapp.http.servlet.SessionVerifier.service(SessionVerifier.java:26) at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23) at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:131) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:56) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619)A slightly different error than what I think you're addressing. We have only one version of JasperReports and iReports so I don't see a conflict with an older version being the issue - we created some simple test reports directly from the latest of each - worked in iReports and failed in Java execution?I appreciate the input, hope someone can point me in the right direction.ThanksTC Link to comment Share on other sites More sharing options...
ajithn Posted March 14, 2010 Share Posted March 14, 2010 Hi ,Plz make sure that your class path have only one version of Jasperreports.jar file.because usually such problems are cause if there is another version of the offending class in your classpathThanks. Post Edited by ajithn at 03/14/2010 13:20 Link to comment Share on other sites More sharing options...
throwcode Posted March 15, 2010 Share Posted March 15, 2010 Hi ajithn, we have been throught it and through it but have found on conflicting jars. I guess it could be buried somewhere in the IDE (we use NetBeans). For now we have moved on to other components and will come back in a week with a fresh pair of eyes. Our fall back strategy will be to de-install 3.7.1 and reinstall the older version that we know works for us.Thanks for your help.TC Link to comment Share on other sites More sharing options...
samvijay Posted March 24, 2010 Share Posted March 24, 2010 I have two Jasper Pro versions 3.5 and 3.7 in my system.After building and deploying the 3.5 code when I execute a report, I also got below error"java.lang.NoSuchMethodError: net.sf.jasperreports.engine.component.DefaultComponentManager.setDesignConverter(Lnet/sf/jasperreports/engine/component/ComponentDesignConverter;)V"After spending lot of time i discovered that it was due to ANT_HOME property set to ANT tool present in Jasper 3.7 code base rather than 3.5.The solution was to rebuild the code with appropriate version of ANT and restarting the server with correct ANT_HOME value 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