OHDSI Home | Forums | Wiki | Github

WebAPI 2.2.7 cant query from concept_hierarchy when using BigQuery


(Javier Gracia-Tabuenca) #1

We are getting the attached error when intialising webAPI

SimbaJDBCDriverforGoogleBigQuery42_1.2.4.1007
WebAPI 2.7.7
Atlas 2.7.7
Synpuf1k v5.3.1
3 schemas in BigQuery 1:cdm+vocab 2:results 3:tmp

2020-08-24 08:19:59.731 ERROR http-nio-8080-exec-2 org.ohdsi.webapi.util.GenericExceptionMapper -  - org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [select
  concept_hierarchy.concept_id,
  concat(
    IFNULL(concept_hierarchy.level4_concept_name,'NA'), '||',
    IFNULL(concept_hierarchy.level3_concept_name,'NA'), '||',
    IFNULL(concept_hierarchy.level2_concept_name,'NA'), '||',
    IFNULL(concept_hierarchy.level2_concept_name,'NA'), '||',
    IFNULL(concept_hierarchy.concept_name,'NA')
  ) as concept_path,
  ar1.count_value                                     as num_persons,
  round(1.0 * ar1.count_value / denom.count_value, 5) as percent_persons,
  round(1.0 * ar2.count_value / ar1.count_value, 5)   as records_per_person
from (select *
      from finngen_omop_result.achilles_results where analysis_id = 400) ar1
  inner join
  (select *
   from finngen_omop_result.achilles_results where analysis_id = 401) ar2
    on ar1.stratum_1 = ar2.stratum_1
  inner join
  finngen_omop_result.concept_hierarchy concept_hierarchy
    on cast(case when CASE WHEN SAFE_CAST(ar1.stratum_1 AS FLOAT64) IS NULL THEN 0 ELSE 1 END = 1 then ar1.stratum_1 else null end  as int64) = concept_hierarchy.concept_id
    and concept_hierarchy.treemap='Condition'
,
  (select count_value
   from finngen_omop_result.achilles_results where analysis_id = 1) denom

order by ar1.count_value desc]; [Simba][JDBC](11300) A ResultSet was expected but not generated from query "select
  concept_hierarchy.concept_id,
  concat(
    IFNULL(concept_hierarchy.level4_concept_name,'NA'), '||',
    IFNULL(concept_hierarchy.level3_concept_name,'NA'), '||',
    IFNULL(concept_hierarchy.level2_concept_name,'NA'), '||',
    IFNULL(concept_hierarchy.level2_concept_name,'NA'), '||',
    IFNULL(concept_hierarchy.concept_name,'NA')
  ) as concept_path,
  ar1.count_value                                     as num_persons,
  round(1.0 * ar1.count_value / denom.count_value, 5) as percent_persons,
  round(1.0 * ar2.count_value / ar1.count_value, 5)   as records_per_person
from (select *
      from finngen_omop_result.achilles_results where analysis_id = 400) ar1
  inner join
  (select *
   from finngen_omop_result.achilles_results where analysis_id = 401) ar2
    on ar1.stratum_1 = ar2.stratum_1
  inner join
  finngen_omop_result.concept_hierarchy concept_hierarchy
    on cast(case when CASE WHEN SAFE_CAST(ar1.stratum_1 AS FLOAT64) IS NULL THEN 0 ELSE 1 END = 1 then ar1.stratum_1 else null end  as int64) = concept_hierarchy.concept_id
    and concept_hierarchy.treemap='Condition'
,
  (select count_value
   from finngen_omop_result.achilles_results where analysis_id = 1) denom

order by ar1.count_value desc". Query not executed. ; nested exception is java.sql.SQLDataException: [Simba][JDBC](11300) A ResultSet was expected but not generated from query "select
  concept_hierarchy.concept_id,
  concat(
    IFNULL(concept_hierarchy.level4_concept_name,'NA'), '||',
    IFNULL(concept_hierarchy.level3_concept_name,'NA'), '||',
    IFNULL(concept_hierarchy.level2_concept_name,'NA'), '||',
    IFNULL(concept_hierarchy.level2_concept_name,'NA'), '||',
    IFNULL(concept_hierarchy.concept_name,'NA')
  ) as concept_path,
  ar1.count_value                                     as num_persons,
  round(1.0 * ar1.count_value / denom.count_value, 5) as percent_persons,
  round(1.0 * ar2.count_value / ar1.count_value, 5)   as records_per_person
