cancel
Showing results for 
Search instead for 
Did you mean: 

Demo Setup REST not working

smee82
Champ in-the-making
Champ in-the-making
Hello,

i'm new to activiti an tried the demo setup. Now i wanted to test the REST-Service but i only get HTTP Status 404. My Tomcat Webapps Activit-rest folder only contains a WEB-INF/lib Folder with an activiti-engines-example.jar. Is there anything wrong with my demo-setup and how can i manually deploy the rest-service and bring it to work?

Thanks for your answers.
4 REPLIES 4

trademak
Star Contributor
Star Contributor
Hi,

That doesn't sound right. Did you do a "ant demo.start" in the setup directory?

Best regards,

smee82
Champ in-the-making
Champ in-the-making
Yes I did, and the activiti-explorer is working but not the rest-service. I don't like to redo the setup from the start, because i also had proxy problems with the build script. Is there a way to fix the rest thing (copy files manually, configure tomcat etc…..)?
This is the current output when i start the demo:

D:\Programme\Activiti\activiti-5.7\setup>ant demo.start
Buildfile: D:\Programme\Activiti\activiti-5.7\setup\build.xml

demo.install:

internal.cfg.create:
     [copy] Copying 1 file to D:\Programme\Activiti\activiti-5.7\setup\build\act
iviti-cfg
      [zip] Building zip: D:\Programme\Activiti\activiti-5.7\setup\build\activit
i-cfg.jar
     [echo] copying configuration to ../workspace/activiti-engine-examples/src/m
ain/config
    [unzip] Expanding: D:\Programme\Activiti\activiti-5.7\setup\build\activiti-c
fg.jar into D:\Programme\Activiti\activiti-5.7\workspace\activiti-engine-example
s\src\main\config

internal.classpath.libs:

internal.taskdef.launch:

h2.start:
     [echo] starting H2 database…
   [launch] launching cmd 'D:\Programme\Activiti\activiti-5.7\apps\h2\h2.start.b
at ' in dir 'D:\Programme\Activiti\activiti-5.7\apps\h2'
   [launch] waiting for launch completion msg 'TCP server running on'…
   [launch]   TCP server running on tcp://X.X.X.X:9092 (others can connect)
     [echo] H2 database started

tomcat.start:
   [launch] launching cmd 'D:\Programme\Activiti\activiti-5.7\apps\apache-tomcat
-6.0.32\bin\startup.bat ' in dir 'D:\Programme\Activiti\activiti-5.7\apps\apache
-tomcat-6.0.32\bin'
   [launch] waiting for launch completion msg 'Using CLASSPATH:'…
   [launch]   Using CATALINA_BASE:   "D:\Programme\Activiti\activiti-5.7\apps\ap
ache-tomcat-6.0.32"
   [launch]   Using CATALINA_HOME:   "D:\Programme\Activiti\activiti-5.7\apps\ap
ache-tomcat-6.0.32"
   [launch]   Using CATALINA_TMPDIR: "D:\Programme\Activiti\activiti-5.7\apps\ap
ache-tomcat-6.0.32\temp"
   [launch]   Using JRE_HOME:        "C:\Program Files (x86)\Java\jdk1.6.0_27\"
   [launch]   Using CLASSPATH:       "D:\Programme\Activiti\activiti-5.7\apps\ap
ache-tomcat-6.0.32\bin\bootstrap.jar"

explorer.browser.open:

demo.start:

BUILD SUCCESSFUL
Total time: 11 seconds

trademak
Star Contributor
Star Contributor
Right, you can look in the setup/build.xml in the Activiti installation directory.
There's a target named deploy.activiti.webapps.into.tomcat, you may want to run that one again.
Make sure the previous Activiti REST webapp build in the setup/build/webapps dir and the Tomcat webapps dir are deleted beforehand.

Best regards,

smee82
Champ in-the-making
Champ in-the-making
Thanks for your help  Smiley Very Happy
I used target deploy.activiti.webapps.into.tomcat as you said and it worked.
Also testet the rest service via Putty. The Http Basic Authentication is not really explained in the user guide. So i think the following could help others trying to access the rest service.
(kermit:kermit encoded in base64 -> a2VybWl0Omtlcm1pdA==)

GET /activiti-rest/service/user/kermit HTTP/1.1
Host: localhost
Authorization: Basic a2VybWl0Omtlcm1pdA==

HTTP/1.1 200 OK
Date: Wed, 19 Oct 2011 12:47:15 GMT
Accept-Ranges: bytes
Server: Restlet-Framework/2.0.8
Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked

55
{"firstName":"Kermit","lastName":"the Frog","email":"kermit@localhost","id":"kermit"}
0