- This topic has 35 replies, 13 voices, and was last updated 18 years, 4 months ago by
Haris Peco.
-
AuthorPosts
-
bradmMemberI’m baffled. I choose “New Connection…”; select “Microsoft MSSQL Server JDBC Driver” from the dropdown; enter the url jdbc:microsoft:sqlserver://localhost; and the username and password I want to use; and click finish. When I try to connect to the database, I get this maddeningly generic error: “Error while trying to login to database: com.microsoft.jdbc.sqlserver.SQLServerDriver”. I can imagine all kinds of causes for a message like this, but the database explorer’s gui doesn’t seem to offer me a way to solve any of them.
What obvious thing am I missing here? Thanks in advance!
February 27, 2005 at 4:01 pm #225838
Riyad KallaMemberIIRC you have to specify the username on the URL of the MSSQL Driver… and maybe even the password, I remember it being screwy…
March 3, 2005 at 8:59 am #226088
bradmMemberHi Riyad,
I tried that and still no luck. Any chance of a step by step example of how to do this?
March 3, 2005 at 10:08 pm #226144
Riyad KallaMemberI checked with our DBA and our DB dev and neither have access to a MS SQL Server setup, so I downloaded the driver and took a look at the docs and it looks like you will just need to adjust your connection string for the Microsoft JDBC Driver connection under the DB explorer new connection dialog to the following:
jdbc:microsoft:sqlserver://server1:1433;User=<USERNAME>;Password=<PASSWORD>
Where the stuff marked in <> is meant to be replaced, to look like:
jdbc:microsoft:sqlserver://server1:1433;User=sa;Password=myPassword
Give that a whirl… other than that I don’t know anything that isn’t from the driver docs.
March 18, 2005 at 1:21 am #226875
eramueMemberhi,
I got the same problem. Did anybody of you already succeed in conntecting to MSSQL server??
cheers,
Rainer
March 18, 2005 at 2:54 am #226877
Jason ThurstonMemberI’ve been able to connect via jdbc directly. But not through the Database Explorer. I tried to setup the driver under Windows–>Preferences–>MyEclipse–>Database Explorer–Drivers. I added mssqlserver.jar and msutil.jar to the “Extra Classpath”. Then I manually added: com.microsoft.jdbc.sqlserver.SQLServerDriver to the driver field. When I hit “Ok” nothing happens. So I hit cancel. When I go back into it I see it was saved yet
the MSSQL driver is not checked so I don’t think it is enabled. I’ve done the same thing with an oracle thin driver and after adding the driver to the driver field I hit “Ok” and it returned me to the driver list and put a check next to the oracle driver. So there is definitely something not working right the the sqlserver driver.
Also, supposedly when you add the jar file(s) to the “Extra Classpath” list you should be able to see the available driver in the driver field below. But I don’t see it in the list for Oracle or MSSQL Server. I always have to add it manually.March 18, 2005 at 11:24 am #226889
Jason ThurstonMemberI got it to work. But I didn’t use microsofts driver. I used jtds from sourceforge. With jtds it worked perfectly the first try and I didn’t have to put the username and password in the url.
Here’s the link to jtds: http://sourceforge.net/project/showfiles.php?group_id=33291To use microsofts sqlserver driver you might have more luck if you combine th jar files into a single jar file.
Here’s the link that I found helpful:
http://eclipseplugincentral.com/modules.php?op=modload&name=PNphpBB2&file=viewtopic&t=126March 22, 2005 at 12:18 pm #226996
ahmedyaserMemberI tried using the SQL Server JDBC driver packaged with WebLogic, but that is not working either. I try to create a new connection in DB Explorer, in the dialog box choose New Driver…, enter wlsqlserver.jar in the classpath, enter driver name, example URL and driver class. It enables the OK button, but nothing happens when you click OK. Seems like a bug to me. I was able to add MySQL Driver through the same procedure in the previous version.
March 22, 2005 at 12:28 pm #226997
Riyad KallaMemberIt is most likely throwing an exception to the log file, please check for it and paste it here: <workspace dir>\.metadata\.log
Also why not try the JTDS driver that jthurst posted?
March 22, 2005 at 3:26 pm #227002
ahmedyaserMemberHere is the exception message. I have already checked that the jar file has that class.
!ENTRY com.genuitec.eclipse.sqlexplorer 4 4 Mar 22, 2005 11:01:16.347
!MESSAGE Exception when adding driver
!STACK 0
java.lang.ClassNotFoundException: weblogic.jdbc.sqlserver.SQLServerDriver
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.utils.DataCache.addDriver(Unknown Source)
at com.genuitec.eclipse.sqlexplorer.utils.DriverModel.addDriver(Unknown Source)
at com.genuitec.eclipse.sqlexplorer.preferences.CreateDriverDialog.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.wizards.ConnectionProfileWizardMainPage$3.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 com.genuitec.eclipse.sqlexplorer.actions.EditConnectionProfileAction.run(Unknown Source)
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:185)
at org.eclipse.core.launcher.Main.run(Main.java:704)
at org.eclipse.core.launcher.Main.main(Main.java:688)March 22, 2005 at 4:35 pm #227011
Riyad KallaMemberIs this JAR and any dependent JARs that it requires free for you to send me to test? Email them to support@genuitec.com ATTN Riyad with a link to this topic in the forums in it so I know why I am getting them.
Thank you. In the mean time, why not try the JTDS drivers? From what I hear they are quite good.
March 23, 2005 at 4:25 pm #227065
ahmedyaserMemberRiyad,
I have already sent an email to you with the JAR file that contains the SQL Server JDBC driver from BEA.
I was able to get JTDS configured with MyEclipse.
March 23, 2005 at 4:29 pm #227066
Riyad KallaMemberIs JTDS sufficient for you to use or would you still like me to evaluate the problem with the driver?
March 24, 2005 at 10:49 am #227092
ahmedyaserMemberSince I’m able to explore the database using jTDS, I think I’m ok for now.
March 30, 2005 at 12:02 am #227330
xyztranMemberRiyad,
Would you please look into connecting using ms mssql server jdbc driver? By the way, where can I find an example connecting to a 8.1.7 oracle database?
Thanks,
Mike -
AuthorPosts