java.lang.RuntimeException: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1

JIRA | Carlos Silva | 2 years ago
  1. 0

    When we import a table/view and it contains for a variable multiple labels for the same category value, Magma fails with a IndexOutOfBoundsException. Opal doesn't allow multiple labels for the same category in the GUI editor, and this variable was created in Mica. This should fail in Magma, but with more accurate exception and clear message, like IllegalArgumentException("Multiple labels found for category value xxx"). {code} 7047449 [pool-1-thread-7] ERROR org.obiba.opal.shell.commands.ImportCommand - Runtime error while importing data java.lang.RuntimeException: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 at org.obiba.opal.core.service.DataImportServiceImpl.copyValueTables(DataImportServiceImpl.java:143) at org.obiba.opal.core.service.DataImportServiceImpl.importData(DataImportServiceImpl.java:105) at org.obiba.opal.core.service.DataImportServiceImpl.importData(DataImportServiceImpl.java:87) at org.obiba.opal.shell.commands.ImportCommand.importFromTables(ImportCommand.java:155) at org.obiba.opal.shell.commands.ImportCommand.executeImports(ImportCommand.java:89) at org.obiba.opal.shell.commands.ImportCommand.execute(ImportCommand.java:68) at org.obiba.opal.shell.CommandJob.run(CommandJob.java:150) at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 at java.util.ArrayList.rangeCheck(ArrayList.java:653) at java.util.ArrayList.set(ArrayList.java:444) at org.obiba.magma.datasource.hibernate.converter.VariableConverter.marshalCategories(VariableConverter.java:68) at org.obiba.magma.datasource.hibernate.converter.VariableConverter.marshal(VariableConverter.java:49) at org.obiba.magma.datasource.hibernate.HibernateValueTableWriter$HibernateVariableWriter.writeVariable(HibernateValueTableWriter.java:115) at org.obiba.magma.support.DatasourceCopier.copyMetadata(DatasourceCopier.java:270) at org.obiba.magma.support.DatasourceCopier.copyMetadata(DatasourceCopier.java:262) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:224) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:214) at org.obiba.magma.support.MultithreadedDatasourceCopier.copyVariables(MultithreadedDatasourceCopier.java:222) at org.obiba.magma.support.MultithreadedDatasourceCopier.write(MultithreadedDatasourceCopier.java:182) at org.obiba.magma.support.MultithreadedDatasourceCopier.copy(MultithreadedDatasourceCopier.java:172) at org.obiba.opal.core.service.CopyValueTablesLockingAction$CopyAction.execute(CopyValueTablesLockingAction.java:159) at org.obiba.opal.core.magma.concurrent.LockingActionTemplate$1.doInTransactionWithoutResult(LockingActionTemplate.java:47) at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:34) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133) at org.obiba.opal.core.magma.concurrent.LockingActionTemplate.doInTransaction(LockingActionTemplate.java:42) at org.obiba.opal.core.magma.concurrent.LockingActionTemplate.execute(LockingActionTemplate.java:31) at org.obiba.opal.core.service.DataImportServiceImpl.copyValueTables(DataImportServiceImpl.java:135) ... 13 more {code}

    JIRA | 2 years ago | Carlos Silva
    java.lang.RuntimeException: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
  2. 0

    When we import a table/view and it contains for a variable multiple labels for the same category value, Magma fails with a IndexOutOfBoundsException. Opal doesn't allow multiple labels for the same category in the GUI editor, and this variable was created in Mica. This should fail in Magma, but with more accurate exception and clear message, like IllegalArgumentException("Multiple labels found for category value xxx"). {code} 7047449 [pool-1-thread-7] ERROR org.obiba.opal.shell.commands.ImportCommand - Runtime error while importing data java.lang.RuntimeException: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 at org.obiba.opal.core.service.DataImportServiceImpl.copyValueTables(DataImportServiceImpl.java:143) at org.obiba.opal.core.service.DataImportServiceImpl.importData(DataImportServiceImpl.java:105) at org.obiba.opal.core.service.DataImportServiceImpl.importData(DataImportServiceImpl.java:87) at org.obiba.opal.shell.commands.ImportCommand.importFromTables(ImportCommand.java:155) at org.obiba.opal.shell.commands.ImportCommand.executeImports(ImportCommand.java:89) at org.obiba.opal.shell.commands.ImportCommand.execute(ImportCommand.java:68) at org.obiba.opal.shell.CommandJob.run(CommandJob.java:150) at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 at java.util.ArrayList.rangeCheck(ArrayList.java:653) at java.util.ArrayList.set(ArrayList.java:444) at org.obiba.magma.datasource.hibernate.converter.VariableConverter.marshalCategories(VariableConverter.java:68) at org.obiba.magma.datasource.hibernate.converter.VariableConverter.marshal(VariableConverter.java:49) at org.obiba.magma.datasource.hibernate.HibernateValueTableWriter$HibernateVariableWriter.writeVariable(HibernateValueTableWriter.java:115) at org.obiba.magma.support.DatasourceCopier.copyMetadata(DatasourceCopier.java:270) at org.obiba.magma.support.DatasourceCopier.copyMetadata(DatasourceCopier.java:262) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:224) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:214) at org.obiba.magma.support.MultithreadedDatasourceCopier.copyVariables(MultithreadedDatasourceCopier.java:222) at org.obiba.magma.support.MultithreadedDatasourceCopier.write(MultithreadedDatasourceCopier.java:182) at org.obiba.magma.support.MultithreadedDatasourceCopier.copy(MultithreadedDatasourceCopier.java:172) at org.obiba.opal.core.service.CopyValueTablesLockingAction$CopyAction.execute(CopyValueTablesLockingAction.java:159) at org.obiba.opal.core.magma.concurrent.LockingActionTemplate$1.doInTransactionWithoutResult(LockingActionTemplate.java:47) at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:34) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133) at org.obiba.opal.core.magma.concurrent.LockingActionTemplate.doInTransaction(LockingActionTemplate.java:42) at org.obiba.opal.core.magma.concurrent.LockingActionTemplate.execute(LockingActionTemplate.java:31) at org.obiba.opal.core.service.DataImportServiceImpl.copyValueTables(DataImportServiceImpl.java:135) ... 13 more {code}

    JIRA | 2 years ago | Carlos Silva
    java.lang.RuntimeException: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
  3. 0

    1.7.9 spigot worldborder error

    GitHub | 8 months ago | bartonsweb
    java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Magic Map Crash

    GitHub | 2 years ago | SixOnTheBeach
    java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
  6. 0

    IndexOutOfBoundsException: Index: 1, Size: 1 at exportFacet

    GitHub | 2 years ago | rsieja
    gerencial.xhtml: javax.servlet.ServletException: Index: 1, Size: 1

  1. tyson925 1 times, last 4 months ago
  2. harshg 1 times, last 4 months ago
  3. sriharshakiran 2 times, last 7 months ago
  4. MyInnos 6 times, last 7 months ago
