Jump to content

error because of a cascaded input control


terco

Recommended Posts

Hello,

I am getting an error on JR Server 4.0.0 with a cascaded input control which queries a table that references itself.
A good example of such a table would be PERSON which has an forein key to itself to represent a parent.

In this input control I need to display the parents, from which the user can choose from.
The parents should appear according to another input parameter, let's call it CITY:
so all parents from people living in the city which is auto-selected (default) when Jasper Server first build
(after clicking on the report name) should be listed and later, if the city is changed, change accordingly.

Some interesting facts which may answer first questions:
1- I have other input controls which depend on (cascaded from) CITY: they do not generate any errors + react as expected.
The only difference I can see with the "parents input control" is, as said above, that it comes from a table which references itself and the query for the input control uses that self referencing key.
2- If I take out the cascade part of the "parent input control query" (e.g. here ... where city = $P{CITY}...) the report runs fine.
3- The report runs fine in iReport (even if I cannot test the cascading feature there).
4- From iReport, using the feature "Run JasperServer Report", it doesn't work because starting with the fifth (I have 7 or 8) input control: they have no data and are mandatory. No mather if I include the parents input control or not (bug?).
5- I tested the query directly to the database in a sql-ide replacing the $P{CITY} with the default city and got the expected result (331 records).

The error-window which pops up after clicking on the report name in JasperReports Servers says "Error". The header of that window says (translated to english something like) "The page with the address http://localhost:8989 reports:".

The log file Tomcat6_0webappsjasperserverWEB-INFlogsjasperserver.log says:
 

2011-03-25 07:38:06,093  WARN LoggerListener,http-8989-1:60 - Authentication event AuthenticationSuccessEvent: jasperadmin; details: org.springframework.security.ui.WebAuthenticationDetails@fffe3f86: RemoteIpAddress: 127.0.0.1; SessionId: 49B4F799F481AA07FEA309F80F3B8F45
2011-03-25 07:38:06,093  WARN LoggerListener,http-8989-1:60 - Authentication event InteractiveAuthenticationSuccessEvent: jasperadmin; details: org.springframework.security.ui.WebAuthenticationDetails@fffe3f86: RemoteIpAddress: 127.0.0.1; SessionId: 49B4F799F481AA07FEA309F80F3B8F45
2011-03-25 07:38:24,703  WARN DefaultRemoter,http-8989-3:67 - Method execution failed:
java.lang.NullPointerException
    at com.jaspersoft.jasperserver.war.cascade.token.TokenControlLogic.isQueryResultsDifferent(TokenControlLogic.java:527)
    at com.jaspersoft.jasperserver.war.cascade.token.TokenControlLogic.executeQuery(TokenControlLogic.java:415)
    at com.jaspersoft.jasperserver.war.cascade.token.TokenControlLogic.processEnvelope(TokenControlLogic.java:190)
    at com.jaspersoft.jasperserver.war.cascade.token.TokenControlLogic.handleEvents(TokenControlLogic.java:167)
    at com.jaspersoft.jasperserver.war.cascade.token.TokenControlLogic.initialize(TokenControlLogic.java:118)
    at com.jaspersoft.jasperserver.war.cascade.ControlLogicDelegator.initialize(ControlLogicDelegator.java:102)
    at com.jaspersoft.jasperserver.war.cascade.CascadeDirector.initialize(CascadeDirector.java:40)
    at com.jaspersoft.jasperserver.war.cascade.CascadeDirector$$FastClassByCGLIB$$cb78188c.invoke(<generated>)
    at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191)
    at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:700)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
    at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:635)
    at com.jaspersoft.jasperserver.war.cascade.CascadeDirector$$EnhancerByCGLIB$$a83c548.initialize(<generated>)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:592)
    at org.directwebremoting.impl.ExecuteAjaxFilter.doFilter(ExecuteAjaxFilter.java:34)
    at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:428)
    at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:431)
    at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:283)
    at org.directwebremoting.servlet.PlainCallHandler.handle(PlainCallHandler.java:52)
    at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:101)
    at org.directwebremoting.spring.DwrSpringServlet.doPost(DwrSpringServlet.java:158)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.jaspersoft.jasperserver.war.common.UploadMultipartFilter.doFilter(UploadMultipartFilter.java:83)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
    at com.jaspersoft.jasperserver.war.security.JSSwitchUserProcessingFilter.doFilterHttp(JSSwitchUserProcessingFilter.java:154)
    at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
    at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
    at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    at org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105)
    at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    at com.jaspersoft.jasperserver.api.metadata.user.service.impl.MetadataAuthenticationProcessingFilter.doFilter(MetadataAuthenticationProcessingFilter.java:139)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    at com.jaspersoft.jasperserver.war.util.RequestParameterAuthenticationFilter.doFilter(RequestParameterAuthenticationFilter.java:97)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    at org.springframework.security.ui.basicauth.BasicProcessingFilter.doFilterHttp(BasicProcessingFilter.java:174)
    at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    at com.jaspersoft.jasperserver.war.UserPreferencesFilter.doFilter(UserPreferencesFilter.java:184)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    at org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:277)
    at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    at com.jaspersoft.jasperserver.war.UserPreferencesFilter.doFilter(UserPreferencesFilter.java:184)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    at com.jaspersoft.jasperserver.api.logging.filter.BasicLoggingFilter.doFilter(BasicLoggingFilter.java:53)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
    at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:175)
    at org.springframework.security.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:99)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.jaspersoft.jasperserver.war.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:67)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:236)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:563)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:864)
    at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
    at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1600)
    at java.lang.Thread.run(Thread.java:595)
2011-03-25 07:38:24,718  WARN BaseCallMarshaller,http-8989-3:59 - --Erroring: batchId[0] message[java.lang.NullPointerException]

 
I have activated
log4j.logger.net.sf.jasperreports.engine.query.JRJdbcQueryExecuter=debug
and can see in the logs that the query and the parameters are ok!

Any idea or solution approach very welcome

 

System-spec:

- Locally (PC) installed JasperReport Server CP with the installer: jasperreports-server-cp-4.0.0-windows-installer.exe.

- Tomcat 6 installed before JR.

- JRS database = MySQL intalled during JRS installation.

- Reporting database = Oracle 11g (in a server).

- Windows XP SP2

 

Thanks



Post Edited by terco at 03/28/2011 08:08
Link to comment
Share on other sites

  • 1 month later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

in case someone gets a similar error:

this one was the input control query which returned a "null" within the results. An extention in the where clause: "... and t1.col1 is not null" solved the problem.



Post Edited by terco at 08/02/2011 10:57
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...