I have 2 profiles for Eclipse. They both have SQL Explorer as a plugin. On one, I cannot open the connections view, I get:
java.lang.NullPointerException
at net.sourceforge.sqlexplorer.dbproduct.MetaDataSession.getRoot(MetaDataSession.java:142)
at net.sourceforge.sqlexplorer.plugin.views.DatabaseStructureView.addSession(DatabaseStructureView.java:141)
.....
I setup the JDBC driver exactly the same as my other userdirectory. One works, and one doesn't (I get above error). The weird thing is, I've already created a connection, so I can still execute sql just fine, but cannot view the db connection..???
Why would that be? What could I be missing?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hmmm - that's odd. That NPE is because something went wrong during the initialisation of the db view - it's independent of the connection used to execute queries which is why you can still run your SQL even if the DBView doesn't work. Are you definitely using the same JDBC jar for your database in both eclipse installations? Also, please could you have a look in workspace/.metadata/.log and see if there's anything in there at the time of the NPE? Finally, are you using the latest version of your JDBC drivers?
John
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes- definitely, same driver in both, current version.
and yes- it's in the .log (see below):
!ENTRY org.eclipse.ui.workbench 4 0 2008-07-29 15:37:36.515
!MESSAGE Unable to create view ID net.sourceforge.sqlexplorer.connections.ConnectionsView: An unexpected exception was thrown.
!STACK 0
java.lang.NullPointerException
at net.sourceforge.sqlexplorer.dbproduct.MetaDataSession.getRoot(MetaDataSession.java:142)
at net.sourceforge.sqlexplorer.plugin.views.DatabaseStructureView.addSession(DatabaseStructureView.java:141)
at net.sourceforge.sqlexplorer.plugin.views.DatabaseStructureView.addUser(DatabaseStructureView.java:119)
at net.sourceforge.sqlexplorer.plugin.SQLExplorerPlugin.startDefaultConnections(SQLExplorerPlugin.java:159)
at net.sourceforge.sqlexplorer.connections.ConnectionsView.createPartControl(ConnectionsView.java:157)
at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:371)
at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:230)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:594)
at org.eclipse.ui.internal.Perspective.showView(Perspective.java:2127)
at org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:1062)
at org.eclipse.ui.internal.WorkbenchPage$19.run(WorkbenchPage.java:3773)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3770)
at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3746)
at org.eclipse.ui.handlers.ShowViewHandler.openView(ShowViewHandler.java:165)
at org.eclipse.ui.handlers.ShowViewHandler.execute(ShowViewHandler.java:80)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:281)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:247)
at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:619)
at org.eclipse.ui.menus.CommandContributionItem.access$10(CommandContributionItem.java:605)
at org.eclipse.ui.menus.CommandContributionItem$4.handleEvent(CommandContributionItem.java:595)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
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:382)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
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.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have 2 profiles for Eclipse. They both have SQL Explorer as a plugin. On one, I cannot open the connections view, I get:
java.lang.NullPointerException
at net.sourceforge.sqlexplorer.dbproduct.MetaDataSession.getRoot(MetaDataSession.java:142)
at net.sourceforge.sqlexplorer.plugin.views.DatabaseStructureView.addSession(DatabaseStructureView.java:141)
.....
I setup the JDBC driver exactly the same as my other userdirectory. One works, and one doesn't (I get above error). The weird thing is, I've already created a connection, so I can still execute sql just fine, but cannot view the db connection..???
Why would that be? What could I be missing?
btw- both are using 3.5.0
Hmmm - that's odd. That NPE is because something went wrong during the initialisation of the db view - it's independent of the connection used to execute queries which is why you can still run your SQL even if the DBView doesn't work. Are you definitely using the same JDBC jar for your database in both eclipse installations? Also, please could you have a look in workspace/.metadata/.log and see if there's anything in there at the time of the NPE? Finally, are you using the latest version of your JDBC drivers?
John
Yes- definitely, same driver in both, current version.
and yes- it's in the .log (see below):
!ENTRY org.eclipse.ui.workbench 4 0 2008-07-29 15:37:36.515
!MESSAGE Unable to create view ID net.sourceforge.sqlexplorer.connections.ConnectionsView: An unexpected exception was thrown.
!STACK 0
java.lang.NullPointerException
at net.sourceforge.sqlexplorer.dbproduct.MetaDataSession.getRoot(MetaDataSession.java:142)
at net.sourceforge.sqlexplorer.plugin.views.DatabaseStructureView.addSession(DatabaseStructureView.java:141)
at net.sourceforge.sqlexplorer.plugin.views.DatabaseStructureView.addUser(DatabaseStructureView.java:119)
at net.sourceforge.sqlexplorer.plugin.SQLExplorerPlugin.startDefaultConnections(SQLExplorerPlugin.java:159)
at net.sourceforge.sqlexplorer.connections.ConnectionsView.createPartControl(ConnectionsView.java:157)
at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:371)
at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:230)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:594)
at org.eclipse.ui.internal.Perspective.showView(Perspective.java:2127)
at org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:1062)
at org.eclipse.ui.internal.WorkbenchPage$19.run(WorkbenchPage.java:3773)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3770)
at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3746)
at org.eclipse.ui.handlers.ShowViewHandler.openView(ShowViewHandler.java:165)
at org.eclipse.ui.handlers.ShowViewHandler.execute(ShowViewHandler.java:80)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:281)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:247)
at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:619)
at org.eclipse.ui.menus.CommandContributionItem.access$10(CommandContributionItem.java:605)
at org.eclipse.ui.menus.CommandContributionItem$4.handleEvent(CommandContributionItem.java:595)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
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:382)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
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.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)