Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: Classpath of JDBC driver

  1. #1

    Default Classpath of JDBC driver

    Good evening!

    I'm evaluating Kettle if we can use it in a project of my university. I was able to do every transformation we needed but when I tried to get the transformed data into a MS SQL-Server database there was an error message. I tried some things but all I got where other error messages.

    I think the problem is something about the JDBC driver. I downloaded the latest one and I've read something that I have to specify its classpath somewhere in Kettle. How can I do that?

    Thanks for your help!

  2. #2
    Join Date
    May 2006
    Posts
    4,882

    Default

    Too little information, try again supplying us with more information

    Regards,
    Sven

  3. #3

    Default

    if you wanna run the transformation on the spoon, you can modify the kettle's classpath editing the flie spoon.bat (windows) or spoon.sh (unix-like systems).


  4. #4

    Default

    Okay... More information:

    I tried to connect to the SQL Server via an ODBC data source first. When I specify the data source in Spoon with the wizard everything works fine and in the end when I test the connection I get this message:

    ------------
    Connection to database [XXX] is OK.
    Hostname :
    Port :
    Database name : XXX

    ------------

    So I guess this should be okay.

    But when I use the table output step and want to browse the target table I get this message:

    ------------
    Unable to retrieve database information because of an error

    Error getting views from schema [null]
    [Microsoft][SQL Native Client]Invalid Descriptor Index

    ------------

    The schema field is filled with "dbo", the default schema of the user.

    I was not able to find the problem so I thought I should try with a (Native)JDBC connection. But when I test the connection I get this message:

    ------------
    Error connecting to database [XXX] : org.pentaho.di.core.exception.KettleDatabaseException:
    Error occured while trying to connect to the database

    Error connecting to database: (using class net.sourceforge.jtds.jdbc.Driver)
    Login failed for user 'XXX'.


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

    Error connecting to database: (using class net.sourceforge.jtds.jdbc.Driver)
    Login failed for user 'XXX'.

    ------------

    The User and his password are the same that I used for the ODBC connection so they should work.

    I thought the problem might be the MSSQL JDBC driver. And I've read, that you have to specify a class path in Kettle to use a JDBC driver. And now the question is how I can do that.

    @diegomrsantos: Where exactly in this file can I edit the classpath? I copied the .jar file of the driver into the "libext" folder in the Kettle directory and edited the Spoon.bat file like this:

    ------------
    REM ***********************************
    REM ** Libraries used by Kettle: **
    REM ***********************************

    set CLASSPATH=%CLASSPATH%;libext\sqljdbc.jar

    REM ******************
    REM KETTLE Library
    REM ******************

    ------------

    It didn't work so I think I changed the wrong line.


    That should be a bit more information

    Thanks a lot!
    Last edited by JUnit; 09-01-2008 at 04:25 PM.

  5. #5

    Default

    search for this line

    FOR %%F IN (libext\JDBC\*.jar) DO call :addcp %%F

    The jdbc drivers are in the directory "libext\JDBC", try changing the old driver by the new one

    maybe it would be useful http://forums.microsoft.com/MSDN/Sho...91511&SiteID=1

    good luck
    Last edited by diegomrsantos; 09-02-2008 at 02:03 PM.

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.