Jump to content
We've recently updated our Privacy Statement, available here ×

atotheroh

Members
  • Posts

    3
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by atotheroh

  1. Hello,
 We recently upgraded our dev server to 6.1 and now a job I've made that authenticates with the Java REST APIs is failing during authentication with a null pointer. The code that fails: client = new JasperserverRestClient(configuration);clientAuthenticated = client.authenticate(jasperusername, jasperpassword);[/code]
 The error trace: Exception in thread "main" java.lang.NullPointerException at com.jaspersoft.jasperserver.jaxrs.client.core.SessionStorage.login(SessionStorage.java:111) at com.jaspersoft.jasperserver.jaxrs.client.core.SessionStorage.init(SessionStorage.java:97) at com.jaspersoft.jasperserver.jaxrs.client.core.SessionStorage.<init>(SessionStorage.java:56) at com.jaspersoft.jasperserver.jaxrs.client.core.JasperserverRestClient.authenticate(JasperserverRestClient.java:47)[/code] 
 What changed with 6.1 / Spring 3 that I need to address? I am unable to find any information in the documentation or community that indicates incompatibility between the Java REST APIs and 6.1. Thank you!
  2. Hello, I have been searching the API's for a while trying to find a relevant class/method but cannot figure out if it is possible to export Ad Hoc views programmatically using the Java API's. Is this possible? And if so, what methods would I be looking at? Thank you!
  3. Hello, I am an intern and I've only been working with JasperServer for a short amount of time, so please forgive me if I confuse terminology or say something stupid. I have a Java app that uses the REST API to test our reports. It simply executes them and checks for http 200 status. We want to do the same thing for the ad hoc views we have, but apparently it wasn't possible when they first created the app. I'm wondering if it is now possible with the new REST API and if so, what classes should I be looking to use? For reports, we currently use this: OperationResult<ClientResourceListWrapper> resultReport = client .authenticate(jasperusername, jasperpassword) .resourcesService() .resources() .parameter(ResourceSearchParameter.FOLDER_URI, folder) .parameter(ResourceSearchParameter.TYPE,"ReportUnit") .parameter(ResourceSearchParameter.RECURSIVE, "true") .search(); ClientResourceListWrapper reportResourceListWrapper = resultReport.getEntity();OperationResult<InputStream> reportrun = client .authenticate(jasperusername, jasperpassword) .reportingService() .report(cs.getUri()) .prepareForRun(ReportOutputFormat.HTML, 1) .run(); // InputStream report = reportrun.getEntity(); int responsestatus=reportrun.getResponse().getStatus();[/code]I can't get it to work by using .parameter(ResourceSearchParameter.TYPE,"AdhocDataView") or .parameter(ResourceSearchParameter.TYPE,"AdhocReportUnit"). For AdhocDataView, I get an error: invalid value for reportURI parameter. For AdhocReportUnit, I get a null pointer exception. Any advice is greatly appreciated. Thank you!
×
×
  • Create New...