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™ SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot™ 64-Bit Server VM (build 24.71-b01, mixed mode)
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.
Here is the full procedure to run the example, adapted to BonitaBPM version 7.1.0 :
Download the source of the example from GitHub.
Edit the tag with your version in bonita-examples-master/rest-api-example/pom.xml
Update the version :
org.bonitasoft.engine
bonita-client
7.1.0
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
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.
Bonitasoft empowers development teams with Bonita, the open-source and extensible platform to solve the most demanding process automation use cases. The Bonita platform accelerates delivery of complex applications with clear separation between capabilities for visual programming and for coding. Bonita integrates with existing solutions, orchestrates heterogeneous systems, and provides deep visibility into processes across the organization.