org.obiba.magma.NoSuchValueSetException: No ValueSet in table 'keys' for entity 'entity[Participant:4719944893]'

JIRA | Philippe Laflamme | 7 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Running concurrent imports is possible by submitting multiple import jobs. The problem is with concurrent participant keys insert and lookup. Here is the sequence: T1: Thread 1 starts importing (and creating participant keys) T2: Thread 2 starts importing (and creating participant keys) T3: Thread 1 commits its data (with keys) T4: Thread 2 reads the ValueSet for an entity that Thread 1 created during its import: NoSuchValueSetException is thrown The trace may differ slightly, but will happen when Thread 2 tries to iterate on the value sets in the keys table. The ValueTable is in an inconsistent state: it returns a VariableEntity for which it cannot return a ValueSet. org.obiba.magma.NoSuchValueSetException: No ValueSet in table 'keys' for entity 'entity[Participant:4719944893]' at org.obiba.magma.datasource.hibernate.HibernateValueTable.getValueSet(HibernateValueTable.java:75) at org.obiba.magma.support.AbstractValueTable$1.apply(AbstractValueTable.java:74) at org.obiba.magma.support.AbstractValueTable$1.apply(AbstractValueTable.java:71) at com.google.common.collect.Iterators$8.next(Iterators.java:697) at org.obiba.opal.core.service.impl.OpalPrivateVariableEntityMap.publicEntity(OpalPrivateVariableEntityMap.java:69) at org.obiba.opal.core.magma.PrivateVariableEntityValueTable$1.apply(PrivateVariableEntityValueTable.java:75) at org.obiba.opal.core.magma.PrivateVariableEntityValueTable$1.apply(PrivateVariableEntityValueTable.java:1) at org.obiba.magma.views.ValueSetWrapper.getVariableEntity(ValueSetWrapper.java:27) at org.obiba.magma.support.DatasourceCopier$LoggingListener.onValueSetCopy(DatasourceCopier.java:352) at org.obiba.magma.support.DatasourceCopier.notifyListeners(DatasourceCopier.java:273) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:200) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:180) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:160) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:152) at org.obiba.opal.core.service.impl.DefaultImportService.copyPublicViewToDestinationDatasource(DefaultImportService.java:193) at org.obiba.opal.core.service.impl.DefaultImportService.copyParticipants(DefaultImportService.java:154) at org.obiba.opal.core.service.impl.DefaultImportService.copyValueTables(DefaultImportService.java:134) at org.obiba.opal.core.service.impl.DefaultImportService.copyToDestinationDatasource(DefaultImportService.java:125) at org.obiba.opal.core.service.impl.DefaultImportService.importData(DefaultImportService.java:118) at org.obiba.opal.core.service.impl.DefaultImportService.importData(DefaultImportService.java:100) 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.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy44.importData(Unknown Source) at org.obiba.opal.shell.commands.ImportCommand.importFiles(ImportCommand.java:95) at org.obiba.opal.shell.commands.ImportCommand.execute(ImportCommand.java:52) at org.obiba.opal.shell.CommandJob.run(CommandJob.java:109) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619)

    JIRA | 7 years ago | Philippe Laflamme
    org.obiba.magma.NoSuchValueSetException: No ValueSet in table 'keys' for entity 'entity[Participant:4719944893]'
  2. 0

    Running concurrent imports is possible by submitting multiple import jobs. The problem is with concurrent participant keys insert and lookup. Here is the sequence: T1: Thread 1 starts importing (and creating participant keys) T2: Thread 2 starts importing (and creating participant keys) T3: Thread 1 commits its data (with keys) T4: Thread 2 reads the ValueSet for an entity that Thread 1 created during its import: NoSuchValueSetException is thrown The trace may differ slightly, but will happen when Thread 2 tries to iterate on the value sets in the keys table. The ValueTable is in an inconsistent state: it returns a VariableEntity for which it cannot return a ValueSet. org.obiba.magma.NoSuchValueSetException: No ValueSet in table 'keys' for entity 'entity[Participant:4719944893]' at org.obiba.magma.datasource.hibernate.HibernateValueTable.getValueSet(HibernateValueTable.java:75) at org.obiba.magma.support.AbstractValueTable$1.apply(AbstractValueTable.java:74) at org.obiba.magma.support.AbstractValueTable$1.apply(AbstractValueTable.java:71) at com.google.common.collect.Iterators$8.next(Iterators.java:697) at org.obiba.opal.core.service.impl.OpalPrivateVariableEntityMap.publicEntity(OpalPrivateVariableEntityMap.java:69) at org.obiba.opal.core.magma.PrivateVariableEntityValueTable$1.apply(PrivateVariableEntityValueTable.java:75) at org.obiba.opal.core.magma.PrivateVariableEntityValueTable$1.apply(PrivateVariableEntityValueTable.java:1) at org.obiba.magma.views.ValueSetWrapper.getVariableEntity(ValueSetWrapper.java:27) at org.obiba.magma.support.DatasourceCopier$LoggingListener.onValueSetCopy(DatasourceCopier.java:352) at org.obiba.magma.support.DatasourceCopier.notifyListeners(DatasourceCopier.java:273) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:200) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:180) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:160) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:152) at org.obiba.opal.core.service.impl.DefaultImportService.copyPublicViewToDestinationDatasource(DefaultImportService.java:193) at org.obiba.opal.core.service.impl.DefaultImportService.copyParticipants(DefaultImportService.java:154) at org.obiba.opal.core.service.impl.DefaultImportService.copyValueTables(DefaultImportService.java:134) at org.obiba.opal.core.service.impl.DefaultImportService.copyToDestinationDatasource(DefaultImportService.java:125) at org.obiba.opal.core.service.impl.DefaultImportService.importData(DefaultImportService.java:118) at org.obiba.opal.core.service.impl.DefaultImportService.importData(DefaultImportService.java:100) 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.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy44.importData(Unknown Source) at org.obiba.opal.shell.commands.ImportCommand.importFiles(ImportCommand.java:95) at org.obiba.opal.shell.commands.ImportCommand.execute(ImportCommand.java:52) at org.obiba.opal.shell.CommandJob.run(CommandJob.java:109) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619)

    JIRA | 7 years ago | Philippe Laflamme
    org.obiba.magma.NoSuchValueSetException: No ValueSet in table 'keys' for entity 'entity[Participant:4719944893]'

    Root Cause Analysis

    1. org.obiba.magma.NoSuchValueSetException

      No ValueSet in table 'keys' for entity 'entity[Participant:4719944893]'

      at org.obiba.magma.datasource.hibernate.HibernateValueTable.getValueSet()
    2. org.obiba.magma
      AbstractValueTable$1.apply
      1. org.obiba.magma.datasource.hibernate.HibernateValueTable.getValueSet(HibernateValueTable.java:75)
      2. org.obiba.magma.support.AbstractValueTable$1.apply(AbstractValueTable.java:74)
      3. org.obiba.magma.support.AbstractValueTable$1.apply(AbstractValueTable.java:71)
      3 frames
    3. Guava
      Iterators$8.next
      1. com.google.common.collect.Iterators$8.next(Iterators.java:697)
      1 frame
    4. org.obiba.opal
      PrivateVariableEntityValueTable$1.apply
      1. org.obiba.opal.core.service.impl.OpalPrivateVariableEntityMap.publicEntity(OpalPrivateVariableEntityMap.java:69)
      2. org.obiba.opal.core.magma.PrivateVariableEntityValueTable$1.apply(PrivateVariableEntityValueTable.java:75)
      3. org.obiba.opal.core.magma.PrivateVariableEntityValueTable$1.apply(PrivateVariableEntityValueTable.java:1)
      3 frames
    5. org.obiba.magma
      DatasourceCopier.copy
      1. org.obiba.magma.views.ValueSetWrapper.getVariableEntity(ValueSetWrapper.java:27)
      2. org.obiba.magma.support.DatasourceCopier$LoggingListener.onValueSetCopy(DatasourceCopier.java:352)
      3. org.obiba.magma.support.DatasourceCopier.notifyListeners(DatasourceCopier.java:273)
      4. org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:200)
      5. org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:180)
      6. org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:160)
      7. org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:152)
      7 frames
    6. org.obiba.opal
      DefaultImportService.importData
      1. org.obiba.opal.core.service.impl.DefaultImportService.copyPublicViewToDestinationDatasource(DefaultImportService.java:193)
      2. org.obiba.opal.core.service.impl.DefaultImportService.copyParticipants(DefaultImportService.java:154)
      3. org.obiba.opal.core.service.impl.DefaultImportService.copyValueTables(DefaultImportService.java:134)
      4. org.obiba.opal.core.service.impl.DefaultImportService.copyToDestinationDatasource(DefaultImportService.java:125)
      5. org.obiba.opal.core.service.impl.DefaultImportService.importData(DefaultImportService.java:118)
      6. org.obiba.opal.core.service.impl.DefaultImportService.importData(DefaultImportService.java:100)
      6 frames
    7. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    8. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
      2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      3 frames
    9. Spring Tx
      TransactionInterceptor.invoke
      1. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
      1 frame
    10. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
      2 frames
    11. Unknown
      $Proxy44.importData
      1. $Proxy44.importData(Unknown Source)
      1 frame
    12. org.obiba.opal
      CommandJob.run
      1. org.obiba.opal.shell.commands.ImportCommand.importFiles(ImportCommand.java:95)
      2. org.obiba.opal.shell.commands.ImportCommand.execute(ImportCommand.java:52)
      3. org.obiba.opal.shell.CommandJob.run(CommandJob.java:109)
      3 frames
    13. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      3. java.lang.Thread.run(Thread.java:619)
      3 frames