Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: Can't get connection to MS SQL Server to work

  1. #1
    Join Date
    Mar 2016
    Posts
    3

    Default Can't get connection to MS SQL Server to work

    Hi,

    In Spoon 6.0 Im trying to connect to my local MS SQL Server Express 2014 instance using the MS SQL JDBC connector.

    I've downloaded the JDBC connector från Microsoft and copied the sqljdbc42.jar to my C:\Program Files\Pentaho Kettla data-integration\lib folder (and restarted spoon)
    But nothing happens when Im setting up a new connection and hit the [Test connection] button. No error no nothing.

    I've also tried the files sqljdbc41.jar, sqljdbc4.jar and sqljdbc.jar but non of them works. When I tried the sqljdbc.jar I actually got an error message but with the other files nothing happens.

    Any help on getting this to work is appreciated.

    Regards,
    Alfred

  2. #2
    Join Date
    Nov 2009
    Posts
    688

    Default

    The sqljdbc.jar file is the correct file. But what is in the error message

  3. #3
    Join Date
    Mar 2016
    Posts
    3

    Default

    Hi,

    Some of the error is in swedish, but it means that version 1.7 is not supported by this driver, and to use the library sqljdbc4.jar that support JDBC 4.0

    Full error message:
    Error connecting to database [g] : org.pentaho.di.core.exception.KettleDatabaseException:
    Error occurred while trying to connect to the database


    Error connecting to database: (using class com.microsoft.sqlserver.jdbc.SQLServerDriver)
    JRE (Java Runtime Environment) version 1.7 stöds inte av den här drivrutinen. Använd klassbiblioteket sqljdbc4.jar som stöder JDBC 4.0.




    org.pentaho.di.core.exception.KettleDatabaseException:
    Error occurred while trying to connect to the database


    Error connecting to database: (using class com.microsoft.sqlserver.jdbc.SQLServerDriver)
    JRE (Java Runtime Environment) version 1.7 stöds inte av den här drivrutinen. Använd klassbiblioteket sqljdbc4.jar som stöder JDBC 4.0.




    at org.pentaho.di.core.database.Database.normalConnect(Database.java:459)
    at org.pentaho.di.core.database.Database.connect(Database.java:357)
    at org.pentaho.di.core.database.Database.connect(Database.java:328)
    at org.pentaho.di.core.database.Database.connect(Database.java:318)
    at org.pentaho.di.core.database.DatabaseFactory.getConnectionTestReport(DatabaseFactory.java:80)
    at org.pentaho.di.core.database.DatabaseMeta.testConnection(DatabaseMeta.java:2734)
    at org.pentaho.ui.database.event.DataHandler.testDatabaseConnection(DataHandler.java:588)
    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.pentaho.ui.xul.impl.AbstractXulDomContainer.invoke(AbstractXulDomContainer.java:313)
    at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke(AbstractXulComponent.java:157)
    at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke(AbstractXulComponent.java:141)
    at org.pentaho.ui.xul.swt.tags.SwtButton.access$500(SwtButton.java:43)
    at org.pentaho.ui.xul.swt.tags.SwtButton$4.widgetSelected(SwtButton.java:136)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
    at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
    at org.eclipse.jface.window.Window.open(Window.java:796)
    at org.pentaho.ui.xul.swt.tags.SwtDialog.show(SwtDialog.java:389)
    at org.pentaho.ui.xul.swt.tags.SwtDialog.show(SwtDialog.java:318)
    at org.pentaho.di.ui.core.database.dialog.XulDatabaseDialog.open(XulDatabaseDialog.java:116)
    at org.pentaho.di.ui.core.database.dialog.DatabaseDialog.open(DatabaseDialog.java:60)
    at org.pentaho.di.ui.spoon.delegates.SpoonDBDelegate.editConnection(SpoonDBDelegate.java:89)
    at org.pentaho.di.ui.spoon.Spoon.editConnection(Spoon.java:2671)
    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.pentaho.ui.xul.impl.AbstractXulDomContainer.invoke(AbstractXulDomContainer.java:313)
    at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke(AbstractXulComponent.java:157)
    at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke(AbstractXulComponent.java:141)
    at org.pentaho.ui.xul.jface.tags.JfaceMenuitem.access$100(JfaceMenuitem.java:43)
    at org.pentaho.ui.xul.jface.tags.JfaceMenuitem$1.run(JfaceMenuitem.java:106)
    at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)
    at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
    at org.pentaho.di.ui.spoon.Spoon.readAndDispatch(Spoon.java:1339)
    at org.pentaho.di.ui.spoon.Spoon.waitForDispose(Spoon.java:7939)
    at org.pentaho.di.ui.spoon.Spoon.start(Spoon.java:9214)
    at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:653)
    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.pentaho.commons.launcher.Launcher.main(Launcher.java:92)
    Caused by: org.pentaho.di.core.exception.KettleDatabaseException:
    Error connecting to database: (using class com.microsoft.sqlserver.jdbc.SQLServerDriver)
    JRE (Java Runtime Environment) version 1.7 stöds inte av den här drivrutinen. Använd klassbiblioteket sqljdbc4.jar som stöder JDBC 4.0.


    at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:574)
    at org.pentaho.di.core.database.Database.normalConnect(Database.java:443)
    ... 54 more
    Caused by: java.lang.UnsupportedOperationException: JRE (Java Runtime Environment) version 1.7 stöds inte av den här drivrutinen. Använd klassbiblioteket sqljdbc4.jar som stöder JDBC 4.0.
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.<init>(SQLServerConnection.java:304)
    at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1011)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:547)
    ... 55 more


    Hostname : localhost
    Port : 1433
    Database name : HLSS01

  4. #4
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    Quote Originally Posted by RedDog View Post
    MS SQL Server Express 2014 instance
    From what I remember, MS SQL Server Express doesn't come with TCP access turned on by default. You need to have TCP1433 access turned on for PDI to work.

  5. #5
    Join Date
    Mar 2016
    Posts
    3

    Default

    Quote Originally Posted by gutlez View Post
    From what I remember, MS SQL Server Express doesn't come with TCP access turned on by default. You need to have TCP1433 access turned on for PDI to work.
    Sorry for late answer. I finnally got it working by using the connector file "sqljdbc4.jar". I already enabled Shared memory, Names pipes and TCP/IP. But when I also entered port 1433 for IPALL under tab IP Addresses and restarted the SQL Service and Spoon the connection worked.

    Connection settings:
    Host Name: DELLLATITUDEEE65 (my computer name)
    Databas Name: HLSS01
    Instance Name: .\SQLEXPRESS
    Port Number: 1433
    User Name: sa

    Thanks for helping!

    Regards
    Alfred

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.