- This topic has 25 replies, 6 voices, and was last updated 20 years, 9 months 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
September 18, 2004 at 2:37 pm #215514
snpeMemberAre You set driver class correct ?
September 18, 2004 at 7:06 pm #215521
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
September 19, 2004 at 8:08 am #215527
snpeMemberYou have to define alias/connection and open connection
regards
September 20, 2004 at 4:51 am #215555
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
September 20, 2004 at 9:01 am #215575
Riyad KallaMemberAlmeida,
After clicking “List Driver” click the dropdown at the bottom of the screen and select the driver then Hit OK.September 20, 2004 at 10:45 am #215597
pfsalmeidaMemberThat’s the problem, no driver appears.
regards,
Almeida
September 20, 2004 at 11:20 am #215604
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.September 20, 2004 at 11:53 am #215607
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
September 20, 2004 at 12:00 pm #215610
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”.
September 21, 2004 at 5:34 am #215667
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
September 21, 2004 at 8:10 am #215674
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)September 21, 2004 at 8:56 am #215677
pfsalmeidaMemberRiyad,
Yes, it´s like that. (I can’t list the driver class, I need to write it).September 21, 2004 at 9:06 am #215678
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.
September 22, 2004 at 3:16 am #215718
pfsalmeidaMemberRiyad,
Thanks for Your support.regards,
Almeida
-
AuthorPosts