Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: indexOf is not defined running a transform through the BI Server

  1. #1

    Default indexOf is not defined running a transform through the BI Server

    Hi,

    I'm getting the following when running a job that calls a transform via an xaction through the bi server (1.6.0.GA.863)..

    Code:
    2007-12-19 18:17:14,349 ERROR [padFields.0] padFields.0 - Javascript error: org.mozilla.javascript.EcmaError: ReferenceError: "indexOf" is not defined. (script#3)
    2007-12-19 18:17:14,349 ERROR [padFields.0] padFields.0 - Error stack trace: 
    org.mozilla.javascript.EcmaError: ReferenceError: "indexOf" is not defined. (script#3)
        at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3226)
        at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3216)
        at org.mozilla.javascript.ScriptRuntime.notFoundError(ScriptRuntime.java:3289)
        at org.mozilla.javascript.ScriptRuntime.getNameFunctionAndThis(ScriptRuntime.java:1891)
        at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:93)
        at org.mozilla.javascript.gen.c8._c0(script:3)
        at org.mozilla.javascript.gen.c8.call(script)
        at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:337)
        at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2755)
        at org.mozilla.javascript.gen.c8.call(script)
        at org.mozilla.javascript.gen.c8.exec(script)
        at be.ibridge.kettle.trans.step.scriptvalues_mod.ScriptValuesMod.addValues(ScriptValuesMod.java:254)
        at be.ibridge.kettle.trans.step.scriptvalues_mod.ScriptValuesMod.processRow(ScriptValuesMod.java:483)
        at be.ibridge.kettle.trans.step.scriptvalues_mod.ScriptValuesMod.run(ScriptValuesMod.java:544)
    
    2007-12-19 18:17:14,411 ERROR [tHeader] tHeader - Errors detected!
    2007-12-19 18:17:14,411 ERROR [tHeader] tHeader - Errors detected!
    2007-12-19 18:17:14,474 ERROR [org.pentaho.plugin.kettle.KettleComponent] 9f7f9725-ae5e-11dc-a2b5-813c53b8d910:COMPONENT:context-18187413-1198088234053:extractInvoices.xactionKettle.ERROR_0014 - Error occurred during transformation execution
    2007-12-19 18:17:14,474 ERROR [org.pentaho.plugin.kettle.KettleComponent] 9f7f9725-ae5e-11dc-a2b5-813c53b8d910:COMPONENT:context-18187413-1198088234053:extractInvoices.xactionKettle.ERROR_0014 - Error occurred during transformation execution
    2007-12-19 18:17:14,474 ERROR [org.pentaho.core.runtime.RuntimeContext] 9f7f9725-ae5e-11dc-a2b5-813c53b8d910:RUNTIME:context-18187413-1198088234053:extractInvoices.xaction RuntimeContext.ERROR_0012 - ActionDefinition for KettleComponent did not execute successfully
    2007-12-19 18:17:14,474 ERROR [org.pentaho.core.runtime.RuntimeContext] 9f7f9725-ae5e-11dc-a2b5-813c53b8d910:RUNTIME:context-18187413-1198088234053:extractInvoices.xaction RuntimeContext.ERROR_0012 - ActionDefinition for KettleComponent did not execute successfully
    2007-12-19 18:17:14,474 ERROR [org.pentaho.core.solution.SolutionEngine] 9f7f9725-ae5e-11dc-a2b5-813c53b8d910:SOLUTION-ENGINE:extractInvoices.xaction: SolutionEngine.ERROR_0007 - Action sequence execution failed
    2007-12-19 18:17:14,474 ERROR [org.pentaho.core.solution.SolutionEngine] 9f7f9725-ae5e-11dc-a2b5-813c53b8d910:SOLUTION-ENGINE:extractInvoices.xaction: SolutionEngine.ERROR_0007 - Action sequence execution failed
    We normally run PDI version 3.0 so I had expected this was because I hadn't upgraded the version inside my BI server so I followed the info on the wiki and I can't start the BI server as the common.jar mentioned to use in the jira note - http://jira.pentaho.org/browse/PDI-22 clashes with the one used by BIRT so the BIRT listenerservice doesn't fire therefore. If I leave the common.jar out I am able to start the server but of course the kettle plugin builds with errors so thats a waste of time!

    One question that may be linked to this and makes me wonder if the BI server is stil actually using the 2.5.1 jar is that one of the other source components PMDUICOmpnent.java in package org.pentaho.ui.component references be.ibridge.kettle.core.list.UniqueList so I had to leave the 2.5.1 jar in.

    I'm not a java programmer by trade, so have I done something wrong in the rebuild of the pentaho.war or is there infact something wrong with my transform? Oh yes, I tried the javascript component in 3.0 mode and in compatability mode too.

    Thanks alot,

    stevens_ns

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

  3. #3

    Default

    Hi Sven,

    Yes I did follow those, built the new pentaho-classes directory and placed the resulting org, com and the resource files into the j2ee manual deployment structure along with the updated and new jar's and then built a new pentaho.war.

    The only problem is those steps don't seem to be complete, if you follow those to the letter the rebuild in eclipse fails on line 300 of the new KettleComponent.java
    jobMeta = new JobMeta(logWriter, doc.getFirstChild(), repository, null);
    So thats when I checked out that jira entry and tried the common.jar, which seems to fix the kettle build issues but breaks BIRT.

    Its also not clear whether you should delete the old 2.5.1a kettle jar or not, I assumed not due to the other dependancy.

    Cheers,

    stevens_ns

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

    Default

    The 2.5 and 3.0 jar files can coexist, but the KettleComponent you use should use the org.pentaho code and not be.ibridge.

    Regards,
    Sven

  5. #5

    Default

    OK yes thats all fine then as that's the setup I have with the new KettleComponent copied over from the wiki. So how do I get around the common.jar dependancy issue? I haven't changed any other part of the j2ee manual deployment files, its a standard 1.6GA other than these changes.

    Cheers,

    Nicole

  6. #6

    Default

    Ok,

    Gave up trying to compile 3.0 into 1.6GA, will wait until its in a GA of the BI server.

    However haveing rewritten the extract in 2.5.2 of Kettle I still get the same error which is below.

    Is there a problem with the indexOf funcitonality working through the BI Server?

    Cheers,

    Stevens_ns

    09:18:08,790 ERROR [0] padFields.0 - Javascript error: org.mozilla.javascript.EcmaError: ReferenceError: "indexOf" is not defined. (script#3)
    09:18:08,790 ERROR [0] padFields.0 - Error stack trace:
    org.mozilla.javascript.EcmaError: ReferenceError: "indexOf" is not defined. (script#3)
    at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3226)
    at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3216)
    at org.mozilla.javascript.ScriptRuntime.notFoundError(ScriptRuntime.java:3289)
    at org.mozilla.javascript.ScriptRuntime.getNameFunctionAndThis(ScriptRuntime.java:1891)
    at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:93)

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.