7 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.IndexOutOfBoundsException

    Index: 1, Size: 1

    at java.util.ArrayList.rangeCheck()
  2. Java RT
    ArrayList.set
    1. java.util.ArrayList.rangeCheck(ArrayList.java:653)
    2. java.util.ArrayList.set(ArrayList.java:444)
    2 frames
  3. org.obiba.magma
    MultithreadedDatasourceCopier.copy
    1. org.obiba.magma.datasource.hibernate.converter.VariableConverter.marshalCategories(VariableConverter.java:68)
    2. org.obiba.magma.datasource.hibernate.converter.VariableConverter.marshal(VariableConverter.java:49)
    3. org.obiba.magma.datasource.hibernate.HibernateValueTableWriter$HibernateVariableWriter.writeVariable(HibernateValueTableWriter.java:115)
    4. org.obiba.magma.support.DatasourceCopier.copyMetadata(DatasourceCopier.java:270)
    5. org.obiba.magma.support.DatasourceCopier.copyMetadata(DatasourceCopier.java:262)
    6. org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:224)
    7. org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:214)
    8. org.obiba.magma.support.MultithreadedDatasourceCopier.copyVariables(MultithreadedDatasourceCopier.java:222)
    9. org.obiba.magma.support.MultithreadedDatasourceCopier.write(MultithreadedDatasourceCopier.java:182)
    10. org.obiba.magma.support.MultithreadedDatasourceCopier.copy(MultithreadedDatasourceCopier.java:172)
    10 frames
  4. org.obiba.opal
    LockingActionTemplate$1.doInTransactionWithoutResult
    1. org.obiba.opal.core.service.CopyValueTablesLockingAction$CopyAction.execute(CopyValueTablesLockingAction.java:159)
    2. org.obiba.opal.core.magma.concurrent.LockingActionTemplate$1.doInTransactionWithoutResult(LockingActionTemplate.java:47)
    2 frames
  5. Spring Tx
    TransactionTemplate.execute
    1. org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:34)
    2. org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
    2 frames
  6. org.obiba.opal
    CommandJob.run
    1. org.obiba.opal.core.magma.concurrent.LockingActionTemplate.doInTransaction(LockingActionTemplate.java:42)
    2. org.obiba.opal.core.magma.concurrent.LockingActionTemplate.execute(LockingActionTemplate.java:31)
    3. org.obiba.opal.core.service.DataImportServiceImpl.copyValueTables(DataImportServiceImpl.java:135)
    4. org.obiba.opal.core.service.DataImportServiceImpl.importData(DataImportServiceImpl.java:105)
    5. org.obiba.opal.core.service.DataImportServiceImpl.importData(DataImportServiceImpl.java:87)
    6. org.obiba.opal.shell.commands.ImportCommand.importFromTables(ImportCommand.java:155)
    7. org.obiba.opal.shell.commands.ImportCommand.executeImports(ImportCommand.java:89)
    8. org.obiba.opal.shell.commands.ImportCommand.execute(ImportCommand.java:68)
    9. org.obiba.opal.shell.CommandJob.run(CommandJob.java:150)
    9 frames
  7. Shiro
    SubjectRunnable.run
    1. org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120)
    2. org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108)
    2 frames
  8. Java RT
    Thread.run
    1. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    2. java.util.concurrent.FutureTask.run(FutureTask.java:266)
    3. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    4. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    5. java.lang.Thread.run(Thread.java:745)
    5 frames