- This topic has 25 replies, 6 voices, and was last updated 20 years, 1 month ago by Riyad Kalla.
-
AuthorPosts
-
pfsalmeidaMemberHi!
I can’t list Microsoft MSSQL Server JDBC Driver, I add the sqlserver.jar on the Extra Class Path.
Almeida
snpeMemberAre You set driver class correct ?
pfsalmeidaMemberMy procedure is:
On the windows Preferences, I select MyEclipse>Database Explorer>Drivers. Then I click on Microsoft MSSQL Server JDBC Driver and select Edit option. After that on Extra Class Path tab I’m going to search th Jar file on a folder on my desktop, the jar file is sqlserver.jar (where driver class is). Finally I select List Drivers and nothing happens.The driver class is com.microsoft.jdbc.sqlserver.SQLServerDriver.class, and is on sqlserver.jar.
Obs.:Sorry but I’m a rookie on these stuffs.
Thanks for all your help.
Almeida
snpeMemberYou have to define alias/connection and open connection
regards
pfsalmeidaMemberI’ve already define alias/connection and I try to make a connection but appears one window with an error.
«error…
com.microsoft.jdbc.sqlserver.SQLServerDriver»note: the Microsoft MSSQL Server JDBC Driver doesn’t appears checked
regards
Almeida
Riyad KallaMemberAlmeida,
After clicking “List Driver” click the dropdown at the bottom of the screen and select the driver then Hit OK.
pfsalmeidaMemberThat’s the problem, no driver appears.
regards,
Almeida
Riyad KallaMemberAlmeida,
IIRC the MS SQL driver consists of multiple JARs, make sure you add all 3 of them, and then try the List Drivers button.
pfsalmeidaMemberRiyad,
I have the 3 JARs (msqlserver.jar, msbase.jar, msutil.jar) on the “Extra Class Path”. I List Drivers, and the unique driver that I can list is “com.microsoft.jdbc.base.BaseDriver”. I hit OK (only JBDC ODBC Bridge are checked).
After all these a try to make a connection and the massage that appears on the Error Log:
“Error logging to database”Exception Stack Trace:
“java.lang.InstantiationException
at sun.reflect.InstantiationExceptionConstructorAccessorImpl.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.squirrel_sql.fw.sql.SQLDriverManager.getConnection(SQLDriverManager.java:97)
at com.genuitec.eclipse.sqlexplorer.LoggingProgress.run(Unknown Source)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:101)”Regards,
Almeida
Riyad KallaMemberAlmeida,
This is very similar to this thread: http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-3273-highlight-com+microsoft+jdbc.htmlCan you check your Eclipse log file (<workspace dir>\.metadata\.log) for exceptions every time you hit the “List Drivers” button. I don’t know if it matters what JAR file you have selected when you hit “List Drivers”.
pfsalmeidaMemberRiyad, I see the thread You have linked, and it’s the same problem, but with one difference, I can’t resolve mine 🙂
When I try to edit the Microsoft MSSQL Server JDBC Driver with Driver’s Wizard, nothing happens. The error appears only when I try to make a connection, the Exception is:!ENTRY com.genuitec.eclipse.sqlexplorer 4 4 Set 21, 2004 11:22:01.425
!MESSAGE Error logging to database
!STACK 0
java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver.class
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at net.sourceforge.squirrel_sql.fw.util.MyURLClassLoader.findClass(MyURLClassLoader.java:113)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager.getConnection(SQLDriverManager.java:96)
at com.genuitec.eclipse.sqlexplorer.LoggingProgress.run(Unknown Source)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:101)If I try to add a new driver with another name, when I hit OK the following Exception occurs:
!ENTRY com.genuitec.eclipse.sqlexplorer 4 4 Set 21, 2004 11:03:07.571
!MESSAGE Exception when adding driver
!STACK 0
java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver.class
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at net.sourceforge.squirrel_sql.fw.util.MyURLClassLoader.findClass(MyURLClassLoader.java:113)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager.registerSQLDriver(SQLDriverManager.java:60)
at com.genuitec.eclipse.sqlexplorer.DataCache.addDriver(Unknown Source)
at com.genuitec.eclipse.sqlexplorer.DriverModel.addDriver(Unknown Source)
at com.genuitec.eclipse.sqlexplorer.dialogs.CreateDriverDlg.okPressed(Unknown Source)
at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:365)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:506)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2772)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2431)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:668)
at org.eclipse.jface.window.Window.open(Window.java:648)
at com.genuitec.eclipse.sqlexplorer.dialogs.DriverContainerGroup$1.run(Unknown Source)
at com.genuitec.eclipse.sqlexplorer.dialogs.DriverContainerGroup$6.widgetSelected(Unknown Source)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2772)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2431)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:668)
at org.eclipse.jface.window.Window.open(Window.java:648)
at org.eclipse.ui.internal.OpenPreferencesAction.run(OpenPreferencesAction.java:72)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:881)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:915)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:866)
at org.eclipse.jface.action.ActionContributionItem$7.handleEvent(ActionContributionItem.java:785)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2772)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2431)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1377)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:254)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:96)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:335)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129)
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.basicRun(Main.java:183)
at org.eclipse.core.launcher.Main.run(Main.java:644)
at org.eclipse.core.launcher.Main.main(Main.java:628)regards,
Almeida
Riyad KallaMemberAlmeida,
I don’t have a SQL Server to test this with, but does your driver setup look like my screenshot? (also not the driver class name)
pfsalmeidaMemberRiyad,
Yes, it´s like that. (I can’t list the driver class, I need to write it).
Riyad KallaMemberI needed to write it as well because the “List” feature looks for the Class files that extends the Driver class, and that is only the BaseDriver file from the msbase.jar file, but that is not the actual JDBC Driver. The actual driver is the Class file extending BaseDriver and is called “SQLServerDriver” in the mssqlserver.jar file.
I have no idea why this doesn’t wokr, let met pass it along to the db dev.
pfsalmeidaMemberRiyad,
Thanks for Your support.regards,
Almeida
-
AuthorPosts