mendix / RestServices

REST service module for Mendix. Supports consuming and publishing REST based services and real-time data synchronization. Supports JSON, form-encoded, multipart and binary data transport.
Apache License 2.0
31 stars 46 forks source link

Won't run local or in Sandbox #2

Closed ArthurvdMolen closed 10 years ago

ArthurvdMolen commented 10 years ago

I have downloaded the project but if fails to run local (JDBC error) or in Sandbox (many appcloud) errors. Maybe it has to do the setup of projects within Mendix? I use Modeler 5.3.2

mweststrate commented 10 years ago

Hi Arthur,

After importing modules in Mendix there is usually some setup required. See the readme (https://github.com/mendix/RestServices#getting-started) for more details. Note that you have to connect some layouts to your own project as well (I will make that a bit easier in the next release). If you have any further questions, feel free to post them, but make sure to include the actual error message.

Michel

ArthurvdMolen commented 10 years ago

Hi Michel,

First I have read the instructions more carefull and I understand I should not use build in database. I found a postgres portable version that will run under windows. I think there ar some folders etc that would benefit from some cleanup...

The postgres I found is http://wiki.gnumed.de/bin/view/Gnumed/InstallerGuidePortable

mweststrate commented 10 years ago

Hi Arthur,

Were you able to get any further? If you are still stuck don't hesitate to post the details here.

Michel

mweststrate commented 10 years ago

Hi Arthur,

I just added the original source of the Rijksmuseum demo to this repository, if you were still stuck, that might help you out: https://github.com/mendix/RestServices/raw/master/demos/rijksmuseum.mpk

Regards,

Michel

ArthurvdMolen commented 10 years ago

Hi Michel,

I downloaded the full package but both local and in sandbox it throws an error. I did check the API key (I have one)

com.mendix.modules.microflowengine.MicroflowException: com.mendix.core.CoreRuntimeException: java.security.AccessControlException: access denied ("java.net.SocketPermission" "localhost:0" "listen,resolve") at MyFirstModule.IVK_SearchRijksmuseum (JavaAction : 'Invoke GET 'https://www.rijksmuseum.nl/api/en/collection/', use query param 'q' from the Query object and store results in newResults')

I disabled my local firewall so my question is what is the security issue Mendix reports...

mweststrate commented 10 years ago

Hi Arthur,

Which Mendix version are you using? I just downloaded the model and have no problem running it locally with Mendix 5.3.1 out of the box.

ArthurvdMolen commented 10 years ago

I run last version 5.3.2 1789 and for old project 4.7.2. Do you think it is caused by this version change???? I want to use both REST and WDSL for education at Hogeschool Rotterdam so I would like to get it working... If you are located in Rdam we could meet some time in the future... I so problaly something wrong but I have no idea where to start.

mweststrate commented 10 years ago

Hi Arthur,

I have tried to reproduce the issue, I wasn't able to reproduce it when deploying locally, but I receive the same error when deploying to new sandboxes, so i'll investigate whether something has changed in the default permissions of sandboxes.

mweststrate commented 10 years ago

Hi Arthur,

after diving a bit further into this, it seems to relate to the java version you are running. Can you open a console and run 'java -version' and post the output here?

mweststrate commented 10 years ago

Confirmed, it relates to the JVM version. redeploying to a sandbox should solve the issue.

For local deployments, you need to either

the permission needed is: "java.net.SocketPermission" "localhost:0" "listen,resolve"

mweststrate commented 10 years ago

Hmm, you can skip all that, just disable 'emulate cloud security' under your project settings to be able to run it locally.

mweststrate commented 10 years ago

Hi Arthur,

I was wondering whether changing the above setting (when running locally) solves the issue for you, and that you can now correctly run the app in a sandbox.

Besides that, if you ever want to visit our office, just drop me a message, we could schedule a lunch appointment.

Michel

ArthurvdMolen commented 10 years ago

Hi Michel,

Setting the cloud emulation fixed the issues, it now runs in the sandbox and localy. The first project I would like to branch from this examples is an interface with Yammer API and for WDSL I would like to make an demo to interface with Wikispaces. Thanks for helping out!!