as_9 Posted May 2, 2019 Share Posted May 2, 2019 In the compilation i always get the warnings:WARNING: An illegal reflective access operation has occurredWARNING: Illegal reflective access by net.sf.jasperreports.engine.util.ClassUtils (file:/C:/Development/Java/Eclipse%20Workspace/rpgen/lib/jasperreports-5.6.0.jar) to constructor com.sun.org.apache.xerces.internal.util.XMLGrammarPoolImpl()WARNING: Please consider reporting this to the maintainers of net.sf.jasperreports.engine.util.ClassUtilsWARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operationsWARNING: All illegal access operations will be denied in a future releaseMai 02, 2019 3:40:11 NACHM. net.sf.jasperreports.engine.design.JRJdk13Compiler compileClassesINFO: Note: C:DevelopmentJavaEclipse Workspacerpgenblank_1556804410135_187077.java uses or overrides a deprecated API.Note: Recompile with -Xlint:deprecation for details.---------------------------------The code should be correct:The .jar looks like: jasperMasterReport =JasperCompileManager.compileReport((String) (String.valueOf(reportTemplatePath) + sourceFile));jasperPrint = JasperFillManager.fillReport((JasperReport) jasperMasterReport,parameters, con);JasperExportManager.exportReportToPdfFile(jasperPrint, destinationFile);[/code]the pdf is created but it is empty. For con i am using also a good connection string, that i tested multiple times.If i use this connection string directly in jaspersoft studio, it works. But when i want to do it with the api, I always get these warnings and my pdf has no database input.Last year I created many reports with this method.Do you know what the problem is?My jar has no depracated code. This "blank_1556804410135_187077.java" i guess it is created automatically with the compilation. I even cant create very simple reports with a single query.Do I receive no data because the compilation uses depracted code? Or do I use a wrong java version? (java version "12.0.1" 2019-04-16) Link to comment Share on other sites More sharing options...
hozawa Posted May 8, 2019 Share Posted May 8, 2019 JasperReports libary does not generate *.java files. There's something wrong with your code. Link to comment Share on other sites More sharing options...
sam323xr Posted July 26, 2019 Share Posted July 26, 2019 I am getting the same error. Anyone else? Link to comment Share on other sites More sharing options...
kalupahanaadheetha5 Posted April 28, 2023 Share Posted April 28, 2023 Ahh me too! I have to submit my project in a few hours! Someone save me 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