CMDBuild Forum

Cant import report

Hello Everyone,

I am using cmdbuild since years and I never had this problem before.

I have the version 2.5.1 for now (someday I ll upgrade to the 3.x.x ! :slight_smile: )

I have a problem when I want to import a report. I already have more than 35 reports (made with jasperreport) and I never had the problem.

When I import the report, I have this error :

CMDBuild

Error while analizing report
DEBUG 2020-04-06 18:27:43 [jsonrpc ] Uncaught exception calling method class org.cmdbuild.servlets.json.schema.ModReport.analyzeJasperReport
java.lang.NullPointerException
        at org.cmdbuild.servlets.json.schema.ModReport.setReportImagesAndSubReports(ModReport.java:446)
        at org.cmdbuild.servlets.json.schema.ModReport.analyzeJasperReport(ModReport.java:415)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.cmdbuild.servlets.JSONDispatcher.dispatch(JSONDispatcher.java:106)
        at org.cmdbuild.servlets.JSONDispatcher.doPost(JSONDispatcher.java:64)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.cmdbuild.filters.AuthFilter.doFilter(AuthFilter.java:183)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.cmdbuild.filters.PatchManagerFilter.doFilter(PatchManagerFilter.java:48)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.cmdbuild.filters.ConfCheckFilter.doFilter(ConfCheckFilter.java:31)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.cmdbuild.filters.TranslationFilter.doFilter(TranslationFilter.java:52)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.cmdbuild.filters.LocalizationFilter.doFilter(LocalizationFilter.java:127)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.cmdbuild.filters.RequestLogFilter.doFilterInternal(RequestLogFilter.java:74)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1087)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:748)

I changed my log4j conf to ALL, and the trace are not really helping …

DEBUG 2020-04-06 18:27:43 [org.apache.commons.digester.Digester]   Popping body text '


















        '
DEBUG 2020-04-06 18:27:43 [org.apache.commons.digester.Digester.sax] characters(
)
DEBUG 2020-04-06 18:27:43 [org.apache.commons.digester.Digester.sax] endElement(http://jasperreports.sourceforge.net/jasperreports,jasperReport,jasperReport)
DEBUG 2020-04-06 18:27:43 [org.apache.commons.digester.Digester]   match='jasperReport'
DEBUG 2020-04-06 18:27:43 [org.apache.commons.digester.Digester]   bodyText='



















'
DEBUG 2020-04-06 18:27:43 [org.apache.commons.digester.Digester]   Fire body() for FactoryCreateRule[className=net.sf.jasperreports.engine.xml.JasperDesignFactory, attributeName=null, creationFactory=net.sf.jasperreports.engine.xml.JasperDesignFactory@75ed0243]
DEBUG 2020-04-06 18:27:43 [org.apache.commons.digester.Digester]   Fire body() for SetNextRule[methodName=setJasperDesign, paramType=net.sf.jasperreports.engine.design.JasperDesign]
DEBUG 2020-04-06 18:27:43 [org.apache.commons.digester.Digester]   Popping body text ''
DEBUG 2020-04-06 18:27:43 [org.apache.commons.digester.Digester]   Fire end() for SetNextRule[methodName=setJasperDesign, paramType=net.sf.jasperreports.engine.design.JasperDesign]
DEBUG 2020-04-06 18:27:43 [org.apache.commons.digester.Digester] [SetNextRule]{jasperReport} Call net.sf.jasperreports.engine.xml.JRXmlLoader.setJasperDesign(net.sf.jasperreports.engine.design.JasperDesign@6df9f09c)
TRACE 2020-04-06 18:27:43 [org.apache.commons.beanutils.MethodUtils] Matching name=setJasperDesign on class net.sf.jasperreports.engine.xml.JRXmlLoader
TRACE 2020-04-06 18:27:43 [org.apache.commons.beanutils.MethodUtils] Found straight match: public void net.sf.jasperreports.engine.xml.JRXmlLoader.setJasperDesign(net.sf.jasperreports.engine.design.JasperDesign)
TRACE 2020-04-06 18:27:43 [org.apache.commons.beanutils.MethodUtils] isPublic:true
DEBUG 2020-04-06 18:27:43 [org.apache.commons.digester.Digester]   Fire end() for FactoryCreateRule[className=net.sf.jasperreports.engine.xml.JasperDesignFactory, attributeName=null, creationFactory=net.sf.jasperreports.engine.xml.JasperDesignFactory@75ed0243]
DEBUG 2020-04-06 18:27:43 [org.apache.commons.digester.Digester] [FactoryCreateRule]{jasperReport} Pop net.sf.jasperreports.engine.design.JasperDesign
DEBUG 2020-04-06 18:27:43 [org.apache.commons.digester.Digester.sax] endPrefixMapping()
DEBUG 2020-04-06 18:27:43 [org.apache.commons.digester.Digester.sax] endPrefixMapping(xsi)
DEBUG 2020-04-06 18:27:43 [org.apache.commons.digester.Digester.sax] endDocument()
DEBUG 2020-04-06 18:27:43 [report  ] In the report there are 12 images
DEBUG 2020-04-06 18:27:43 [jsonrpc ] Uncaught exception calling method class org.cmdbuild.servlets.json.schema.ModReport.analyzeJasperReport
java.lang.NullPointerException
        at org.cmdbuild.servlets.json.schema.ModReport.setReportImagesAndSubReports(ModReport.java:446)
        at org.cmdbuild.servlets.json.schema.ModReport.analyzeJasperReport(ModReport.java:415)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.cmdbuild.servlets.JSONDispatcher.dispatch(JSONDispatcher.java:106)
        at org.cmdbuild.servlets.JSONDispatcher.doPost(JSONDispatcher.java:64)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.cmdbuild.filters.AuthFilter.doFilter(AuthFilter.java:183)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.cmdbuild.filters.PatchManagerFilter.doFilter(PatchManagerFilter.java:48)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.cmdbuild.filters.ConfCheckFilter.doFilter(ConfCheckFilter.java:31)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.cmdbuild.filters.TranslationFilter.doFilter(TranslationFilter.java:52)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.cmdbuild.filters.LocalizationFilter.doFilter(LocalizationFilter.java:127)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.cmdbuild.filters.RequestLogFilter.doFilterInternal(RequestLogFilter.java:74)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1087)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:748)

The preview mode and jasperreport is working without problem.

Do you have an idea ? :frowning:

Thank you

I found my problem :slight_smile: