LogFilter.isLoggable threw a non-fatal unchecked exception [message #683895] |
Tue, 14 June 2011 11:58  |
Eclipse User |
|
|
|
Hello everybody,
I just started using Eclipse Indigo and then, I get this exception:
LogFilter.isLoggable threw a non-fatal unchecked exception as follows:
java.lang.NullPointerException
at org.eclipse.core.internal.runtime.Log.isLoggable(Log.java:101)
at org.eclipse.equinox.log.internal.ExtendedLogReaderServiceFactory.safeIsLoggable(ExtendedLogReaderServiceFactory.java:57)
at org.eclipse.equinox.log.internal.ExtendedLogReaderServiceFactory.logPrivileged(ExtendedLogReaderServiceFactory.java:158)
at org.eclipse.equinox.log.internal.ExtendedLogReaderServiceFactory.log(ExtendedLogReaderServiceFactory.java:146)
at org.eclipse.equinox.log.internal.ExtendedLogServiceFactory.log(ExtendedLogServiceFactory.java:65)
at org.eclipse.equinox.log.internal.ExtendedLogServiceImpl.log(ExtendedLogServiceImpl.java:87)
at org.eclipse.equinox.log.internal.LoggerImpl.log(LoggerImpl.java:54)
at org.eclipse.core.internal.runtime.Log.log(Log.java:60)
at altagracia.services.eclipse.ExceptionHandler.handle(ExceptionHandler.java:17)
at altagracia.plugin.wizards.Connect.getTableFromAttributes(Connect.java:321)
at altagracia.codegen.unifier.ProcedureSpec.statementSpec(ProcedureSpec.java:962)
at altagracia.codegen.unifier.ProcedureSpec.blockSpec(ProcedureSpec.java:750)
at altagracia.codegen.unifier.ProcedureSpec.generate(ProcedureSpec.java:231)
at altagracia.codegen.unifier.ProcedureSpec.generate(ProcedureSpec.java:165)
at altagracia.plugin.popup.actions.ActionProcedureGeneration.run(ActionProcedureGeneration.java:46)
at org.eclipse.ui.actions.ActionDelegate.runWithEvent(ActionDelegate.java:70)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:241)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3586)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3207)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
This is my code to handle and log exceptions:
import org.eclipse.core.runtime.Status;
import altagracia.services.IException;
import altagracia.services.IService;
public class ExceptionHandler extends org.eclipse.core.runtime.Plugin implements IException, IService{
@Override
public void handle(Exception e) {
getLog().log(new Status(Status.ERROR, "Altagracia", e.getClass().getName(), e));
}
@Override
public void handle(String message, Exception e) {
getLog().log(new Status(Status.ERROR, "Altagracia", message, e));
}
}
I generate the exception this way:
Exception e = new Exception("Base table not found ");
Services.Exception.handle("Problems with Base Table ",e);
throw e;
I was working fine before I move to Indigo, so I don't know if I am missing something.
Thank you very much for your help!
|
|
|
|
|
|
|
|
Re: LogFilter.isLoggable threw a non-fatal unchecked exception [message #730343 is a reply to message #683895] |
Wed, 28 September 2011 04:09  |
Eclipse User |
|
|
|
Hi there,
I had the same bug, and found my problem:
My code was
Bundle bundle = Platform.getBundle("org.eclipse");
ILog log = Platform.getLog(bundle);
This worked with earlier versions of Eclipse. With Indigo, it returns a null bundle.
I changed the first line of my code to
Bundle bundle = Platform.getBundle(Platform.PI_RUNTIME);
and the null pointer disappears.
Hope it helps.
Pol Magermans
Software Engineer
Aquapole - University of Liège
www.aquapole.ulg.ac.be
|
|
|
Powered by
FUDForum. Page generated in 0.67339 seconds