Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: javascript bug in 3.1

  1. #1

    Default javascript bug in 3.1

    2008/01/10 16:26:43 - parse xml dates.0 - ERROR (version 3.1.0, build 7 from 2008/01/10 16:18:11) : Unexpected error
    2008/01/10 16:26:43 - parse xml dates.0 - ERROR (version 3.1.0, build 7 from 2008/01/10 16:18:11) : java.lang.IllegalStateException: Calling Context.exit without previous Context.enter
    2008/01/10 16:26:43 - parse xml dates.0 - ERROR (version 3.1.0, build 7 from 2008/01/10 16:18:11) : at org.mozilla.javascript.Context.exit(Context.java:419)
    2008/01/10 16:26:43 - parse xml dates.0 - ERROR (version 3.1.0, build 7 from 2008/01/10 16:18:11) : at org.mozilla.javascript.Context.exit(Context.java:411)
    2008/01/10 16:26:43 - parse xml dates.0 - ERROR (version 3.1.0, build 7 from 2008/01/10 16:18:11) : at org.pentaho.di.trans.steps.scriptvalues_mod.ScriptValuesMod.dispose(ScriptValuesMod.java:799)
    2008/01/10 16:26:43 - parse xml dates.0 - ERROR (version 3.1.0, build 7 from 2008/01/10 16:18:11) : at org.pentaho.di.trans.step.BaseStep.runStepThread(BaseStep.java:2419)
    2008/01/10 16:26:43 - parse xml dates.0 - ERROR (version 3.1.0, build 7 from 2008/01/10 16:18:11) : at org.pentaho.di.trans.steps.scriptvalues_mod.ScriptValuesMod.run(ScriptValuesMod.java:812)
    2008/01/10 16:26:43 - parse xml dates.0 - Finished processing (I=0, O=0, R=68, W=68, U=0, E=0)
    2008/01/10 16:26:43 - durations to float.0 - ERROR (version 3.1.0, build 7 from 2008/01/10 16:18:11) : Unexpected error
    2008/01/10 16:26:43 - durations to float.0 - ERROR (version 3.1.0, build 7 from 2008/01/10 16:18:11) : java.lang.IllegalStateException: Calling Context.exit without previous Context.enter
    2008/01/10 16:26:43 - durations to float.0 - ERROR (version 3.1.0, build 7 from 2008/01/10 16:18:11) : at org.mozilla.javascript.Context.exit(Context.java:419)
    2008/01/10 16:26:43 - durations to float.0 - ERROR (version 3.1.0, build 7 from 2008/01/10 16:18:11) : at org.mozilla.javascript.Context.exit(Context.java:411)
    2008/01/10 16:26:43 - durations to float.0 - ERROR (version 3.1.0, build 7 from 2008/01/10 16:18:11) : at org.pentaho.di.trans.steps.scriptvalues_mod.ScriptValuesMod.dispose(ScriptValuesMod.java:799)
    2008/01/10 16:26:43 - durations to float.0 - ERROR (version 3.1.0, build 7 from 2008/01/10 16:18:11) : at org.pentaho.di.trans.step.BaseStep.runStepThread(BaseStep.java:2419)
    2008/01/10 16:26:43 - durations to float.0 - ERROR (version 3.1.0, build 7 from 2008/01/10 16:18:11) : at org.pentaho.di.trans.steps.scriptvalues_mod.ScriptValuesMod.run(ScriptValuesMod.java:812)
    2008/01/10 16:26:43 - durations to float.0 - Finished processing (I=0, O=0, R=68, W=68, U=0, E=0)
    2008/01/10 16:26:43 - fill in null routing centre.0 - ERROR (version 3.1.0, build 7 from 2008/01/10 16:18:11) : Unexpected error
    2008/01/10 16:26:43 - fill in null routing centre.0 - ERROR (version 3.1.0, build 7 from 2008/01/10 16:18:11) : java.lang.IllegalStateException: Calling Context.exit without previous Context.enter
    2008/01/10 16:26:43 - fill in null routing centre.0 - ERROR (version 3.1.0, build 7 from 2008/01/10 16:18:11) : at org.mozilla.javascript.Context.exit(Context.java:419)
    2008/01/10 16:26:43 - fill in null routing centre.0 - ERROR (version 3.1.0, build 7 from 2008/01/10 16:18:11) : at org.mozilla.javascript.Context.exit(Context.java:411)
    2008/01/10 16:26:43 - fill in null routing centre.0 - ERROR (version 3.1.0, build 7 from 2008/01/10 16:18:11) : at org.pentaho.di.trans.steps.scriptvalues_mod.ScriptValuesMod.dispose(ScriptValuesMod.java:799)
    2008/01/10 16:26:43 - fill in null routing centre.0 - ERROR (version 3.1.0, build 7 from 2008/01/10 16:18:11) : at org.pentaho.di.trans.step.BaseStep.runStepThread(BaseStep.java:2419)
    2008/01/10 16:26:43 - fill in null routing centre.0 - ERROR (version 3.1.0, build 7 from 2008/01/10 16:18:11) : at org.pentaho.di.trans.steps.scriptvalues_mod.ScriptValuesMod.run(ScriptValuesMod.java:812)

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

    Default

    Example transformation? It seems to get added when no values are added to the rows in Javascript.

    Regards,
    Sven

  3. #3

    Default

    //Script here
    // import org.joda.time.*
    Packages.org.joda.time.format


    var parser = Packages.org.joda.time.format.ISODateTimeFormat.dateTimeParser()

    var start_date = makeDate(startDate)
    var last_data_received_at = makeDate(lastDataReceivedAt)
    var logon = makeDate(sLogon)

    function makeDate(myField)
    {
    if (myField.isNull())
    return null
    else
    return parser.parseDateTime(myField.getString()).toGregorianCalendar().getTime()
    }

  4. #4

    Default

    I'm definitely adding data in the general case - the transformation is outputting start_date and the other 2 date variables as type date

    Maybe it's the use of Packages, but I don't understand js interpreters - they've changed since I embedded one about 6 years ago.

    This is certainly a regression error though - on the build from 31st December it was fine

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

    Default

    Created you a JIRA: http://jira.pentaho.org/browse/PDI-640

    Regards,
    Sven

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.