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

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.

  • 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
    via by Unknown author,
    • 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
    No Bugmate found.