marcosmarciel50 Posted June 15 Share Posted June 15 Hello friends, I'm new with the jasper tool, and I'm having some problems, I have several reports here, which are working, but I have one here, which uses a sub-report, but when I ask to generate it, it returns this error:Exception on "main" thread net.sf.jasperreports.engine.JRRuntimeException: net.sf.jasperreports.engine.JRException: Class not found when loading object from InputStream.compiling with jasperstudio works, but when I compile with phpjasper it gives an error. I believe it's a problem with incompatibility with java, but I'm already using the newest version of jdk Link to comment Share on other sites More sharing options...
Mehak Rajkumar Posted June 15 Share Posted June 15 Thank you for posting to the Jaspersoft Community. Our team of experts has read your question and we are working to get you an answer as quickly as we can. If you have a Jaspersoft Professional Subscription plan, please visit https://support.tibco.com/s/ for direct access to our technical support teams offering guaranteed response times. Link to comment Share on other sites More sharing options...
Raphaël Peguet Posted June 16 Share Posted June 16 Hello,I assume you are using the latest version of JasperReports library which does indeed support any JRE versions from v. 6.If your PHP app is able to run jasper reports nicely and it only fails for reports embedding sub-reports then I would check that the master report points to the right location to find the sub-report .jasper or .jrxml file once deployed in your app.I hope this helps Link to comment Share on other sites More sharing options...
marcosmarciel50 Posted June 20 Author Share Posted June 20 Yes, I'm at version 6.20.5, and my jdk version is this:java version "1.8.0_371"Java SE Runtime Environment (build 1.8.0_371-b11)Java HotSpot 64-Bit Server VM (build 25.371-b11, mixed mode)and my subreport's call is this:<band height="306" splitType="Stretch"><subreport><reportElement x="0" y="0" width="509" height="70" uuid="e54ebdae-686d-4023-91f2-e0ca8e043b4e"/><subreportParameter name="REPORT_CONNECTION"><subreportParameterExpression><![CDATA[]]></subreportParameterExpression></subreportParameter><connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression><subreportExpression><![CDATA["C://xampp//htdocs//gerador_relatorio//gerenciamentoCargas//relatorio_sub.jrxml"]]></subreportExpression></subreport></band>And yes, my subreport directory is correct, I already confirmed it. I added an image in attachment, in classpath do I need to add the jdk path of my machine? Link to comment Share on other sites More sharing options...
Giulio Toffoli Posted July 7 Share Posted July 7 I would try to remove the jasper file of the subreport and recompile it with the same compiler you used to compile the master report.Be aware that Jaspersoft Studio may not always compile the subreports for you, or simply it does not do it if it is not necessary (i.e. the jasper is up-to-date respect to the jrxml).Since phpjasper will be your running environment, I would use it also to (re)compile all your jrxml files.Giulio Link to comment Share on other sites More sharing options...
Giulio Toffoli Posted July 7 Share Posted July 7 Another possible error could be the way you are referencing the subreport:C://xampp//htdocs//gerador_relatorio//gerenciamentoCargas//relatorio_sub.jrxmlYou should point to the jasper file, not to the jrxml file (which is the source that needs to be compiled into a jasper file). 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