JasperReports plugin - confused on a NullPointerException

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

JasperReports plugin - confused on a NullPointerException

Jon Eskin
I tried to make a sample project using code from a tutorial I found for the JasperReports plugin (https://struts.apache.org/docs/jasperreports-tutorial.html <https://struts.apache.org/docs/jasperreports-tutorial.html>).

I’m seeing a NullPointerException in my logs when I try to run the report (see below). It’s complaining about not closing a db connection even though no db connection is made. I uploaded a small project demonstrating the issue: https://github.com/jpe90/struts2jasper <https://github.com/jpe90/struts2jasper>

Am I doing something wrong or is this a bug?

Error:

2017-07-13 19:59:56,616 WARN  [http-nio-8080-exec-6] jasperreports.JasperReportsResult (JasperReportsResult.java:392) - Could not close db connection properly
java.lang.NullPointerException: null
        at org.apache.struts2.views.jasperreports.JasperReportsResult.doExecute(JasperReportsResult.java:390) [struts2-jasperreports-plugin-2.5.10.1.jar:2.5.10.1]
        at org.apache.struts2.result.StrutsResultSupport.execute(StrutsResultSupport.java:208) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:373) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:277) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:253) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:177) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:260) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:73) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.doIntercept(ConversionErrorInterceptor.java:139) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:133) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:133) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:192) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:69) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at org.apache.struts2.interceptor.DateTextFieldInterceptor.intercept(DateTextFieldInterceptor.java:115) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:88) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:246) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:99) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:139) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:155) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:174) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at org.apache.struts2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:120) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:171) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:195) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:193) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at org.apache.struts2.factory.StrutsActionProxy.execute(StrutsActionProxy.java:54) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:564) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at org.apache.struts2.dispatcher.ExecuteOperations.executeAction(ExecuteOperations.java:81) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:143) [struts2-core-2.5.10.1.jar:2.5.10.1]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.16]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.16]
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) [catalina.jar:8.5.16]
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [catalina.jar:8.5.16]
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478) [catalina.jar:8.5.16]
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [catalina.jar:8.5.16]
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80) [catalina.jar:8.5.16]
        at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624) [catalina.jar:8.5.16]
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [catalina.jar:8.5.16]
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) [catalina.jar:8.5.16]
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799) [tomcat-coyote.jar:8.5.16]
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-coyote.jar:8.5.16]
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) [tomcat-coyote.jar:8.5.16]
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455) [tomcat-coyote.jar:8.5.16]
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-coyote.jar:8.5.16]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_101]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_101]
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.5.16]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_101]



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: JasperReports plugin - confused on a NullPointerException

Lukasz Lenart
Can you try to use the latest 2.5.12 version? There was some issue
related to the JasperReports fixed with this release.

2017-07-14 2:10 GMT+02:00 Jon Eskin <[hidden email]>:

> I tried to make a sample project using code from a tutorial I found for the JasperReports plugin (https://struts.apache.org/docs/jasperreports-tutorial.html <https://struts.apache.org/docs/jasperreports-tutorial.html>).
>
> I’m seeing a NullPointerException in my logs when I try to run the report (see below). It’s complaining about not closing a db connection even though no db connection is made. I uploaded a small project demonstrating the issue: https://github.com/jpe90/struts2jasper <https://github.com/jpe90/struts2jasper>
>
> Am I doing something wrong or is this a bug?
>
> Error:
>
> 2017-07-13 19:59:56,616 WARN  [http-nio-8080-exec-6] jasperreports.JasperReportsResult (JasperReportsResult.java:392) - Could not close db connection properly
> java.lang.NullPointerException: null
>         at org.apache.struts2.views.jasperreports.JasperReportsResult.doExecute(JasperReportsResult.java:390) [struts2-jasperreports-plugin-2.5.10.1.jar:2.5.10.1]
>         at org.apache.struts2.result.StrutsResultSupport.execute(StrutsResultSupport.java:208) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:373) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:277) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:253) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:177) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:260) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:73) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.doIntercept(ConversionErrorInterceptor.java:139) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:133) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:133) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:192) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:69) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at org.apache.struts2.interceptor.DateTextFieldInterceptor.intercept(DateTextFieldInterceptor.java:115) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:88) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:246) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:99) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:139) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:155) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:174) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at org.apache.struts2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:120) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:171) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:195) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:193) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at org.apache.struts2.factory.StrutsActionProxy.execute(StrutsActionProxy.java:54) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:564) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at org.apache.struts2.dispatcher.ExecuteOperations.executeAction(ExecuteOperations.java:81) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:143) [struts2-core-2.5.10.1.jar:2.5.10.1]
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.16]
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.16]
>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) [catalina.jar:8.5.16]
>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [catalina.jar:8.5.16]
>         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478) [catalina.jar:8.5.16]
>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [catalina.jar:8.5.16]
>         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80) [catalina.jar:8.5.16]
>         at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624) [catalina.jar:8.5.16]
>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [catalina.jar:8.5.16]
>         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) [catalina.jar:8.5.16]
>         at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799) [tomcat-coyote.jar:8.5.16]
>         at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-coyote.jar:8.5.16]
>         at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) [tomcat-coyote.jar:8.5.16]
>         at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455) [tomcat-coyote.jar:8.5.16]
>         at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-coyote.jar:8.5.16]
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_101]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_101]
>         at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.5.16]
>         at java.lang.Thread.run(Thread.java:745) [?:1.8.0_101]
>
>
>



