JayVora-SerpentCS/Jasperreports_odoo

cannot get subreport to work on jaspersoft studio 6.19 odoo11

HafizAlwi opened this issue · 6 comments

odoo.exceptions.UserError: ("Report Error\n<Fault 0: 'Failed to invoke method execute in class com.nantic.jasperreports.JasperServer: net.sf.jasperreports.engine.JRException: Class not found when loading object from InputStream.'>", '')

Hello odooers, a very good day I bid to everyone here!

So i have tried creating subreport by following the reference https://odoothaidev.com/how-to-add-subreport-in-jasper-report-using-ireport/ and various other youtube videos. To date everything have failed and I get the above error. I have tried with XML-data-source and with JDBC connection. Both encountered same problem with subreports.

FYI, I have placed the subreports on the same folder which is "custom_reports",
any help is very appreciated as I have spent 3 weeks on this issue alone.

0 [XML-RPC-0] ERROR org.apache.xmlrpc.server.XmlRpcStreamServer - execute: Error while performing request
org.apache.xmlrpc.common.XmlRpcInvocationException: Failed to invoke method execute in class com.nantic.jasperreports.JasperServer: net.sf.jasperreports.engine.JRException: Class not found when loading object from InputStream.
at org.apache.xmlrpc.server.ReflectiveXmlRpcHandler.invoke(ReflectiveXmlRpcHandler.java:126)
at org.apache.xmlrpc.server.ReflectiveXmlRpcHandler.execute(ReflectiveXmlRpcHandler.java:103)
at org.apache.xmlrpc.server.XmlRpcServerWorker.execute(XmlRpcServerWorker.java:43)
at org.apache.xmlrpc.server.XmlRpcServer.execute(XmlRpcServer.java:83)
at org.apache.xmlrpc.server.XmlRpcStreamServer.execute(XmlRpcStreamServer.java:191)
at org.apache.xmlrpc.webserver.Connection.run(Connection.java:205)
at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:68)
Caused by: net.sf.jasperreports.engine.JRRuntimeException: net.sf.jasperreports.engine.JRException: Class not found when loading object from InputStream.
at net.sf.jasperreports.repo.SerializedObjectPersistenceService.load(SerializedObjectPersistenceService.java:60)
at net.sf.jasperreports.repo.SerializedReportPersistenceService.load(SerializedReportPersistenceService.java:40)
at net.sf.jasperreports.repo.DefaultRepositoryService.getResource(DefaultRepositoryService.java:149)
at net.sf.jasperreports.repo.RepositoryUtil.getResourceFromLocation(RepositoryUtil.java:144)
at net.sf.jasperreports.repo.RepositoryUtil.getReport(RepositoryUtil.java:112)
at net.sf.jasperreports.engine.fill.JRFillSubreport.loadReport(JRFillSubreport.java:402)
at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluateReport(JRFillSubreport.java:369)
at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluateSubreport(JRFillSubreport.java:431)
at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluate(JRFillSubreport.java:345)
at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:383)
at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:533)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2549)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillGroupHeader(JRVerticalFiller.java:641)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillGroupHeaders(JRVerticalFiller.java:538)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:250)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:99)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:609)
at net.sf.jasperreports.engine.fill.BaseReportFiller.fill(BaseReportFiller.java:387)
at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:109)
at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:456)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:863)
at com.nantic.jasperreports.JasperServer.privateExecute(JasperServer.java:235)
at com.nantic.jasperreports.JasperServer.execute(JasperServer.java:134)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.xmlrpc.server.ReflectiveXmlRpcHandler.invoke(ReflectiveXmlRpcHandler.java:112)
... 6 more https://community.jaspersoft.com/questions/1181956/class-not-found-when-loading-object-error-message-when-running-new-report I still cannot wrap my head around this problem. Any help is very much appreciated

Hi @HafizAlwi
Can you try putting the main report's .jrxml file and sub-reports .jasper file in the same directory?

I think that your jasper file is compiled with a newer version, this module shall be modified, I already mentioned in another topic but no answer still from the developers.

yes compile with the right version only.

which may be not in cluded in the last 2 years jaspersoft studio versions