The server has encountered an error.

0

Hi,

I hope someone can help me. I have a star schema in Redshift on AWS. The dimensions and facts are views upon a datawarehouse (tables). I have made a data source in Jaspersoft, which is connecting to Redshift and it works fine. In the domain I created I have 4 dimensions and 1 fact. The dimension which is giving the trouble is about human resources (persons). When ever I combine this dimension with the fact creating a new ad-hoc report I get the error below. The other dimensions don't give this problem. When I use only the dimension about human resources, not other dimensions or fact then I also don't get the error. I even shortened the long name of the dimension, but it doesn't seem to be the problem.

In this example I only used the fact and the problem dimension. The views in Redshift are all built the same way. It is in a development environment and there are only a few records, but it should deliver 1 record. If I run the query in SQL Workbench/J against Redshift it runs just fine and comes up with the 1 record I was expecting.

Error Message

java.lang.RuntimeException: exception getting dataset from cache

Error Trace

java.lang.RuntimeException: exception getting dataset from cache
 at com.jaspersoft.commons.semantic.dsimpl.memory.MemoryDataSet.getWorkingDataSet(MemoryDataSet.java:184)
 at com.jaspersoft.ji.adhoc.strategy.CommonDomainDataStrategy.getWorkingDataSet(CommonDomainDataStrategy.java:1075)
 at com.jaspersoft.ji.adhoc.strategy.CommonDomainDataStrategy.getWorkingDataSet(CommonDomainDataStrategy.java:1026)
 at com.jaspersoft.ji.adhoc.InteractiveDataLayoutEngine.initWorkingDataSet(InteractiveDataLayoutEngine.java:350)
 at com.jaspersoft.ji.adhoc.InteractiveTableEngine.initWorkingDataSet(InteractiveTableEngine.java:406)
 at com.jaspersoft.ji.adhoc.InteractiveTableEngine.populateViewModel(InteractiveTableEngine.java:80)
 at com.jaspersoft.ji.adhoc.InteractiveTableEngine.generateViewModel(InteractiveTableEngine.java:369)
 at com.jaspersoft.ji.adhoc.action.AdhocAction.setReportModelInContext(AdhocAction.java:1495)
 at com.jaspersoft.ji.adhoc.action.AdhocAction.view(AdhocAction.java:593)
 at com.jaspersoft.ji.adhoc.action.AdhocAction.initForQueryBuilder(AdhocAction.java:504)
 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:597)
 at org.springframework.webflow.action.DispatchMethodInvoker.invoke(DispatchMethodInvoker.java:98)
 at org.springframework.webflow.action.MultiAction.doExecute(MultiAction.java:123)
 at org.springframework.webflow.action.AbstractAction.execute(AbstractAction.java:188)
 at org.springframework.webflow.execution.ActionExecutor.execute(ActionExecutor.java:51)
 at org.springframework.webflow.action.EvaluateAction.doExecute(EvaluateAction.java:77)
 at org.springframework.webflow.action.AbstractAction.execute(AbstractAction.java:188)
 at org.springframework.webflow.execution.AnnotatedAction.execute(AnnotatedAction.java:145)
 at org.springframework.webflow.execution.ActionExecutor.execute(ActionExecutor.java:51)
 at org.springframework.webflow.engine.ActionState.doEnter(ActionState.java:101)
 at org.springframework.webflow.engine.State.enter(State.java:194)
 at org.springframework.webflow.engine.Transition.execute(Transition.java:227)
 at org.springframework.webflow.engine.impl.FlowExecutionImpl.execute(FlowExecutionImpl.java:393)
 at org.springframework.webflow.engine.impl.RequestControlContextImpl.execute(RequestControlContextImpl.java:214)
 at org.springframework.webflow.engine.TransitionableState.handleEvent(TransitionableState.java:119)
 at org.springframework.webflow.engine.SubflowState.handleEvent(SubflowState.java:116)
 at org.springframework.webflow.engine.Flow.handleEvent(Flow.java:555)
 at org.springframework.webflow.engine.impl.FlowExecutionImpl.handleEvent(FlowExecutionImpl.java:388)
 at org.springframework.webflow.engine.impl.RequestControlContextImpl.handleEvent(RequestControlContextImpl.java:210)
 at org.springframework.webflow.engine.impl.FlowExecutionImpl.endActiveFlowSession(FlowExecutionImpl.java:412)
 at org.springframework.webflow.engine.impl.RequestControlContextImpl.endActiveFlowSession(RequestControlContextImpl.java:238)
 at org.springframework.webflow.engine.EndState.doEnter(EndState.java:107)
 at org.springframework.webflow.engine.State.enter(State.java:194)
 at org.springframework.webflow.engine.Transition.execute(Transition.java:227)
 at org.springframework.webflow.engine.impl.FlowExecutionImpl.execute(FlowExecutionImpl.java:393)
 at org.springframework.webflow.engine.impl.RequestControlContextImpl.execute(RequestControlContextImpl.java:214)
 at org.springframework.webflow.engine.TransitionableState.handleEvent(TransitionableState.java:119)
 at org.springframework.webflow.engine.Flow.handleEvent(Flow.java:555)
 at org.springframework.webflow.engine.impl.FlowExecutionImpl.handleEvent(FlowExecutionImpl.java:388)
 at org.springframework.webflow.engine.impl.RequestControlContextImpl.handleEvent(RequestControlContextImpl.java:210)
 at org.springframework.webflow.engine.ViewState.handleEvent(ViewState.java:232)
 at org.springframework.webflow.engine.ViewState.resume(ViewState.java:196)
 at org.springframework.webflow.engine.Flow.resume(Flow.java:545)
 at org.springframework.webflow.engine.impl.FlowExecutionImpl.resume(FlowExecutionImpl.java:261)
 at org.springframework.webflow.executor.FlowExecutorImpl.resumeExecution(FlowExecutorImpl.java:169)
 at sun.reflect.GeneratedMethodAccessor334.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318)
 at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
 at org.springframework.security.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:66)
 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
 at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
 at $Proxy143.resumeExecution(Unknown Source)
 at org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:183)
 at org.springframework.webflow.mvc.servlet.FlowController.handleRequest(FlowController.java:174)
 at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
 at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:900)
 at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:827)
 at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
 at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
 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.StaticFilesCacheControlFilter.doFilter(StaticFilesCacheControlFilter.java:112)
 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:399)
 at com.jaspersoft.jasperserver.api.security.IPadSupportFilter.doFilter(IPadSupportFilter.java:67)
 at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)
 at com.jaspersoft.jasperserver.api.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:411)
 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:411)
 at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
 at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
 at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
 at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
 at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)
 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:411)
 at com.jaspersoft.jasperserver.war.util.RequestParameterAuthenticationFilter.doFilter(RequestParameterAuthenticationFilter.java:94)
 at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
 at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
 at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)
 at com.jaspersoft.jasperserver.multipleTenancy.MTBasicProcessingFilter.doFilterHttp(MTBasicProcessingFilter.java:182)
 at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
 at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)
 at com.jaspersoft.jasperserver.war.UserPreferencesFilter.doFilter(UserPreferencesFilter.java:209)
 at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)
 at org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:278)
 at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
 at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
 at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
 at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)
 at com.jaspersoft.ji.license.LicenseCheckFilter.doFilter(LicenseCheckFilter.java:96)
 at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)
 at com.jaspersoft.ji.license.JILicenseFilter.doFilter(JILicenseFilter.java:67)
 at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)
 at com.jaspersoft.jasperserver.war.UserPreferencesFilter.doFilter(UserPreferencesFilter.java:209)
 at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)
 at com.jaspersoft.jasperserver.api.logging.filter.BasicLoggingFilter.doFilter(BasicLoggingFilter.java:53)
 at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)
 at com.jaspersoft.jasperserver.api.security.JSCsrfGuardFilter.doFilter(JSCsrfGuardFilter.java:83)
 at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)
 at com.jaspersoft.jasperserver.api.security.WebAppSecurityFilter.doFilter(WebAppSecurityFilter.java:76)
 at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)
 at com.jaspersoft.jasperserver.war.MultipartRequestWrapperFilter.doFilter(MultipartRequestWrapperFilter.java:90)
 at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)
 at com.jaspersoft.jasperserver.api.security.encryption.EncryptionFilter.doFilter(EncryptionFilter.java:130)
 at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)
 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:411)
 at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:188)
 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.SessionDecoratorFilter.doFilter(SessionDecoratorFilter.java:43)
 at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
 at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
 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:346)
 at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
 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.P3PFilter.doFilter(P3PFilter.java:43)
 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:558)
 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:859)
 at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
 at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
 at java.lang.Thread.run(Thread.java:619) Caused by: com.jaspersoft.commons.dataset.DataSetException: exception fetching from cache
 at com.jaspersoft.commons.datarator.BaseDataSetCacheImpl.getWorkingDataSet(BaseDataSetCacheImpl.java:142)
 at com.jaspersoft.commons.semantic.dsimpl.memory.MemoryDataSet.getWorkingDataSet(MemoryDataSet.java:97)
 ... 149 more 
 
