Getting an error from IBM Workilght Server [This is not a function, it is an “object.”]

Using IBM Worklight Version 6.1.0.02-20160314-1430

Implemented AES on the adapter with a link to the link below. https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/7.1/server-side-development/javascript-adapters/using-java-adapters/

It works fine, as expected in Eclipse on my local server. The generated war file and the same specified deployment for the server. From the server when I try to access the error below.

Cross-checks are listed below.

  • The collected war file from the server, cross-checked for the class file and its present in it

  • Server restart is performed after deployment of the war file

I can not determine where the error is.

The response from the server:

{
  "status": 200,
  "invocationContext": null,
  "errorCode": "PROCEDURE_ERROR",
  "errorMsg": "Procedureinvocationerror.EcmaError: TypeError: Cannotcallpropertyencryptinobject[   JavaPackagecom.winjit.EncryptionDecryption ].Itisnotafunction, itis\"object\". (API_Adapter-impl.js#7)",
  "invocationResult": {
    "isSuccessful": false,
    "warnings": [

    ],
    "errors": [
      "Ecma Error: TypeError: Cannot call property encrypt in object [JavaPackage com.winjit.EncryptionDecryption]. It is not a function, it is \"object\". (API_Adapter-impl.js#7)"
    ],
    "responseID": "3161",
    "info": [

    ]
  }
}
0
2

JDK 1,8

JAR /jre/lib/security

  • local_policy.jar
  • US_export_policy.jar
0

- JDK (Eclipse) (-). JDK 1.6. Java Eclipse. ( Mac).

  • Eclipse → → Java →
  • → 1.6
  • Eclipse → → Java → JRE
  • JDK 1.6 (/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home)
  • ok
  • ( )
  • , bin.

0

All Articles