Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Having trouble using UDJC step..

  1. #1
    Join Date
    Aug 2015
    Posts
    2

    Default Having trouble using UDJC step..

    I have implemented a UDJC step in a transformation to fetch a list of data using an external API, its working fine in my local environment. But it fails to initialize when its executed in my QA environment setup.

    below is my kettle error log :-
    1). 2016/04/13 16:29:47 - ItemPO_Download - Dispatching started for transformation [ItemPO_Download]
    2). 2016/04/13 16:29:49 - org.pentaho.di.trans.steps.databasejoin.DatabaseJoinMeta@36913847 - ERROR (version 5.3.0.0-213, build 1 from 2015-02-02_12-17-08 by buildguy) : A database error occurred:
    3). 2016/04/13 16:29:49 - org.pentaho.di.trans.steps.databasejoin.DatabaseJoinMeta@36913847 - Error occurred while trying to connect to the database
    4). 2016/04/13 16:29:49 - org.pentaho.di.trans.steps.databasejoin.DatabaseJoinMeta@36913847 -
    5). 2016/04/13 16:29:49 - org.pentaho.di.trans.steps.databasejoin.DatabaseJoinMeta@36913847 - Error connecting to database: (using class org.gjt.mm.mysql.Driver)
    6). 2016/04/13 16:29:49 - org.pentaho.di.trans.steps.databasejoin.DatabaseJoinMeta@36913847 - Cannot load connection class because of underlying exception: 'java.lang.NumberFormatException: For input string: "${slnport}"'.
    7). 2016/04/13 16:29:49 - get_tax_codes.0 - ERROR (version 5.3.0.0-213, build 1 from 2015-02-02_12-17-08 by buildguy) : Error initializing UserDefinedJavaClass:
    8). 2016/04/13 16:29:49 - get_tax_codes.0 - ERROR (version 5.3.0.0-213, build 1 from 2015-02-02_12-17-08 by buildguy) : org.pentaho.di.core.exception.KettleException:
    9). 2016/04/13 16:29:49 - get_tax_codes.0 - null
    10). 2016/04/13 16:29:49 - get_tax_codes.0 - ERROR (version 5.3.0.0-213, build 1 from 2015-02-02_12-17-08 by buildguy) : Error initializing step [get_tax_codes]
    11). 2016/04/13 16:29:50 - ItemPO_Download - ERROR (version 5.3.0.0-213, build 1 from 2015-02-02_12-17-08 by buildguy) : Step [get_tax_codes.0] failed to initialize!
    12). 2016/04/13 16:29:50 - item_specifications.0 - Finished reading query, closing connection.

    referring to 6th line above, it seems there is some problem using variable "${slnport}", but i haven't used this variable in any step
    just in the Database Connection Settings for Port Number.

    Any help will be greatly appreciated..!!

  2. #2
    Join Date
    Apr 2008
    Posts
    1,771

    Default

    it seems there is some problem using variable "${slnport}", but i haven't used this variable in any step
    just in the Database Connection Settings for Port Number.
    It seems a contradiction: you states that you did not use it, but then you have a DB Connection settings which uses that variable.
    I would check which values are passed to that variable.
    -- Mick --

  3. #3
    Join Date
    Aug 2015
    Posts
    2

    Default

    Quote Originally Posted by Mick_data View Post
    It seems a contradiction: you states that you did not use it, but then you have a DB Connection settings which uses that variable.
    I would check which values are passed to that variable.
    @Mick : Thanks for your Prompt reply..

    sorry i could have been more clear, i meant i ve used this variable in Database Connection of my transformation as in the snapshot attached.

    Name:  kettle_connection_ss.jpg
Views: 87
Size:  22.7 KB

    Before implementing UDJC step, my transformation worked ok with the same variables in the Database Connection settings. But after adding the UDJC step its not even initializing. And yes the value passed to this variable is 3306. I have read somewhere that if UDJC step is used the whole transformation is validated for errors and may fail to initialize if any. i guess if this has anything to do with it.

  4. #4
    Join Date
    May 2014
    Posts
    358

    Default

    That's interesting, I have observed something similar when the transformation was run through a Transformation Executor. But most probably what happens is that the variables are not passed correctly. You can try replacing the Java step with a dummy / add constants just to see what happens.

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.