java.lang.RuntimeException: java.lang.NullPointerException

JIRA | Pieter Lukasse | 3 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    I want to create a "mapping" table that contains the key and one extra field with the codes that map to this key. The purpose of this table is to be used as an annotation source of other views using the "join" method. Example: - I have a view with a field Diagnosis, which contains some ICD-10 code - I want to add another field e.g. "General Diagnosis", which should contain the parent ICD-10 codes of the Diagnosis field value. E.g. if the field Diagnosis contains "E10 (Insulin-dependent diabetes mellitus)" then the "General Diagnosis" field should contain the parent group code "E10–E14 (Diabetes mellitus)" The problem is that when I try to create such a mapping table, containing only this field, it fails with the following error when importing data into it (I hope this is the correct one from the log - see also attachment with steps on how to reproduce): 2014-10-01 12:45:31,531 [pool-2-thread-7] INFO org.obiba.magma.support.DatasourceCopier - Copying ValueTable 'ICD_codes_to_parents_mapping' to 'ICD_parent_mapping. ICD_codes_to_parents_mapping' (copyMetadata=true, copyValues=true). 2014-10-01 12:45:31,547 [pool-2-thread-7] ERROR org.obiba.opal.shell.commands.ImportCommand - Runtime error while importing data java.lang.RuntimeException: java.lang.NullPointerException at org.obiba.opal.core.service.DataImportServiceImpl.copyValueTables(DataImportServiceImpl.java:142) ~[opal-core-2.4.jar:na] at org.obiba.opal.core.service.DataImportServiceImpl.importData(DataImportServiceImpl.java:105) ~[opal-core-2.4.jar:na] at org.obiba.opal.core.service.DataImportServiceImpl.importData(DataImportServiceImpl.java:87) ~[opal-core-2.4.jar:na] at org.obiba.opal.shell.commands.ImportCommand.importFromTables(ImportCommand.java:155) [opal-shell-2.4.jar:na] at org.obiba.opal.shell.commands.ImportCommand.executeImports(ImportCommand.java:89) [opal-shell-2.4.jar:na] at org.obiba.opal.shell.commands.ImportCommand.execute(ImportCommand.java:68) [opal-shell-2.4.jar:na] at org.obiba.opal.shell.CommandJob.run(CommandJob.java:149) [opal-shell-2.4.jar:na] at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) [shiro-core-1.2.3-java8.jar:1.2.3-java8] at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108) [shiro-core-1.2.3-java8.jar:1.2.3-java8] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_65] at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_65] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_65] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_65] at java.lang.Thread.run(Thread.java:745) [na:1.7.0_65] Caused by: java.lang.NullPointerException: null at org.obiba.magma.datasource.hibernate.converter.VariableConverter.getStateForVariable(VariableConverter.java:27) ~[magma-datasource-hibernate-1.11-sesi.jar:na] at org.obiba.magma.datasource.hibernate.converter.VariableConverter.marshal(VariableConverter.java:34) ~[magma-datasource-hibernate-1.11-sesi.jar:na] at org.obiba.magma.datasource.hibernate.HibernateValueTableWriter$HibernateVariableWriter.writeVariable(HibernateValueTableWriter.java:115) ~[magma-datasource-hibernate-1.11-sesi.jar:na] at org.obiba.magma.support.DatasourceCopier.copyMetadata(DatasourceCopier.java:270) ~[magma-api-1.11-sesi.jar:na] at org.obiba.magma.support.DatasourceCopier.copyMetadata(DatasourceCopier.java:262) ~[magma-api-1.11-sesi.jar:na] at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:224) ~[magma-api-1.11-sesi.jar:na] at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:214) ~[magma-api-1.11-sesi.jar:na] at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:202) ~[magma-api-1.11-sesi.jar:na] at org.obiba.opal.core.service.CopyValueTablesLockingAction$CopyAction.execute(CopyValueTablesLockingAction.java:132) ~[opal-core-2.4.jar:na] at org.obiba.opal.core.magma.concurrent.LockingActionTemplate$1.doInTransactionWithoutResult(LockingActionTemplate.java:47) ~[opal-core-2.4.jar:na] at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:34) ~[spring-tx-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133) ~[spring-tx-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.obiba.opal.core.magma.concurrent.LockingActionTemplate.doInTransaction(LockingActionTemplate.java:42) ~[opal-core-2.4.jar:na] at org.obiba.opal.core.magma.concurrent.LockingActionTemplate.execute(LockingActionTemplate.java:31) ~[opal-core-2.4.jar:na] at org.obiba.opal.core.service.DataImportServiceImpl.copyValueTables(DataImportServiceImpl.java:133) ~[opal-core-2.4.jar:na] ... 13 common frames omitted 2014-10-01 12:45:31,547 [pool-2-thread-7] INFO org.obiba.opal.shell.commands.ImportCommand - Import failed in 18.42 ms

    JIRA | 3 years ago | Pieter Lukasse
    java.lang.RuntimeException: java.lang.NullPointerException
  2. 0

    I want to create a "mapping" table that contains the key and one extra field with the codes that map to this key. The purpose of this table is to be used as an annotation source of other views using the "join" method. Example: - I have a view with a field Diagnosis, which contains some ICD-10 code - I want to add another field e.g. "General Diagnosis", which should contain the parent ICD-10 codes of the Diagnosis field value. E.g. if the field Diagnosis contains "E10 (Insulin-dependent diabetes mellitus)" then the "General Diagnosis" field should contain the parent group code "E10–E14 (Diabetes mellitus)" The problem is that when I try to create such a mapping table, containing only this field, it fails with the following error when importing data into it (I hope this is the correct one from the log - see also attachment with steps on how to reproduce): 2014-10-01 12:45:31,531 [pool-2-thread-7] INFO org.obiba.magma.support.DatasourceCopier - Copying ValueTable 'ICD_codes_to_parents_mapping' to 'ICD_parent_mapping. ICD_codes_to_parents_mapping' (copyMetadata=true, copyValues=true). 2014-10-01 12:45:31,547 [pool-2-thread-7] ERROR org.obiba.opal.shell.commands.ImportCommand - Runtime error while importing data java.lang.RuntimeException: java.lang.NullPointerException at org.obiba.opal.core.service.DataImportServiceImpl.copyValueTables(DataImportServiceImpl.java:142) ~[opal-core-2.4.jar:na] at org.obiba.opal.core.service.DataImportServiceImpl.importData(DataImportServiceImpl.java:105) ~[opal-core-2.4.jar:na] at org.obiba.opal.core.service.DataImportServiceImpl.importData(DataImportServiceImpl.java:87) ~[opal-core-2.4.jar:na] at org.obiba.opal.shell.commands.ImportCommand.importFromTables(ImportCommand.java:155) [opal-shell-2.4.jar:na] at org.obiba.opal.shell.commands.ImportCommand.executeImports(ImportCommand.java:89) [opal-shell-2.4.jar:na] at org.obiba.opal.shell.commands.ImportCommand.execute(ImportCommand.java:68) [opal-shell-2.4.jar:na] at org.obiba.opal.shell.CommandJob.run(CommandJob.java:149) [opal-shell-2.4.jar:na] at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) [shiro-core-1.2.3-java8.jar:1.2.3-java8] at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108) [shiro-core-1.2.3-java8.jar:1.2.3-java8] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_65] at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_65] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_65] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_65] at java.lang.Thread.run(Thread.java:745) [na:1.7.0_65] Caused by: java.lang.NullPointerException: null at org.obiba.magma.datasource.hibernate.converter.VariableConverter.getStateForVariable(VariableConverter.java:27) ~[magma-datasource-hibernate-1.11-sesi.jar:na] at org.obiba.magma.datasource.hibernate.converter.VariableConverter.marshal(VariableConverter.java:34) ~[magma-datasource-hibernate-1.11-sesi.jar:na] at org.obiba.magma.datasource.hibernate.HibernateValueTableWriter$HibernateVariableWriter.writeVariable(HibernateValueTableWriter.java:115) ~[magma-datasource-hibernate-1.11-sesi.jar:na] at org.obiba.magma.support.DatasourceCopier.copyMetadata(DatasourceCopier.java:270) ~[magma-api-1.11-sesi.jar:na] at org.obiba.magma.support.DatasourceCopier.copyMetadata(DatasourceCopier.java:262) ~[magma-api-1.11-sesi.jar:na] at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:224) ~[magma-api-1.11-sesi.jar:na] at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:214) ~[magma-api-1.11-sesi.jar:na] at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:202) ~[magma-api-1.11-sesi.jar:na] at org.obiba.opal.core.service.CopyValueTablesLockingAction$CopyAction.execute(CopyValueTablesLockingAction.java:132) ~[opal-core-2.4.jar:na] at org.obiba.opal.core.magma.concurrent.LockingActionTemplate$1.doInTransactionWithoutResult(LockingActionTemplate.java:47) ~[opal-core-2.4.jar:na] at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:34) ~[spring-tx-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133) ~[spring-tx-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.obiba.opal.core.magma.concurrent.LockingActionTemplate.doInTransaction(LockingActionTemplate.java:42) ~[opal-core-2.4.jar:na] at org.obiba.opal.core.magma.concurrent.LockingActionTemplate.execute(LockingActionTemplate.java:31) ~[opal-core-2.4.jar:na] at org.obiba.opal.core.service.DataImportServiceImpl.copyValueTables(DataImportServiceImpl.java:133) ~[opal-core-2.4.jar:na] ... 13 common frames omitted 2014-10-01 12:45:31,547 [pool-2-thread-7] INFO org.obiba.opal.shell.commands.ImportCommand - Import failed in 18.42 ms

    JIRA | 3 years ago | Pieter Lukasse
    java.lang.RuntimeException: java.lang.NullPointerException
  3. 0

    Getting a nullpointer exception when switching displayables in J2ME

    Stack Overflow | 6 years ago | Pallinder
    java.lang.NullPointerException: 0 at javax.microedition.lcdui.Display$ChameleonTunnel.callScreenListener(), bci=46 at com.sun.midp.chameleon.layers.SoftButtonLayer.processCommand(), bci=74 at com.sun.midp.chameleon.layers.SoftButtonLayer.soft1(), bci=37 at com.sun.midp.chameleon.layers.SoftButtonLayer.keyInput(), bci=36 at com.sun.midp.chameleon.CWindow.keyInput(), bci=38 at javax.microedition.lcdui.Display$DisplayEventConsumerImpl.handleKeyEvent(), bci=17 at com.sun.midp.lcdui.DisplayEventListener.process(), bci=277 at com.sun.midp.events.EventQueue.run(), bci=179
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    J2ME (Java) - Null Pointer Exception caught in Display Class

    Stack Overflow | 6 years ago | Tom
    java.lang.NullPointerException: 0 at javax.microedition.lcdui.Display$ChameleonTunnel.callScreenListener(), bci=46 at com.sun.midp.chameleon.layers.SoftButtonLayer.processCommand(), bci=74 at com.sun.midp.chameleon.layers.SoftButtonLayer.soft1(), bci=37 at com.sun.midp.chameleon.layers.SoftButtonLayer.keyInput(), bci=36 at com.sun.midp.chameleon.CWindow.keyInput(), bci=38 at javax.microedition.lcdui.Display$DisplayEventConsumerImpl.handleKeyEvent(), bci=17 at com.sun.midp.lcdui.DisplayEventListener.process(), bci=277 at com.sun.midp.events.EventQueue.run(), bci=179
  6. 0

    Cloud Foundry v2 in Grails

    Stack Overflow | 3 years ago | angelo087
    java.lang.NullPointerException: Cannot invoke method getAt() on null object

    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.NullPointerException

      null

      at org.obiba.magma.datasource.hibernate.converter.VariableConverter.getStateForVariable()
    2. org.obiba.magma
      DatasourceCopier.copy
      1. org.obiba.magma.datasource.hibernate.converter.VariableConverter.getStateForVariable(VariableConverter.java:27)[magma-datasource-hibernate-1.11-sesi.jar:na]
      2. org.obiba.magma.datasource.hibernate.converter.VariableConverter.marshal(VariableConverter.java:34)[magma-datasource-hibernate-1.11-sesi.jar:na]
      3. org.obiba.magma.datasource.hibernate.HibernateValueTableWriter$HibernateVariableWriter.writeVariable(HibernateValueTableWriter.java:115)[magma-datasource-hibernate-1.11-sesi.jar:na]
      4. org.obiba.magma.support.DatasourceCopier.copyMetadata(DatasourceCopier.java:270)[magma-api-1.11-sesi.jar:na]
      5. org.obiba.magma.support.DatasourceCopier.copyMetadata(DatasourceCopier.java:262)[magma-api-1.11-sesi.jar:na]
      6. org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:224)[magma-api-1.11-sesi.jar:na]
      7. org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:214)[magma-api-1.11-sesi.jar:na]
      8. org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:202)[magma-api-1.11-sesi.jar:na]
      8 frames
    3. org.obiba.opal
      LockingActionTemplate$1.doInTransactionWithoutResult
      1. org.obiba.opal.core.service.CopyValueTablesLockingAction$CopyAction.execute(CopyValueTablesLockingAction.java:132)[opal-core-2.4.jar:na]
      2. org.obiba.opal.core.magma.concurrent.LockingActionTemplate$1.doInTransactionWithoutResult(LockingActionTemplate.java:47)[opal-core-2.4.jar:na]
      2 frames
    4. Spring Tx
      TransactionTemplate.execute
      1. org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:34)[spring-tx-4.0.3.RELEASE.jar:4.0.3.RELEASE]
      2. org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)[spring-tx-4.0.3.RELEASE.jar:4.0.3.RELEASE]
      2 frames
    5. org.obiba.opal
      CommandJob.run
      1. org.obiba.opal.core.magma.concurrent.LockingActionTemplate.doInTransaction(LockingActionTemplate.java:42)[opal-core-2.4.jar:na]
      2. org.obiba.opal.core.magma.concurrent.LockingActionTemplate.execute(LockingActionTemplate.java:31)[opal-core-2.4.jar:na]
      3. org.obiba.opal.core.service.DataImportServiceImpl.copyValueTables(DataImportServiceImpl.java:133)[opal-core-2.4.jar:na]
      4. org.obiba.opal.core.service.DataImportServiceImpl.importData(DataImportServiceImpl.java:105)[opal-core-2.4.jar:na]
      5. org.obiba.opal.core.service.DataImportServiceImpl.importData(DataImportServiceImpl.java:87)[opal-core-2.4.jar:na]
      6. org.obiba.opal.shell.commands.ImportCommand.importFromTables(ImportCommand.java:155)[opal-shell-2.4.jar:na]
      7. org.obiba.opal.shell.commands.ImportCommand.executeImports(ImportCommand.java:89)[opal-shell-2.4.jar:na]
      8. org.obiba.opal.shell.commands.ImportCommand.execute(ImportCommand.java:68)[opal-shell-2.4.jar:na]
      9. org.obiba.opal.shell.CommandJob.run(CommandJob.java:149)[opal-shell-2.4.jar:na]
      9 frames
    6. Shiro
      SubjectRunnable.run
      1. org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120)[shiro-core-1.2.3-java8.jar:1.2.3-java8]
      2. org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108)[shiro-core-1.2.3-java8.jar:1.2.3-java8]
      2 frames
    7. Java RT
      Thread.run
      1. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[na:1.7.0_65]
      2. java.util.concurrent.FutureTask.run(FutureTask.java:262)[na:1.7.0_65]
      3. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[na:1.7.0_65]
      4. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[na:1.7.0_65]
      5. java.lang.Thread.run(Thread.java:745)[na:1.7.0_65]
      5 frames