ozlemkocak_1903 Posted March 6, 2015 Share Posted March 6, 2015 Hello, I need help.My code is running with jdk 1.6 but now, I am using jdk 1.8 and I take the following error: how can ı solve this problemm?? also , ı am using tomcat 7 , eclipse kepler. org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException at org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader.<init>(ClassFileReader.java:372) at net.sf.jasperreports.engine.design.JRJdtCompiler$1.findType(JRJdtCompiler.java:255) at net.sf.jasperreports.engine.design.JRJdtCompiler$1.findType(JRJdtCompiler.java:192) at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:109) at org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java:49) at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:122) at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getTypeFromTypeSignature(LookupEnvironment.java:1242) at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getTypeFromVariantTypeSignature(LookupEnvironment.java:1298) at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getTypeArgumentsFromSignature(LookupEnvironment.java:1085) at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getTypeFromTypeSignature(LookupEnvironment.java:1247) at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.createMethod(BinaryTypeBinding.java:550) at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.createMethods(BinaryTypeBinding.java:630) at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.cachePartsFrom(BinaryTypeBinding.java:365) at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.createBinaryTypeFrom(LookupEnvironment.java:684) at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.createBinaryTypeFrom(LookupEnvironment.java:663) at org.eclipse.jdt.internal.compiler.Compiler.accept(Compiler.java:296) at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:114) at org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java:49) at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:122) at org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getType(PackageBinding.java:137) at org.eclipse.jdt.internal.compiler.lookup.Scope.findType(Scope.java:1584) at org.eclipse.jdt.internal.compiler.lookup.Scope.getTypeOrPackage(Scope.java:2681) at org.eclipse.jdt.internal.compiler.lookup.Scope.getType(Scope.java:2378) at org.eclipse.jdt.internal.compiler.ast.SingleTypeReference.getTypeBinding(SingleTypeReference.java:44) at org.eclipse.jdt.internal.compiler.ast.TypeReference.internalResolveType(TypeReference.java:131) at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:203) at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.resolveTypesFor(SourceTypeBinding.java:1405) at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.methods(SourceTypeBinding.java:1174) at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.faultInTypesForFieldsAndMethods(SourceTypeBinding.java:677) at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.faultInTypes(CompilationUnitScope.java:469) at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:756) at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:468) at net.sf.jasperreports.engine.design.JRJdtCompiler.compileUnits(JRJdtCompiler.java:167) at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:201) at net.sf.jasperreports.engine.JasperCompileManager.compile(JasperCompileManager.java:354) at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:614) at net.sf.dynamicreports.jasper.builder.JasperReportBuilder.toJasperReport(JasperReportBuilder.java:279) at net.sf.dynamicreports.jasper.builder.JasperReportBuilder.toJasperPrint(JasperReportBuilder.java:308) at net.sf.dynamicreports.jasper.builder.JasperReportBuilder.export(JasperReportBuilder.java:629) at net.sf.dynamicreports.jasper.builder.JasperReportBuilder.toDocx(JasperReportBuilder.java:496) at net.sf.dynamicreports.jasper.builder.JasperReportBuilder.toDocx(JasperReportBuilder.java:492) at com.meta.efatura.model.service.ReportService$1.run(ReportService.java:269) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:744) net.sf.dynamicreports.report.exception.DRException: net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file: 1. The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required .class files /* ^ 1 errors at net.sf.dynamicreports.jasper.builder.JasperReportBuilder.toJasperReport(JasperReportBuilder.java:282) at net.sf.dynamicreports.jasper.builder.JasperReportBuilder.toJasperPrint(JasperReportBuilder.java:308) at net.sf.dynamicreports.jasper.builder.JasperReportBuilder.export(JasperReportBuilder.java:629) at net.sf.dynamicreports.jasper.builder.JasperReportBuilder.toDocx(JasperReportBuilder.java:496) at net.sf.dynamicreports.jasper.builder.JasperReportBuilder.toDocx(JasperReportBuilder.java:492) at com.meta.efatura.model.service.ReportService$1.run(ReportService.java:269) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:744) Caused by: net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file: 1. The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required .class files /* ^ 1 errors at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:204) at net.sf.jasperreports.engine.JasperCompileManager.compile(JasperCompileManager.java:354) at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:614) at net.sf.dynamicreports.jasper.builder.JasperReportBuilder.toJasperReport(JasperReportBuilder.java:279) ... 8 more Link to comment Share on other sites More sharing options...
nuno-miguel-lourenco Posted March 6, 2015 Share Posted March 6, 2015 JDK 1.8 is a break with the previous versions.Tomcat 7 is not "prepared" to the new version of the JDK. Even the Tomcat 8 is not fully featured...You shouldn't do that. The only way to solve it is by the fallback to 1.6 or 1.7... Link to comment Share on other sites More sharing options...
ozlemkocak_1903 Posted March 6, 2015 Author Share Posted March 6, 2015 thanks for your answer. I read some comments like ecj-*.jar can solve this problem. is it possible? ı must find a solution without 1.6 or 1.7 Link to comment Share on other sites More sharing options...
ozlemkocak_1903 Posted March 6, 2015 Author Share Posted March 6, 2015 thanks for your answer. I read some comments like ecj-*.jar can solve this problem. is it possible? ı must find a solution without 1.6 or 1.7 Link to comment Share on other sites More sharing options...
nuno-miguel-lourenco Posted March 6, 2015 Share Posted March 6, 2015 Java Options and JasperServer License Detailshttps://community.jaspersoft.com/documentation/tibco-jasperreports-server-source-build-guide/v60/java-options-and-jasperserverOn the supported JVM you'll see that JDK 1.8 is not referenced (https://www.jaspersoft.com/sites/default/files/Jaspersoft%20Platform%20Support%20V6.0.pdf).If I'm not mistaken the class files generated by JDK 1.8 use the v.52 of the format...Good luck with your trials to put it working. If you find a solution post it here ;) Link to comment Share on other sites More sharing options...
ozlemkocak_1903 Posted March 6, 2015 Author Share Posted March 6, 2015 I solved the problem. I added ecj-4.3.1.jar to my project and the problem is solved. Thank you nuno-miguel-lourenco for your interest :) Link to comment Share on other sites More sharing options...
nuno-miguel-lourenco Posted March 9, 2015 Share Posted March 9, 2015 ozlemkocak_1903 despite of the ability to put it working, which is GREAT, pay attention when deploying to production (if you have it), so that you have the ability to push your work ;) Cheers and again nice work! Link to comment Share on other sites More sharing options...
ymajoros Posted April 3, 2015 Share Posted April 3, 2015 Yes, this solves it (as long as you exclude jdt). See http://community.jaspersoft.com/questions/844403/how-run-jasperreports-java-8 Link to comment Share on other sites More sharing options...
ymajoros Posted April 3, 2015 Share Posted April 3, 2015 Yes, see http://community.jaspersoft.com/questions/844403/how-run-jasperreports-java-8 Link to comment Share on other sites More sharing options...
ymajoros Posted April 3, 2015 Share Posted April 3, 2015 The only way? You could upgrade Tomcat. Or change to a serious container that does support jdk versions that have been in production for 1 year. Link to comment Share on other sites More sharing options...
haroldo Posted June 17, 2015 Share Posted June 17, 2015 Not to mention Oracle stopped updating JDK 1.7 .... Link to comment Share on other sites More sharing options...
msolci Posted March 15, 2016 Share Posted March 15, 2016 Thanks very much it solved the problem after update from jdk7 to jdk8 with tomcat 8 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