Running rest-api-example throws HTTP error code : 500 : Internal Server Error

1
0
-1

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?

4 answers

1
+1
-1

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.

  1. 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.

  2. Unzip rest-api-example-1.0.0-SNAPSHOT.zip.

  3. Go inside the unzipped folder and go to lib folder.
  4. Open your Studio 7.1.0 and export the ACME organization.
  5. 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.
  6. Start the application: java -jar rest-api-example-1.0.0-SNAPSHOT.jar

1
0
-1

Hi,

Have you found a way to solve this issue ? I have the same issue now and I don't know why...

Thanks in advance

Comments

Submitted by anthony.birembaut on Tue, 05/19/2015 - 17:51

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.

1
0
-1

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

1
0
-1

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

Submitted by dianapotlog on Thu, 01/22/2015 - 09:28
Notifications