Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: SQL Server 2008 Data Connection

  1. #1
    Join Date
    Jul 2009
    Posts
    3

    Default SQL Server 2008 Data Connection

    Hi

    Could you please tell me the best way to create a database connection to a SQL Server 2008 Express instance in PDI.

    I tried creating a database connection using ODBC. It tested OK but when I try to Preview data in a table I get the following error.

    Unable to get list of rows from ResultSet :
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:113)
    at org.pentaho.di.ui.core.database.dialog.GetPreviewTableProgressDialog$1.run (GetPreviewTableProgressDialog.java:72)
    at org.pentaho.di.core.database.Database.getFirstRows (Database.java:4074)
    at org.pentaho.di.core.database.Database.getRows (Database.java:3998)
    at org.pentaho.di.core.database.Database.getRows (Database.java:4022)
    at org.pentaho.di.core.database.Database.getRow (Database.java:2758)
    at org.pentaho.di.core.database.Database.getRow (Database.java:2784)
    at org.pentaho.di.core.database.Database.getRow (Database.java:2825)
    at sun.jdbc.odbc.JdbcOdbcResultSet.getBlob (null:-1)
    Next I tried downloading the Microsoft JDBC driver sqljdbc4.jar from the Microsoft website. I dropped sqljdbc4.jar in the PDI libext folder and used the generic database connection as suggested in another thread. When testing the connection I get the following error regarding 'Exception while loading class'.

    Error connecting to database [SQLServer2008] : org.pentaho.di.core.exception.KettleDatabaseException:
    Error occured while trying to connect to the database
    Exception while loading class
    sqljdbc4.jar

    org.pentaho.di.core.exception.KettleDatabaseException:
    Error occured while trying to connect to the database
    Exception while loading class
    sqljdbc4.jar

    at org.pentaho.di.core.database.Database.normalConnect(Database.java:312)
    at org.pentaho.di.core.database.Database.connect(Database.java:261)
    at org.pentaho.di.core.database.Database.connect(Database.java:223)
    at org.pentaho.di.core.database.Database.connect(Database.java:213)
    at org.pentaho.di.core.database.DatabaseFactory.getConnectionTestReport(DatabaseFactory.java:55)
    at org.pentaho.di.core.database.DatabaseMeta.testConnection(DatabaseMeta.java:2409)
    at org.pentaho.ui.database.event.DataHandler.testDatabaseConnection(DataHandler.java:487)
    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:294)
    at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke(AbstractXulComponent.java:124)
    at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke(AbstractXulComponent.java:112)
    at org.pentaho.ui.xul.swt.tags.SwtButton.access$000(SwtButton.java:17)
    at org.pentaho.ui.xul.swt.tags.SwtButton$1.widgetSelected(SwtButton.java:77)
    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:238)
    at org.pentaho.di.ui.core.database.dialog.XulDatabaseDialog.open(XulDatabaseDialog.java:161)
    at org.pentaho.di.ui.spoon.delegates.SpoonDBDelegate.editConnection(SpoonDBDelegate.java:79)
    at org.pentaho.di.ui.spoon.Spoon.editConnection(Spoon.java:2001)
    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.xul.EventHandler.handleMenuEvent(EventHandler.java:42)
    at org.pentaho.xul.swt.menu.PopupMenu.handleMenuEvent(PopupMenu.java:40)
    at org.pentaho.xul.swt.menu.MenuChoice.handleMenuEvent(MenuChoice.java:77)
    at org.pentaho.xul.swt.menu.MenuChoice.handleEvent(MenuChoice.java:73)
    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:945)
    at org.pentaho.di.ui.spoon.Spoon.start(Spoon.java:5574)
    at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:412)
    Caused by: org.pentaho.di.core.exception.KettleDatabaseException:
    Exception while loading class
    sqljdbc4.jar
    at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:365)
    at org.pentaho.di.core.database.Database.normalConnect(Database.java:296)
    ... 41 more
    Caused by: java.lang.ClassNotFoundException: sqljdbc4.jar
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:357)
    ... 42 more
    Hostname :
    Port : 1521
    Database name :
    Any idea's or help would be appreciated?

    Thanks

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

    Default

    I didn't have to do anything when connecting to mine...
    I just selected type "MS SQL Server" from the list, and used type "Native"

    Something seems strange with your config, considering it's says it's trying to use port 1521

  3. #3

    Default

    Dude i am having same problem........

Tags for this Thread

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.