from (select *
      from finngen_omop_result.achilles_results where analysis_id = 400) ar1
  inner join
  (select *
   from finngen_omop_result.achilles_results where analysis_id = 401) ar2
    on ar1.stratum_1 = ar2.stratum_1
  inner join
  finngen_omop_result.concept_hierarchy concept_hierarchy
    on cast(case when CASE WHEN SAFE_CAST(ar1.stratum_1 AS FLOAT64) IS NULL THEN 0 ELSE 1 END = 1 then ar1.stratum_1 else null end  as int64) = concept_hierarchy.concept_id
    and concept_hierarchy.treemap='Condition'
,
  (select count_value
   from finngen_omop_result.achilles_results where analysis_id = 1) denom

order by ar1.count_value desc". Query not executed. 
	at org.springframework.jdbc.support.SQLExceptionSubclassTranslator.doTranslate(SQLExceptionSubclassTranslator.java:82)
	at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73)
	at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:82)
	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:654)
	at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:688)
	at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:720)
	at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:770)
	at org.ohdsi.webapi.report.CDMResultsAnalysisRunner.getTreemap(CDMResultsAnalysisRunner.java:179)
	at org.ohdsi.webapi.service.CDMResultsService.getTreemap(CDMResultsService.java:293)
	at org.ohdsi.webapi.service.CDMResultsService$$FastClassBySpringCGLIB$$f65c71c1.invoke(<generated>)
	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:736)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
	at org.springframework.cache.jcache.interceptor.JCacheInterceptor$1.invoke(JCacheInterceptor.java:52)
	at org.springframework.cache.jcache.interceptor.JCacheAspectSupport.invokeOperation(JCacheAspectSupport.java:153)
	at org.springframework.cache.jcache.interceptor.JCacheAspectSupport$CacheOperationInvokerAdapter.invoke(JCacheAspectSupport.java:167)
	at org.springframework.cache.jcache.interceptor.CacheResultInterceptor.invoke(CacheResultInterceptor.java:62)
	at org.springframework.cache.jcache.interceptor.JCacheAspectSupport.execute(JCacheAspectSupport.java:123)
	at org.springframework.cache.jcache.interceptor.JCacheAspectSupport.execute(JCacheAspectSupport.java:102)
	at org.springframework.cache.jcache.interceptor.JCacheInterceptor.invoke(JCacheInterceptor.java:61)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:671)
	at org.ohdsi.webapi.service.CDMResultsService$$EnhancerBySpringCGLIB$$8e87a0c5.getTreemap(<generated>)
	at sun.reflect.GeneratedMethodAccessor343.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)
	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)
	at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:205)
	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
	at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326)
	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
	at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
	at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)
	at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)
	at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473)
	at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427)
	at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388)
	at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341)
	at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
	at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
	at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
	at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
	at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
	at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
	at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
	at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.ohdsi.webapi.shiro.filters.CacheFilter.doFilter(CacheFilter.java:30)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.ohdsi.webapi.shiro.filters.ExceptionHandlerFilter.doFilter(ExceptionHandlerFilter.java:28)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.boot.web.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:130)
	at org.springframework.boot.web.support.ErrorPageFilter.access$000(ErrorPageFilter.java:66)
	at org.springframework.boot.web.support.ErrorPageFilter$1.doFilterInternal(ErrorPageFilter.java:105)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.springframework.boot.web.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:123)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1589)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	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)
Caused by: java.sql.SQLDataException: [Simba][JDBC](11300) A ResultSet was expected but not generated from query "select
  concept_hierarchy.concept_id,
  concat(
    IFNULL(concept_hierarchy.level4_concept_name,'NA'), '||',
    IFNULL(concept_hierarchy.level3_concept_name,'NA'), '||',
    IFNULL(concept_hierarchy.level2_concept_name,'NA'), '||',
    IFNULL(concept_hierarchy.level2_concept_name,'NA'), '||',
    IFNULL(concept_hierarchy.concept_name,'NA')
  ) as concept_path,
  ar1.count_value                                     as num_persons,
  round(1.0 * ar1.count_value / denom.count_value, 5) as percent_persons,
  round(1.0 * ar2.count_value / ar1.count_value, 5)   as records_per_person
