IBM Worklight 6.1 - “Ecma Error: TypeError: Cannot call property <function> in object”

寵の児 提交于 2019-12-02 10:53:01

问题


I'm trying to run the Java in Worklight Adapters example from the worklightadapterproject smaple project, but I am facing an error when trying to invoke a procedure:

{
   "errors": [
      "Ecma Error: TypeError: Cannot call property addTwoIntegers in object [JavaPackage com.worklight.customcode.Calculator1]. It is not a function, it is \"object\". (C%3A%5CWorklightLab%5Cworkspace%5CWorklightAdaptersProject%5Cadapters%5CCalculatorAdapter\/CalculatorAdapter-impl.js#9)"
   ],
   "info": [
   ],
   "isSuccessful": false,
   "warnings": [
   ]
}

How do I resolve this?

I tried setting this by using the following configuration which didn't work:


回答1:


This has been asked before. See the following questions and their solutions.
This is caused by one of two things:

  1. By not using Java compiler level 1.6 and JRE v1.6 (probably)
  2. Due to a missing segment in the .project file (less likely)

Try option #1 - use JRE 1.6 and Java compiler level 1.6.
Follow the instructions in the answer.



来源:https://stackoverflow.com/questions/20803265/ibm-worklight-6-1-ecma-error-typeerror-cannot-call-property-function-in-o

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!