How to run the sample program given in Getting Started with REST Web Service API?

0

As it was mentioned in http://community.jaspersoft.com/wiki/getting-started-rest-web-service-api  Example -> executing the sample code i did mvn test i am getting the following

Running com.jaspersoft.jasperserver.rest.sample.BasicResourceCRUDTest

log4j:WARN No appenders could be found for logger (com.jaspersoft.jasperserver.rest.sample.RestAPIUtils).
log4j:WARN Please initialize the log4j system properly.
 INFO [com.jaspersoft.jasperserver.rest.sample.RestAPIUtils] sending Request. url: http://localhost:8080/jasperserver-pro/rest/resource req verb: PUT
 INFO [com.jaspersoft.jasperserver.rest.sample.RestAPIUtils] response status line: HTTP/1.1 403 Forbidden
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 2.538 sec <<< FAILURE!
 
Results :
 
Failed tests:   com.jaspersoft.jasperserver.rest.sample.BasicResourceCRUDTest: basic response check did not pass
 
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15.809s
[INFO] Finished at: Fri Jun 21 10:54:18 IST 2013
[INFO] Final Memory: 7M/106M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test (default-test) on project RESTCodeSample: There are test failures.
[ERROR] 
[ERROR] Please refer to C:\Users\BizAct20\Desktop\restapicodesample\target\surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
 
can any one help me 

 

 

ganesh.simhadri's picture
Joined: Jun 18 2013 - 3:46am
Last seen: 5 years 2 months ago

2 Answers:

0

Did you perhaps run the test twice? It creates a folder on the jasperserver, which won´t be deleted automatically. So, before re-running, you have to delete by yourself the folder.

If not, did you check the login credentials? Maybe you changed username and/or password on jasperserver? You would have to change this in the sample package too, there is a class with constants including username and password somewhere.

Cheers, Thomas 

http://www.thomaszimmer.net

Thomas Zimmer's picture
Joined: Oct 2 2012 - 1:35am
Last seen: 6 days 8 min ago

For the first time itself it reported failure. and my login username and password are similar to jasperserver.

thanks for responding.

ganesh.simhadri - 6 years 4 months ago
0

Answering my self the problem is due to embedded maven in eclipse 

Have a look at the following link 
http://usersprofile.blogspot.in/2013/06/how-to-run-sample-program-given-in.html

 

 

ganesh.simhadri's picture
Joined: Jun 18 2013 - 3:46am
Last seen: 5 years 2 months ago
Feedback