Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Error connecting to database: (using class org.postgresql.Driver)

  1. #1
    Join Date
    Oct 2007
    Posts
    4

    Default Error connecting to database: (using class org.postgresql.Driver)

    My transform isn't connecting to Postgres, but only at run time. It's queer.

    I can use PDI with MySQL great. But I want to send some data over to Postgres. It's installed and runs ok. With a TableOutput transform, I can create a Connection to Postgres and browse the tables and data ok too. But when I try to launch the transform, I get the following messages in debugging mode:

    Table input.0 - Connected to database...
    Table output.0 - ERROR (version 3.0.0-RC1, build 299003 from 2007/10/01 23:14:52) : An error occurred intialising this step:
    Table output.0 - ERROR (version 3.0.0-RC1, build 299003 from 2007/10/01 23:14:52) : Error occured while trying to connect to the database
    Table output.0 - ERROR (version 3.0.0-RC1, build 299003 from 2007/10/01 23:14:52) :
    Table output.0 - ERROR (version 3.0.0-RC1, build 299003 from 2007/10/01 23:14:52) : Error connecting to database: (using class org.postgresql.Driver)
    Table output.0 - ERROR (version 3.0.0-RC1, build 299003 from 2007/10/01 23:14:52) : Protocol error. Session setup failed.

    Being a database guy, not a java guy, I'll best appreciate specifics. Thank you.

  2. #2
    Join Date
    Oct 2007
    Posts
    4

    Default More details

    Platform is Spoon version 3.0.0 RC1 on Postgres 8.2 on Windows XP SP2.
    I get the same error with other types of Steps, such as Insert/Update.

  3. #3
    Join Date
    Mar 2007
    Posts
    216

    Question

    Hi,

    Quote Originally Posted by phills View Post
    Platform is Spoon version 3.0.0 RC1 on Postgres 8.2 on Windows XP SP2.
    I get the same error with other types of Steps, such as Insert/Update.
    Did you check the max number connections parameters for you postgresql database ? If it is "1" (it would be weird), the output could have its connection refused as Input step used it.

    Are you using SSL ?

    What I found elsewhere
    Well, PgBouncer does not pass client startup parameters to
    server, and I dont see a sane way of doing it. But it does
    pass server parameters to client. Now JDBC gives parameter
    client_encoding=UNICODE and expects server to return it.
    If server returns UTF8 instead of UNICODE, it fails with
    "Protocol error".

    As a workaround, put client_encoding=UNICODE into database
    connect string, thus PgBouncer send that instead JDBC, and
    JDBC will think all is ok.
    Date: 2007-03-16 11:34
    Sender: Nobody

    Workaround: add client_encoding=UNICODE to DB definitions
    You may try to change encoding in your connection settings...

    a+, =)
    -=Clément=-
    Last edited by clement; 10-19-2007 at 12:27 PM.

  4. #4
    Join Date
    Oct 2007
    Posts
    4

    Smile Thank you!

    I added
    SET client_encoding = 'UNICODE';
    to the SQL tab inside the Connection Information dialog and IT WORKS!

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 - 2017 Pentaho Corporation. All Rights Reserved.