Hitachi Vantara Pentaho Community Forums
Results 1 to 8 of 8

Thread: Completely desperate

  1. #1
    Join Date
    May 2008
    Posts
    8

    Default Completely desperate

    Hi all,

    Problem

    INFO 31-10 18:54:59,535 (LogWriter.javaprintln:406) -Abort.0 - Starting to run...
    ERROR 31-10 18:54:59,709 (LogWriter.javaprintln:403) -Set JS.0 - Unexpected error :
    ERROR 31-10 18:54:59,709 (LogWriter.javaprintln:403) -Set JS.0 - org.pentaho.di.core.exception.KettleValueException:
    Couldn't compile javascript:

    Could not add default functions to the environment.
    Unsupported return type "org.pentaho.di.core.row.RowMetaInterface" in method "getOutputRowMeta".


    at org.pentaho.di.trans.steps.scriptvalues_mod.ScriptValuesMod.addValues(ScriptValuesMod.java:281)
    at org.pentaho.di.trans.steps.scriptvalues_mod.ScriptValuesMod.processRow(ScriptValuesMod.java:738)
    at org.pentaho.di.trans.steps.scriptvalues_mod.ScriptValuesMod.run(ScriptValuesMod.java:798)
    Caused by: org.pentaho.di.core.exception.KettleValueException:
    Could not add default functions to the environment.
    Unsupported return type "org.pentaho.di.core.row.RowMetaInterface" in method "getOutputRowMeta".

    at org.pentaho.di.trans.steps.scriptvalues_mod.ScriptValuesMod.addValues(ScriptValuesMod.java:235)
    ... 2 more
    Caused by: org.mozilla.javascript.EvaluatorException: Unsupported return type "org.pentaho.di.core.row.RowMetaInterface" in method "getOutputRowMeta".
    at org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:64)
    at org.mozilla.javascript.Context.reportRuntimeError(Context.java:815)
    at org.mozilla.javascript.Context.reportRuntimeError(Context.java:870)
    at org.mozilla.javascript.Context.reportRuntimeError2(Context.java:841)
    at org.mozilla.javascript.FunctionObject.<init>(FunctionObject.java:178)
    at org.mozilla.javascript.ScriptableObject.defineFunctionProperties(ScriptableObject.java:1214)
    at org.pentaho.di.trans.steps.scriptvalues_mod.ScriptValuesMod.addValues(ScriptValuesMod.java:229)
    ... 2 more

    INFO 31-10 18:54:59,714 (LogWriter.javarintln:406) -Set JS.0 - Finished processing (I=0, O=0, R=1, W=0, U=0, E=1)

    From previous thread I read that our envoriment is probably not ok. So we did everything we could think of to make them the same.

    We are in the middle of a very important project. We worked many weekends to get everything working. Now we have a working set of transformations and jobs in our development environment. We then copy this to our acceptance environment (same machine but different user, databases, etc.) and when that works we copy that to our production envoriment (other machine). The error occurs at our production environment.

    What we already checked: (some may sound stupid but we are desperate)
    1) compare 'env' on both machines and made sure that they are equal.
    2) compare 'set' on both machines and made sure that they are equal.
    3) compare 'export' on both machines and made sure that they are equal.
    4) compare 'java -version' on both machines and made sure that they are equal.
    5) compare user rights on both machines and made sure that they are equal. Even tried to run it after su to root (without the -)
    6) compare kettle versions on both machines and made sure that they are equal.
    7) compare transformations on both machines and made sure that they are equal. We use SVN, the transformations come from the same store.
    8) We copied the entire kettle dir over to the other machine

    To enable switch to other machines we use a lot of setting environment variables. We use kettle 2.5, kettle 3.0 and 3.1 on redhat enterprise server.
    The machines have duo quad core CPU's and 16 GB of mem.

    Please help us out! We need to get it live this weekend...

  2. #2
    Join Date
    May 2008
    Posts
    8

    Default update from Dennis

    I replaced the first JS block in the transformation and the second one generated the same error. The JS error is generated whenever the JS interpreter is initialized.

    I looked into Rhino (the JS interpreter) a bit more and was able to modify the Kettle scripts to invoke their internal copy of Rhino and then display the version number of Rhino they are using. These scripts respond differently on the two machines. The development machine only sees a newer version of Rhino. The production machine sees two different versions (one for Kettle 3 and one for Kettle 3.1). The version that is generating the error is the older version of Rhino. This seems to be the difference between the environments that we could not find yesterday.

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

    Default

    The js.jar was upgraded in 3.1

  4. #4
    Join Date
    May 2008
    Posts
    8

    Default Versions...

    So…. Kettle 3.1 should invoke new rhino and Kettle 3.0 should invoke old Rhino right?

    Then the 33 machine (dev) will do the same…

    This can only be the cause if:

    Kettle 3.0 on our 33 machine uses a different version of Rhino than Kettle 3.0 on the 35 machine (production) and I assume that’s not the case, as we copied the complete kettle dir over from 33

    How can I find out which version if Rhino is active?

  5. #5
    Join Date
    May 2008
    Posts
    8

    Default js.jar

    Can we copy js.jar files supplied with 3.1 to 3.0?

    Our transformations are not 100% working under 3.1 as 3.1 is more strict with handling fields. So we need 3.0 to be working.

    For example if a field contains

    1234, 5678 , 91011

    split on ,

    3.0 will not error that a space is in front of 5678, 3.1 will.

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

    Default

    Well... replacing the js.jar will probably be ok.

    However I have a hunch that won't solve your problem. I remember something about changing the number parsing some time ago in 3.1.

    Regards,
    Sven

  7. #7
    Join Date
    May 2008
    Posts
    8

    Default Dennis update

    I think Martin had the right idea on this late yesterday. We talked about the Java CLASSPATH being built differently on the machines but we couldn't see how. I updated Martin's Java class to output the full path of the Rhino class it is using. I then invoked that from inside the shell scripts for each version of Kettle. The 3.0 version on production finds an old version of Rhino that is incompatible with the rest of the package. That makes all of the JavaScript methods fail.

    The tricky part is that it finds the old version inside of a JAR file that is packaged in 3.0. The JAR is the same on BOTH the production and development servers. The script that builds the CLASSPATH is also the same on both servers. On the production server, the script builds the file listing for the CLASSPATH in a slightly different order. Since it uses a Iinux "find" command this is probably related to a slightly different version of the OS on the machines.

    I fixed it by forcing the js.jar (the one that holds the Rhino interpreter) to the front of the CLASSPATH. Since js.jar has the newer version than the other JAR file, things appear to work now.

  8. #8
    Join Date
    Dec 2005
    Posts
    11

    Default

    Hi,

    If you are deploying Pentaho Data Integration in your own production environment, or deploying on behalf of a different end user organization, we provide Pentaho Data Integration Enterprise Edition to deliver guaranteed response times for urgent as well as non-urgent issues. If you have issues related to production deployment, we would recommend professional support rather than posts to the forum.

    -Lance
    Pentaho

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.