from (select *
      from finngen_omop_result.achilles_results where analysis_id = 400) ar1
  inner join
  (select *
   from finngen_omop_result.achilles_results where analysis_id = 401) ar2
    on ar1.stratum_1 = ar2.stratum_1
  inner join
  finngen_omop_result.concept_hierarchy concept_hierarchy
    on cast(case when CASE WHEN SAFE_CAST(ar1.stratum_1 AS FLOAT64) IS NULL THEN 0 ELSE 1 END = 1 then ar1.stratum_1 else null end  as int64) = concept_hierarchy.concept_id
    and concept_hierarchy.treemap='Condition'
,
  (select count_value
   from finngen_omop_result.achilles_results where analysis_id = 1) denom

order by ar1.count_value desc". Query not executed. 
	at com.simba.googlebigquery.exceptions.ExceptionConverter.toSQLException(Unknown Source)
	at com.simba.googlebigquery.jdbc.common.SStatement.checkCondition(Unknown Source)
	at com.simba.googlebigquery.jdbc.common.SPreparedStatement.executeWithParams(Unknown Source)
	at com.simba.googlebigquery.jdbc.common.SPreparedStatement.executeQuery(Unknown Source)
	at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:696)
Aug 24, 2020 8:19:59 AM org.glassfish.jersey.server.ServerRuntime$Responder mapException
	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:638)
	... 114 more

SEVERE: An exception has been thrown from an exception mapper class org.ohdsi.webapi.util.GenericExceptionMapper.
java.lang.NullPointerException
	at org.ohdsi.webapi.util.GenericExceptionMapper.toResponse(GenericExceptionMapper.java:50)
	at org.glassfish.jersey.server.ServerRuntime$Responder.mapException(ServerRuntime.java:601)
	at org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:476)
	at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:334)
	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
	at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
	at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)
	at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)
	at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473)
	at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427)
	at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388)
	at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341)
	at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
	at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
	at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
	at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
	at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
	at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
	at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
	at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.ohdsi.webapi.shiro.filters.CacheFilter.doFilter(CacheFilter.java:30)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.ohdsi.webapi.shiro.filters.ExceptionHandlerFilter.doFilter(ExceptionHandlerFilter.java:28)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.boot.web.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:130)
	at org.springframework.boot.web.support.ErrorPageFilter.access$000(ErrorPageFilter.java:66)
	at org.springframework.boot.web.support.ErrorPageFilter$1.doFilterInternal(ErrorPageFilter.java:105)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.springframework.boot.web.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:123)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1589)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	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)

Aug 24, 2020 8:19:59 AM org.glassfish.jersey.server.ServerRuntime$Responder mapException
SEVERE: An exception was not mapped due to exception mapper failure. The HTTP 500 response will be returned.
org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [select
  concept_hierarchy.concept_id,
  concat(
    IFNULL(concept_hierarchy.level4_concept_name,'NA'), '||',
    IFNULL(concept_hierarchy.level3_concept_name,'NA'), '||',
    IFNULL(concept_hierarchy.level2_concept_name,'NA'), '||',
    IFNULL(concept_hierarchy.level2_concept_name,'NA'), '||',
    IFNULL(concept_hierarchy.concept_name,'NA')
  ) as concept_path,
  ar1.count_value                                     as num_persons,
  round(1.0 * ar1.count_value / denom.count_value, 5) as percent_persons,
  round(1.0 * ar2.count_value / ar1.count_value, 5)   as records_per_person
from (select *
      from finngen_omop_result.achilles_results where analysis_id = 400) ar1
  inner join
  (select *
   from finngen_omop_result.achilles_results where analysis_id = 401) ar2
    on ar1.stratum_1 = ar2.stratum_1
  inner join
  finngen_omop_result.concept_hierarchy concept_hierarchy
    on cast(case when CASE WHEN SAFE_CAST(ar1.stratum_1 AS FLOAT64) IS NULL THEN 0 ELSE 1 END = 1 then ar1.stratum_1 else null end  as int64) = concept_hierarchy.concept_id
    and concept_hierarchy.treemap='Condition'
,
  (select count_value
   from finngen_omop_result.achilles_results where analysis_id = 1) denom

order by ar1.count_value desc]; [Simba][JDBC](11300) A ResultSet was expected but not generated from query "select
  concept_hierarchy.concept_id,
  concat(
    IFNULL(concept_hierarchy.level4_concept_name,'NA'), '||',
    IFNULL(concept_hierarchy.level3_concept_name,'NA'), '||',
    IFNULL(concept_hierarchy.level2_concept_name,'NA'), '||',
    IFNULL(concept_hierarchy.level2_concept_name,'NA'), '||',
    IFNULL(concept_hierarchy.concept_name,'NA')
  ) as concept_path,
  ar1.count_value                                     as num_persons,
  round(1.0 * ar1.count_value / denom.count_value, 5) as percent_persons,
  round(1.0 * ar2.count_value / ar1.count_value, 5)   as records_per_person
