Running rest-api-example throws HTTP error code : 500 : Internal Server Error
I am running the rest-api-example from the documentation and I get the following error:
Deploying organization ... Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: Failed : HTTP error code : 500 : Internal Server Error at org.bonitasoft.example.App.importOrganizationFromFile(App.java:275) at org.bonitasoft.example.App.importOrganization(App.java:251) at org.bonitasoft.example.App.start(App.java:134) at org.bonitasoft.example.App.main(App.java:114) Caused by: java.lang.RuntimeException: Failed : HTTP error code : 500 : Internal Server Error at org.bonitasoft.example.App.ensureStatusOk(App.java:244) at org.bonitasoft.example.App.consumeResponse(App.java:215) at org.bonitasoft.example.App.importOrganizationFromFile(App.java:269) ... 3 more
I use: Bonita BPMCommunity-6.4.1-Tomcat-7.0.55
java version "1.7.0_71" Java(TM) SE Runtime Environment (build 1.7.0_71-b14) Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)
Operating System: Windows 8.1 64-bit
How do I solve this problem?
Hi,
Here is the full procedure to run the example, adapted to BonitaBPM version 7.1.0 :
1. Download the source of the example from GitHub.
2. Edit the tag with your version in bonita-examples-master/rest-api-example/pom.xml
3. Update the version :
org.bonitasoft.engine
bonita-client
7.1.0
4. Compile it with Maven: mvn clean install. This creates a jar and a zip file called rest-api-example-1.0.0-SNAPSHOT.jar and rest-api-example-1.0.0-SNAPSHOT.zip.
-
Important : Start your BonitaBPM Tomcat server version 7.1.0. Your tomcat must be up and running, you must see the login page at http://localhost:8080/bonita/ for example.
-
Unzip rest-api-example-1.0.0-SNAPSHOT.zip.
- Go inside the unzipped folder and go to lib folder.
- Open your Studio 7.1.0 and export the ACME organization.
- Replace the ACME.xml file found in rest-api-example-1.0.0-SNAPSHOT/lib/ACME.xml file by the one you've just exported from your Studio.
- Start the application: java -jar rest-api-example-1.0.0-SNAPSHOT.jar
Thanks Are you sure the organization file you try to import is well formatted for version 6.4.1 ? You can try to import it in the portal to make sure that it is valid. You should also check in the logs of your tomcat bundle (logs directory, bonita*.log files). You probably have an error message with a stack trace.
Hope that helps
Hi, Can you provide a link to the documentation page with the example you are referring to, so that we can have a look ?
Anthony
Comments
Here is the link to the example: http://documentation.bonitasoft.com/create-your-first-project-web-rest-a...
Comments
Hi, I can only give you the same answer: Are you sure the organization file you try to import is well formatted for the version of bonita you are using ? You can try to import it in the portal to make sure that it is valid. You should also check in the logs of your tomcat bundle (logs directory, bonita*.log files). You probably have an error message with a stack trace.