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

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • 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)
    via by Philippe Laflamme,
  • 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)
    via by Philippe Laflamme,
    • 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)
    No Bugmate found.