Unable to implement the IBM Watson Connector Suite Example into own project

0
Hi, I've been able to get the IBM Watson Connector Suite Example  to work. However, as soon as I import the modules into my own project, it doesn't work anymore. When I want to start a conversation with Watson, I get these error messages in the Console in Mendix: Error in execution of monitored action 'executeaction' (execution id: 54fc85fec87d2, execution type: CLIENT) No permission to perform the following action while running with cloud security (emulation) enabled: access denied ("java.lang.RuntimePermission" "getenv.VCAP_SERVICES") Error in execution of monitored action 'executeaction' (execution id: 2132a4585bd9940, execution type: CLIENT). NoClassDefFoundError occurred for class 'Could not initialize class watsonservices.utils.ConversationService'. Please make sure the userlib folder of your project includes the correct library which contains this class. An unhandled error occurred in the MxRuntime.   Does anyone know how to solve this problem? Or did anyone else have the same issue? Thank you in advance
asked
2 answers
1

This is because of the emulate cloud security setting.

In Mendix Cloud v3 there is a list of defined JVM actions that an app is allowed to execute. The Modeler ships with the same list, but it is not updated anymore after installation. So a Modeler from 6 months ago will contain the blocklist of (at least) 6 months ago.

I've just verified that the exception you are running into is already included in Mendix Cloud v3. I've asked the team for the Modeler to ensure the up to date list is shipped with the next Modeler release.

To solve your current issue you can either disable cloud security or add the exception above to the policy list manually in your installation in C:\Program Files (x86)\Mendix\X.Y.Z\modeler\runtemplates\deployment\data\security.policy. After that, restart your app locally and you should not experience this problem anymore.

Hope this helps!

answered
0

Have you read the documentation? There are some dependencies. Perhaps some jars are missing in your UserLib folder?

https://github.com/mendix/IBM-Watson-Connector-Suite

answered