Menu

DB2 Driver Help

Help
Berryman
2007-10-26
2013-04-29
  • Berryman

    Berryman - 2007-10-26

      I upgraded from version 3.0.0 to 3.5RC4 today.  I first removed all of the old SQLExplore files and directories from the features and plug-ins directory then placed the new files and directions into eclipse.  The first time I ran eclipse I used the -clean option.  When I got into the SQLExplorer I could still see old Connection Profiles which I was very happy about but the driver did not work.  I first attempted to edit the driver so it would work but didn't work.  So I deleted the old driver and added a new one.  When I attached the new driver file and choose the driver it would not let me save the driver profile.  When I hit the save "ok" button nothing happened.  I looked in the log file and found this error:

    !ENTRY org.eclipse.jface 4 2 2007-10-26 09:46:12.281
    !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface".
    !STACK 0
    java.sql.SQLException: java.lang.UnsatisfiedLinkError: Native Library C:\Program Files\IBM\SQLLIB\BIN\db2jdbc.dll already loaded in another classloader
        at COM.ibm.db2.jdbc.app.DB2Driver.<init>(Unknown Source)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at java.lang.Class.newInstance0(Unknown Source)
        at java.lang.Class.newInstance(Unknown Source)
        at net.sourceforge.sqlexplorer.dbproduct.DefaultDatabaseProduct.getDriver(DefaultDatabaseProduct.java:43)
        at net.sourceforge.sqlexplorer.dbproduct.DatabaseProductFactory.loadDriver(DatabaseProductFactory.java:58)
        at net.sourceforge.sqlexplorer.dbproduct.ManagedDriver.registerSQLDriver(ManagedDriver.java:170)
        at net.sourceforge.sqlexplorer.preferences.DriverLabelProvider.getColumnImage(DriverPreferencePage.java:404)
        at org.eclipse.jface.viewers.TableViewer.doUpdateItem(TableViewer.java:487)
        at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:465)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
        at org.eclipse.core.runtime.Platform.run(Platform.java:843)
        at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44)
        at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:149)
        at org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:1955)
        at org.eclipse.jface.viewers.TableViewer.internalRefreshAll(TableViewer.java:881)
        at org.eclipse.jface.viewers.TableViewer.internalRefresh(TableViewer.java:818)
        at org.eclipse.jface.viewers.TableViewer.internalRefresh(TableViewer.java:807)
        at org.eclipse.jface.viewers.StructuredViewer$7.run(StructuredViewer.java:1388)
        at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1323)
        at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1386)
        at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1345)
        at net.sourceforge.sqlexplorer.preferences.DriverPreferencePage$4.widgetSelected(DriverPreferencePage.java:209)
        at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
        at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
        at org.eclipse.jface.window.Window.open(Window.java:796)
        at net.sourceforge.sqlexplorer.dialogs.CreateAliasDlg$3.widgetSelected(CreateAliasDlg.java:219)
        at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
        at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
        at org.eclipse.jface.window.Window.open(Window.java:796)
        at net.sourceforge.sqlexplorer.connections.actions.ChangeAliasAction.run(ChangeAliasAction.java:61)
        at org.eclipse.jface.action.Action.runWithEvent(Action.java:499)
        at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:539)
        at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488)
        at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
        at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1930)
        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1894)
        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:422)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
        at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
        at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
        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.core.launcher.Main.invokeFramework(Main.java:336)
        at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
        at org.eclipse.core.launcher.Main.run(Main.java:977)
        at org.eclipse.core.launcher.Main.main(Main.java:952)

    Can anyone help?

     
    • John Spackman

      John Spackman - 2007-10-26

      The issue here is that external libraries (ie DLLs) cannot be loaded more than once into a JVM, and while SQLExplorer has triggered it's loading once already it cannot unload it.  Try deleting the DB2 driver configuration, then exit and restart Eclipse and then try to add it again.

      John

       
    • Berryman

      Berryman - 2007-10-26

      The interface is not even letting me edit a connection profile anymore with out giving me that error.  Is there another way to get to the driver list.  I don't see the driver view listed anymore.  If not is there a file that I can edit to make these corrections.

       
    • Berryman

      Berryman - 2007-10-26

      I found the driver list through the "Preferences" option of another perspective and was able to remove the DB2 driver and add it back and then I restarted again.  When I attempt to edit or create a connection profile I now get this error.

      !ENTRY org.eclipse.ui 4 0 2007-10-26 11:20:10.796
      !MESSAGE java.lang.NullPointerException
      !STACK 0
      java.lang.NullPointerException
          at net.sourceforge.sqlexplorer.dialogs.CreateAliasDlg.loadData(CreateAliasDlg.java:370)
          at net.sourceforge.sqlexplorer.dialogs.CreateAliasDlg.createDialogArea(CreateAliasDlg.java:319)
          at org.eclipse.jface.dialogs.TitleAreaDialog.createContents(TitleAreaDialog.java:165)
          at net.sourceforge.sqlexplorer.dialogs.CreateAliasDlg.createContents(CreateAliasDlg.java:117)
          at org.eclipse.jface.window.Window.create(Window.java:426)
          at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1124)
          at org.eclipse.jface.window.Window.open(Window.java:785)
          at net.sourceforge.sqlexplorer.connections.actions.ChangeAliasAction.run(ChangeAliasAction.java:61)
          at org.eclipse.jface.action.Action.runWithEvent(Action.java:499)
          at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:539)
          at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488)
          at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400)
          at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
          at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
          at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
          at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
          at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1930)
          at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1894)
          at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:422)
          at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
          at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
          at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
          at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
          at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
          at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
          at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
          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.core.launcher.Main.invokeFramework(Main.java:336)
          at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
          at org.eclipse.core.launcher.Main.run(Main.java:977)
          at org.eclipse.core.launcher.Main.main(Main.java:952)

       
    • Berryman

      Berryman - 2007-10-26

      I decided to start from the beginning with this so I removed the old net.sourceforge.sqlexplorer directory from .plugins/.metadata directory so that it would not attempt to import any of my previous connections from the older version of sqlexploer.  When I started explorer I need to re point the DB2 driver the location on my hard drive.  I did this and again got the UnsatisfiedLinkError.  I deleted the DB2 driver all together and restarted eclipse and attempted to the re add the db2 driver.  When I did this I still got the UnsatisfiedLinkError.  I decided to use a different DB2 driver, so I used the jcc driver instead of the app driver.  Once I did this it worked and connected to the first database that I attempted t contact to.  I then attempt to contact to a second database and got an error pop in eclipse that said "Could no connect to your database alias; the exact message was: Failure in loading T2 native library db2jcct2"  I'm not sure why this occurs now. 

       
    • John Spackman

      John Spackman - 2007-11-08

      Sorry for the delay in getting back to you - I downloaded DB2 9.1 and installed the "SAMPLE" database in order to test & reproduce this.  There were a series of bugs with editing the drivers etc which are solved in RC5 (which is uploading now and should be available shortly).

      Also, I used the DB2 Universal JDBC driver (downloaded separately as well as with the DB2 server install) with no problems.

      John

       

Log in to post a comment.