Caused by: com.jaspersoft.jasperserver.api.JSException: ADH_1009_SQL_GENERATE_ERROR
 at com.jaspersoft.ji.adhoc.strategy.CommonDomainDataStrategy$CacheListener.stateChanged(CommonDomainDataStrategy.java:1121)
 at com.jaspersoft.commons.datarator.CachedData.setState(CachedData.java:187)
 at com.jaspersoft.commons.datarator.CachedData.setThrowable(CachedData.java:199)
 at com.jaspersoft.commons.datarator.CachedData.fetchData(CachedData.java:169)
 at com.jaspersoft.commons.datarator.BaseDataSetCacheImpl.getWorkingDataSet(BaseDataSetCacheImpl.java:139)
 ... 150 more 
 
Caused by: com.jaspersoft.commons.dataset.DataSetException:
 Exception calling JRDataSource.next() for query 
      select "public_fact_assignment"."assignment_date"
          as "public_fact_assignment_assignment_date", "public_fact_assignment"."assignment_id"
          as "public_fact_assignment_assignment_id", "public_fact_assignment"."customer_id"
          as "public_fact_assignment_customer_id", "public_fact_assignment"."human_resource_id"
          as "public_fact_assignment_human_resource_id", "public_fact_assignment"."supplier_id"
          as "public_fact_assignment_supplier_id", "public_fact_assignment"."time_id"
          as "public_fact_assignment_time_id", "public_dim_hr"."formatted_name"
          as "public_dim_hr_formatted_name", "public_dim_hr"."h_human_resource_id"
          as "public_dim_hr_h_human_resource_id", "public_dim_hr"."h_human_resource_sid"
          as "public_dim_hr_h_human_resource_sid"
        from "public"."fact_assignment" "public_fact_assignment"
  inner join "public"."dim_hr" "public_dim_hr"
          on ("public_fact_assignment"."human_resource_id" = "public_dim_hr"."h_human_resource_sid")
       limit 200001
 
 at com.jaspersoft.commons.semantic.dsimpl.JRQueryDataSet$JRDataSetIterator.next(JRQueryDataSet.java:317)
 at com.jaspersoft.commons.datarator.CachedData.fetchData(CachedData.java:135) ... 151 more Caused by: net.sf.jasperreports.engine.JRException: Error executing SQL statement for : null
 at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource(JRJdbcQueryExecuter.java:240)
 at com.jaspersoft.jasperserver.api.engine.jasperreports.util.JRTimezoneJdbcQueryExecuter.createDatasource(JRTimezoneJdbcQueryExecuter.java:168)
 at com.jaspersoft.commons.util.JSControlledJdbcQueryExecuter.createDatasource(JSControlledJdbcQueryExecuter.java:113)
 at com.jaspersoft.commons.semantic.dsimpl.JRQueryDataSet.getJRDataSource(JRQueryDataSet.java:190)
 at com.jaspersoft.commons.semantic.dsimpl.JRQueryDataSet.access$100(JRQueryDataSet.java:51)
 at com.jaspersoft.commons.semantic.dsimpl.JRQueryDataSet$JRDataSetIterator.next(JRQueryDataSet.java:308) ... 152 more Caused by: org.postgresql.util.PSQLException: ERROR: transaction is read-only Detail:
 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157)
 at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886)
 at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
 at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555)
 at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)
 at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:302)
 at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92)
 at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource(JRJdbcQueryExecuter.java:233)
 ... 157 more

patrick.dewitt's picture
Joined: Jun 19 2013 - 6:17am
Last seen: 1 year 8 months ago

1 Answer:

0

Hi,

I solved the problem. Another issue from 2008 gave me the solution. It was about getting the newest driver for postgreSQL. I am using Jaspersoft Server 5.2 and the old driver was "postgresql-9.2-1002.jdbc4.jar". The new driver I installed is "postgresql-9.2-1003.jdbc4.jar". It works fine now.

patrick.dewitt's picture
Joined: Jun 19 2013 - 6:17am
Last seen: 1 year 8 months ago

Glad to see that you solved the problem. Thanks for the follow up post with the solution!

Mary Flynn
Jaspersoft

mmflynn - 5 years 12 months ago
Feedback
randomness