akasson Posted October 5, 2017 Share Posted October 5, 2017 I am upgrading the jasper reports component from version 4.0.2 to version 6.3 in a J2EE application configured with Spring MVC. Using Jaspersoft Studio 6.3, the reports compile fine.In the application source IDE (Eclipse)i removed the jasperreports 4.0.2 jar, and added the 6.3 jar, configured the build path, etc.When i start my application on my local workstation, a compile error occurs. Seems that the compile logic is looking for"net.sf.jasperreports.engine.design.JRDefaultCompiler.class"But this class does not exist in jasperreports 6.3 jar. It existed in 4.0.2, but not 6.3. The class that is seems it should look for is:net.sf.jasperreports.engine.design.JRDefaultCompilationSourceCode.classI don't know why my application is looking for JRDefaultCompiler class, i have no references to this in the application.As anyone experienced this? Any ideas is greatly appreciate, thanks in advance. Link to comment Share on other sites More sharing options...
reportdev Posted October 5, 2017 Share Posted October 5, 2017 JRDefaultCompiler is deprecated and replaced with JasperCompileManagerhttp://jasperreports.sourceforge.net/api/net/sf/jasperreports/engine/design/JRDefaultCompiler.htmlI'm not an expert on the java side, but my guess is that your application is trying to compile the jrxml into a .jasper file using the deprecated methods Link to comment Share on other sites More sharing options...
akasson Posted October 6, 2017 Author Share Posted October 6, 2017 Thank you for your input, i am just not sure why it is using a deprecated method, i have no references to it. It might have to do with Spring that integrates with Jasper - i am using an old version of Spring. This is the system out log output:org.springframework.beans.factory.BeanDefinitionStoreException: Error registering bean with name 'monthlyOrderReportHtml' defined in ServletContext resource [/WEB-INF/jasper_views.xml]: Class that bean class [org.springframework.web.servlet.view.jasperreports.JasperReportsHtmlView] depends on not found; nested exception is java.lang.NoClassDefFoundError: net.sf.jasperreports.engine.design.JRDefaultCompiler Link to comment Share on other sites More sharing options...
hozawa Posted October 7, 2017 Share Posted October 7, 2017 Springframework does not contain JasperReports library so it's your old application that's using it. Just grep for "JRDefaultCompiler" to find where in your code it's being used. 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