Jump to content
Changes to the Jaspersoft community edition download ×

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


ganesh.simhadri

Recommended Posts

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:UsersBizAct20Desktoprestapicodesampletargetsurefire-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 

 

 

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

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

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...