--

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: JasperReports plugin - confused on a NullPointerException

Jon Eskin
I just tried switching to 2.5.12 but I'm seeing the same error.

> On Jul 14, 2017, at 2:27 AM, Lukasz Lenart <[hidden email]> wrote:
>
> Can you try to use the latest 2.5.12 version? There was some issue
> related to the JasperReports fixed with this release.
>
> 2017-07-14 2:10 GMT+02:00 Jon Eskin <[hidden email] <mailto:[hidden email]>>:
>> I tried to make a sample project using code from a tutorial I found for the JasperReports plugin (https://struts.apache.org/docs/jasperreports-tutorial.html <https://struts.apache.org/docs/jasperreports-tutorial.html><https://struts.apache.org/docs/jasperreports-tutorial.html <https://struts.apache.org/docs/jasperreports-tutorial.html>>).
>>
>> I’m seeing a NullPointerException in my logs when I try to run the report (see below). It’s complaining about not closing a db connection even though no db connection is made. I uploaded a small project demonstrating the issue: https://github.com/jpe90/struts2jasper <https://github.com/jpe90/struts2jasper> <https://github.com/jpe90/struts2jasper <https://github.com/jpe90/struts2jasper>>
>>
>> Am I doing something wrong or is this a bug?
>>
>> Error:
>>
>> 2017-07-13 19:59:56,616 WARN  [http-nio-8080-exec-6] jasperreports.JasperReportsResult (JasperReportsResult.java:392) - Could not close db connection properly
>> java.lang.NullPointerException: null
>>        at org.apache.struts2.views.jasperreports.JasperReportsResult.doExecute(JasperReportsResult.java:390) [struts2-jasperreports-plugin-2.5.10.1.jar:2.5.10.1]
>>        at org.apache.struts2.result.StrutsResultSupport.execute(StrutsResultSupport.java:208) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:373) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:277) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:253) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:177) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:260) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:73) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.doIntercept(ConversionErrorInterceptor.java:139) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:133) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:133) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:192) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:69) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at org.apache.struts2.interceptor.DateTextFieldInterceptor.intercept(DateTextFieldInterceptor.java:115) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:88) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:246) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:99) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:139) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:155) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:174) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at org.apache.struts2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:120) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:171) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:195) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:193) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at org.apache.struts2.factory.StrutsActionProxy.execute(StrutsActionProxy.java:54) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:564) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at org.apache.struts2.dispatcher.ExecuteOperations.executeAction(ExecuteOperations.java:81) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:143) [struts2-core-2.5.10.1.jar:2.5.10.1]
>>        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.16]
>>        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.16]
>>        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) [catalina.jar:8.5.16]
>>        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [catalina.jar:8.5.16]
>>        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478) [catalina.jar:8.5.16]
>>        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [catalina.jar:8.5.16]
>>        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80) [catalina.jar:8.5.16]
>>        at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624) [catalina.jar:8.5.16]
>>        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [catalina.jar:8.5.16]
>>        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) [catalina.jar:8.5.16]
>>        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799) [tomcat-coyote.jar:8.5.16]
>>        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-coyote.jar:8.5.16]
>>        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) [tomcat-coyote.jar:8.5.16]
>>        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455) [tomcat-coyote.jar:8.5.16]
>>        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-coyote.jar:8.5.16]
>>        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_101]
>>        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_101]
>>        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.5.16]
>>        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_101]
>>
>>
>>
>
>
>
> --
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email] <mailto:[hidden email]>
> For additional commands, e-mail: [hidden email] <mailto:[hidden email]>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: JasperReports plugin - confused on a NullPointerException

Lukasz Lenart
2017-07-14 12:16 GMT+02:00 Jon Eskin <[hidden email]>:
> I just tried switching to 2.5.12 but I'm seeing the same error.

Looks like  a bug in the plugin - could you register a ticket in JIRA?

Also do you mind contributing your example to
https://github.com/apache/struts-examples ? The best way would be open
a PR :)


Thanks & regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: JasperReports plugin - confused on a NullPointerException

Jon Eskin
Sure, I’ll get a JIRA ticket registered for that.

And I would be happy to contribute the example.

> On Jul 17, 2017, at 3:45 AM, Lukasz Lenart <[hidden email]> wrote:
>
> 2017-07-14 12:16 GMT+02:00 Jon Eskin <[hidden email]>:
>> I just tried switching to 2.5.12 but I'm seeing the same error.
>
> Looks like  a bug in the plugin - could you register a ticket in JIRA?
>
> Also do you mind contributing your example to
> https://github.com/apache/struts-examples ? The best way would be open
> a PR :)
>
>
> Thanks & regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...