org.obiba.magma.MagmaRuntimeException: java.lang.NullPointerException

JIRA | 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

    When trying to export tables to an opened excel file, opal will give error message as follows: Error executing command 'export'. Error message: java.lang.NullPointerException. It's better to give prompt like: The designated file is occupied by other application. --> Error info from opal-error.log (opal 1.0.1): org.obiba.magma.MagmaRuntimeException: java.lang.NullPointerException at org.obiba.magma.support.Disposables.dispose(Disposables.java:26) at org.obiba.magma.MagmaEngine.removeDatasource(MagmaEngine.java:105) at org.obiba.opal.core.service.impl.DefaultExportServiceImpl.exportTablesToExcelFile(DefaultExportServiceImpl.java:89) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy41.exportTablesToExcelFile(Unknown Source) at org.obiba.opal.cli.client.command.ExportCommand.execute(ExportCommand.java:35) at org.obiba.opal.cli.client.OpalConsole.prompt(OpalConsole.java:136) at org.obiba.opal.cli.client.OpalConsole.<init>(OpalConsole.java:103) at org.obiba.opal.cli.client.OpalConsole.main(OpalConsole.java:185) Caused by: java.lang.NullPointerException at org.obiba.magma.datasource.excel.ExcelDatasource.onDispose(ExcelDatasource.java:106) at org.obiba.magma.support.AbstractDatasource.dispose(AbstractDatasource.java:91) at org.obiba.magma.support.Disposables.dispose(Disposables.java:22) ... 17 more --> Error info from opal-session.log (opal 1.1): org.obiba.magma.MagmaRuntimeException: java.lang.NullPointerException at org.obiba.magma.support.Disposables.dispose(Disposables.java:26) at org.obiba.magma.MagmaEngine.removeDatasource(MagmaEngine.java:105) at org.obiba.opal.core.service.impl.DefaultExportServiceImpl.exportTablesToExcelFile(DefaultExportServiceImpl.java:89) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy40.exportTablesToExcelFile(Unknown Source) at org.obiba.opal.shell.commands.ExportCommand.execute(ExportCommand.java:35) at org.obiba.opal.shell.AbstractOpalShell.run(AbstractOpalShell.java:53) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.NullPointerException at org.obiba.magma.datasource.excel.ExcelDatasource.onDispose(ExcelDatasource.java:106) at org.obiba.magma.support.AbstractDatasource.dispose(AbstractDatasource.java:91) at org.obiba.magma.support.Disposables.dispose(Disposables.java:22) ... 16 more

    JIRA | 7 years ago
    org.obiba.magma.MagmaRuntimeException: java.lang.NullPointerException

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at org.obiba.magma.datasource.excel.ExcelDatasource.onDispose()
    2. org.obiba.magma
      MagmaEngine.removeDatasource
      1. org.obiba.magma.datasource.excel.ExcelDatasource.onDispose(ExcelDatasource.java:106)
      2. org.obiba.magma.support.AbstractDatasource.dispose(AbstractDatasource.java:91)
      3. org.obiba.magma.support.Disposables.dispose(Disposables.java:22)
      4. org.obiba.magma.MagmaEngine.removeDatasource(MagmaEngine.java:105)
      4 frames
    3. org.obiba.opal
      DefaultExportServiceImpl.exportTablesToExcelFile
      1. org.obiba.opal.core.service.impl.DefaultExportServiceImpl.exportTablesToExcelFile(DefaultExportServiceImpl.java:89)
      1 frame
    4. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      4. java.lang.reflect.Method.invoke(Unknown Source)
      4 frames
    5. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
      2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
      3 frames
    6. Spring Tx
      TransactionInterceptor.invoke
      1. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
      1 frame
    7. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      2 frames
    8. Unknown
      $Proxy41.exportTablesToExcelFile
      1. $Proxy41.exportTablesToExcelFile(Unknown Source)
      1 frame
    9. org.obiba.opal
      OpalConsole.main
      1. org.obiba.opal.cli.client.command.ExportCommand.execute(ExportCommand.java:35)
      2. org.obiba.opal.cli.client.OpalConsole.prompt(OpalConsole.java:136)
      3. org.obiba.opal.cli.client.OpalConsole.<init>(OpalConsole.java:103)
      4. org.obiba.opal.cli.client.OpalConsole.main(OpalConsole.java:185)
      4 frames