Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Javascript row.Clone() problems

  1. #1
    Join Date
    Mar 2009
    Posts
    7

    Default Javascript row.Clone() problems

    I am trying to use row.Clone() in the javascript modify step and I am getting errors.

    Code:
    var prevRow;
    if(prevRow != null) {
    }
    prevRow = row.clone();
    I've tried both .Clone() and .clone().

    It seems to work when I have "Compatibility Mode?" on.

    Any ideas how to get this fixed?

    my errors:
    Code:
    2009/06/16 14:46:50 - Trans - This transformation can be replayed with replay date: 2009/06/16 14:46:50
    2009/06/16 14:46:50 - ## TEST DATA ##.0 - Finished processing (I=0, O=0, R=0, W=10, U=0, E=0)
    2009/06/16 14:46:50 - Modified Java Script Value.0 - ERROR (version 3.2.0-GA, build 10559 from 2009-05-08 13.07.51 by buildguy) : Unexpected error : 
    2009/06/16 14:46:50 - Modified Java Script Value.0 - ERROR (version 3.2.0-GA, build 10559 from 2009-05-08 13.07.51 by buildguy) : org.pentaho.di.core.exception.KettleValueException: 
    2009/06/16 14:46:50 - Modified Java Script Value.0 - ERROR (version 3.2.0-GA, build 10559 from 2009-05-08 13.07.51 by buildguy) : Javascript error: 
    2009/06/16 14:46:50 - Modified Java Script Value.0 - ERROR (version 3.2.0-GA, build 10559 from 2009-05-08 13.07.51 by buildguy) : Java class "[Ljava.lang.Object;" has no public instance field or method named "Clone". (script#8)
    2009/06/16 14:46:50 - Modified Java Script Value.0 - ERROR (version 3.2.0-GA, build 10559 from 2009-05-08 13.07.51 by buildguy) : 
    2009/06/16 14:46:50 - Modified Java Script Value.0 - ERROR (version 3.2.0-GA, build 10559 from 2009-05-08 13.07.51 by buildguy) :     at org.pentaho.di.trans.steps.scriptvalues_mod.ScriptValuesMod.addValues(ScriptValuesMod.java:436)
    2009/06/16 14:46:50 - Modified Java Script Value.0 - ERROR (version 3.2.0-GA, build 10559 from 2009-05-08 13.07.51 by buildguy) :     at org.pentaho.di.trans.steps.scriptvalues_mod.ScriptValuesMod.processRow(ScriptValuesMod.java:667)
    2009/06/16 14:46:50 - Modified Java Script Value.0 - ERROR (version 3.2.0-GA, build 10559 from 2009-05-08 13.07.51 by buildguy) :     at org.pentaho.di.trans.step.BaseStep.runStepThread(BaseStep.java:2889)
    2009/06/16 14:46:50 - Modified Java Script Value.0 - ERROR (version 3.2.0-GA, build 10559 from 2009-05-08 13.07.51 by buildguy) :     at org.pentaho.di.trans.steps.scriptvalues_mod.ScriptValuesMod.run(ScriptValuesMod.java:730)
    2009/06/16 14:46:50 - Modified Java Script Value.0 - ERROR (version 3.2.0-GA, build 10559 from 2009-05-08 13.07.51 by buildguy) : Caused by: org.mozilla.javascript.EvaluatorException: Java class "[Ljava.lang.Object;" has no public instance field or method named "Clone". (script#8)
    2009/06/16 14:46:50 - Modified Java Script Value.0 - ERROR (version 3.2.0-GA, build 10559 from 2009-05-08 13.07.51 by buildguy) :     at org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:109)
    2009/06/16 14:46:50 - Modified Java Script Value.0 - ERROR (version 3.2.0-GA, build 10559 from 2009-05-08 13.07.51 by buildguy) :     at org.mozilla.javascript.Context.reportRuntimeError(Context.java:922)
    2009/06/16 14:46:50 - Modified Java Script Value.0 - ERROR (version 3.2.0-GA, build 10559 from 2009-05-08 13.07.51 by buildguy) :     at org.mozilla.javascript.Context.reportRuntimeError(Context.java:978)
    2009/06/16 14:46:50 - Modified Java Script Value.0 - ERROR (version 3.2.0-GA, build 10559 from 2009-05-08 13.07.51 by buildguy) :     at org.mozilla.javascript.Context.reportRuntimeError2(Context.java:948)
    2009/06/16 14:46:50 - Modified Java Script Value.0 - ERROR (version 3.2.0-GA, build 10559 from 2009-05-08 13.07.51 by buildguy) :     at org.mozilla.javascript.NativeJavaArray.get(NativeJavaArray.java:98)
    2009/06/16 14:46:50 - Modified Java Script Value.0 - ERROR (version 3.2.0-GA, build 10559 from 2009-05-08 13.07.51 by buildguy) :     at org.mozilla.javascript.ScriptableObject.getProperty(ScriptableObject.java:1575)
    2009/06/16 14:46:50 - Modified Java Script Value.0 - ERROR (version 3.2.0-GA, build 10559 from 2009-05-08 13.07.51 by buildguy) :     at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThis(ScriptRuntime.java:2166)
    2009/06/16 14:46:50 - Modified Java Script Value.0 - ERROR (version 3.2.0-GA, build 10559 from 2009-05-08 13.07.51 by buildguy) :     at org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:117)
    2009/06/16 14:46:50 - Modified Java Script Value.0 - ERROR (version 3.2.0-GA, build 10559 from 2009-05-08 13.07.51 by buildguy) :     at org.mozilla.javascript.gen.c40._c0(script:8)
    2009/06/16 14:46:50 - Modified Java Script Value.0 - ERROR (version 3.2.0-GA, build 10559 from 2009-05-08 13.07.51 by buildguy) :     at org.mozilla.javascript.gen.c40.call(script)
    2009/06/16 14:46:50 - Modified Java Script Value.0 - ERROR (version 3.2.0-GA, build 10559 from 2009-05-08 13.07.51 by buildguy) :     at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:401)
    2009/06/16 14:46:50 - Modified Java Script Value.0 - ERROR (version 3.2.0-GA, build 10559 from 2009-05-08 13.07.51 by buildguy) :     at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3003)
    2009/06/16 14:46:50 - Modified Java Script Value.0 - ERROR (version 3.2.0-GA, build 10559 from 2009-05-08 13.07.51 by buildguy) :     at org.mozilla.javascript.gen.c40.call(script)
    2009/06/16 14:46:50 - Modified Java Script Value.0 - ERROR (version 3.2.0-GA, build 10559 from 2009-05-08 13.07.51 by buildguy) :     at org.mozilla.javascript.gen.c40.exec(script)
    2009/06/16 14:46:50 - Modified Java Script Value.0 - ERROR (version 3.2.0-GA, build 10559 from 2009-05-08 13.07.51 by buildguy) :     at org.pentaho.di.trans.steps.scriptvalues_mod.ScriptValuesMod.addValues(ScriptValuesMod.java:355)
    2009/06/16 14:46:50 - Modified Java Script Value.0 - ERROR (version 3.2.0-GA, build 10559 from 2009-05-08 13.07.51 by buildguy) :     ... 3 more
    2009/06/16 14:46:50 - Modified Java Script Value.0 - Finished processing (I=0, O=0, R=1, W=0, U=0, E=1)
    2009/06/16 14:46:50 - Kettle - Transformation detected one or more steps with errors.
    2009/06/16 14:46:50 - Kettle - Transformation is killing the other steps!

  2. #2
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    Use the "clone row" step?
    Look at the 3.0 migration guide on the wiki?

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.