from (select *
      from finngen_omop_result.achilles_results where analysis_id = 400) ar1
  inner join
  (select *
   from finngen_omop_result.achilles_results where analysis_id = 401) ar2
    on ar1.stratum_1 = ar2.stratum_1
  inner join
  finngen_omop_result.concept_hierarchy concept_hierarchy
    on cast(case when CASE WHEN SAFE_CAST(ar1.stratum_1 AS FLOAT64) IS NULL THEN 0 ELSE 1 END = 1 then ar1.stratum_1 else null end  as int64) = concept_hierarchy.concept_id
    and concept_hierarchy.treemap='Condition'
,
  (select count_value
   from finngen_omop_result.achilles_results where analysis_id = 1) denom

order by ar1.count_value desc". Query not executed. ; nested exception is java.sql.SQLDataException: [Simba][JDBC](11300) A ResultSet was expected but not generated from query "select
  concept_hierarchy.concept_id,
  concat(
    IFNULL(concept_hierarchy.level4_concept_name,'NA'), '||',
    IFNULL(concept_hierarchy.level3_concept_name,'NA'), '||',
    IFNULL(concept_hierarchy.level2_concept_name,'NA'), '||',
    IFNULL(concept_hierarchy.level2_concept_name,'NA'), '||',
    IFNULL(concept_hierarchy.concept_name,'NA')
  ) as concept_path,
  ar1.count_value                                     as num_persons,
  round(1.0 * ar1.count_value / denom.count_value, 5) as percent_persons,
  round(1.0 * ar2.count_value / ar1.count_value, 5)   as records_per_person
from (select *
      from finngen_omop_result.achilles_results where analysis_id = 400) ar1
  inner join
  (select *
   from finngen_omop_result.achilles_results where analysis_id = 401) ar2
    on ar1.stratum_1 = ar2.stratum_1
  inner join
  finngen_omop_result.concept_hierarchy concept_hierarchy
    on cast(case when CASE WHEN SAFE_CAST(ar1.stratum_1 AS FLOAT64) IS NULL THEN 0 ELSE 1 END = 1 then ar1.stratum_1 else null end  as int64) = concept_hierarchy.concept_id
    and concept_hierarchy.treemap='Condition'
,
  (select count_value
   from finngen_omop_result.achilles_results where analysis_id = 1) denom

order by ar1.count_value desc". Query not executed. 
	at org.springframework.jdbc.support.SQLExceptionSubclassTranslator.doTranslate(SQLExceptionSubclassTranslator.java:82)
	at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73)
	at 

(Konstantin Yaroshovets) #2

Hi Javier,

The problem is with latest BigQury driver v1.2.4. We reported this issue already. I would recommend to take older driver version v1.2.0 - v1.2.2


(Javier Gracia-Tabuenca) #3

thank so much @Konstantin_Yaroshove,
That solved the problem


(Konstantin Yaroshovets) #4

@Javier I just got an update that new version of BigQuery driver was released
https://cloud.google.com/bigquery/providers/simba-drivers

You can use it in combination with WebAPI branch for v2.7.8

It will fix the problem.


t