struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jon Eskin <eski...@gmail.com>
Subject Re: JasperReports plugin - confused on a NullPointerException
Date Fri, 14 Jul 2017 10:16:45 GMT
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 <lukaszlenart@apache.org> 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 <eskinjp@gmail.com <mailto:eskinjp@gmail.com>>:
>> 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: user-unsubscribe@struts.apache.org <mailto:user-unsubscribe@struts.apache.org>
> For additional commands, e-mail: user-help@struts.apache.org <mailto:user-help@struts.apache.org>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message