Exception in REST API when querying for inputControl or options

I'm kind of new to Jasper so forgive me if I've missing something obvious. 

We're building a system that is going to provide a very simple interface for users to view and run some reports. I'm trying to use the REST API to do the following: 

1. List the reports that the user can run. This works using some folders and role permissions to limit the view. 
2. Present a simple form to the user based on the parameters needed to run the report (this is where my problem is) 
3. Fill out the form and run the report (not there yet) 

I have Jasper community edition 4.7 installed and running on localhost:9090. 

Listing the report units or jrxml files in a folder works just fine. 

curl -q -ujasperadmin:jasperadmin http://localhost:9090/jasperserver/rest/resources/reports/samples/?type=reportUnit | grep Freight 

Cool. Found the Freight report in the /reports/samples directory. 

Now I'd like to query the API for the availabale parameters and make a simple form. Both of the following calls result in a stacktrace in 

curl -s -ujasperadmin:jasperadmin http://localhost:9090/jasperserver/rest_v2/reports/reports/samples/Freight/options/
curl -s -ujasperadmin:jasperadmin http://localhost:9090/jasperserver/rest_v2/reports/samples/Freight/options/

curl -s -ujasperadmin:jasperadmin http://localhost:9090/jasperserver/rest_v2/reports/reports/samples/Freight/inputControl/
curl -s -ujasperadmin:jasperadmin http://localhost:9090/jasperserver/rest_v2/reports/samples/Freight/options/inputControl/

The double /reports/reports in the first calls is there since the API docs specifies rest_v2/reports/ as the service. 

Here's the top of the stacktrace. Not super helpful 

com.sun.jersey.api.NotFoundException: null for uri: http://localhost:9090/jasperserver/rest_v2/serverInfo/version
  at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1484) 
  at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1414) 
  at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1363) 
  at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1353) 
  at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:414) 
  at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537) 
  at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:708) 
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 

At this point in the trace its just servlet filters and tomcat classes. 

Any help would be much appreciated. 

Erik Froese

erik.froese's picture
Joined: Nov 21 2012 - 9:11am
Last seen: 10 years 5 months ago
FYI I don't see this in jasper server 5.0. Is the community edition available yet?
erik.froese - 10 years 6 months ago

0 Answers:

No answers yet