'Repository API' Documentation wrong? - missing libraries 'com.jaspersoft...'

0

Hello

I just tryed the jasper repository guide on the following link:
http://community.jaspersoft.com/documentation/tibco-jasperreports-server...

I want to access my reports via the 'RepositoryService', but i was not able to compile the code in the given link under the title 'Working with Folders'.
So i tryed to look up the required libraries.

I use 'JasperReports Server Community Edition (v6.1.0)'  - and all potential libraries i found, to make this code working are:
* jasperreports-6.1.0.jar (packages starting with net.sf....)
* jasperserver-api-metadata-impl-6.1.0.jar (and this one is hard to find, because it is not under 'http://community.jaspersoft.com/project/jasperreports-library/releases')

But i am still not able to find the following classes:
* com.jaspersoft.jasperserver.api.common.domain.ExecutionContext
* com.jaspersoft.jasperserver.api.metadata.common.service.RepositoryService
* com.jaspersoft.jasperserver.api.metadata.common.domain.client.FolderImpl


I found similar classes in the libraries i mentioned some lines above:
* ExecutionContext (no similar class found)
* com.jaspersoft.jasperserver.api.metadata.common.service.impl.hibernate.HibernateRepositoryService
* com.jaspersoft.jasperserver.api.metadata.common.service.impl.hibernate.persistent.RepoFolder


I am still not able to compile/execute the following line, because of missing and/or incompatible classes (ExecutionContext):
hibernateRepositoryService.saveResource( . . . , myFolder);
repositoryService.saveFolder( . . . , myFolder);


Am i missing something?
Is this documentation correct/up-to-date?
How can i access my reports via java (for example RepositoryService)?
And, IF this code is working, how can i get an (or the) instance of RepositoryService?

Thanks

k.Herkt's picture
11
Joined: Feb 10 2016 - 4:00am
Last seen: 1 year 8 months ago

1 Answer:

1

The API Docs that you linked is from JasperReports Server ans should be on the Server source code (not the JR Library which is the one you linked) So under here: http://community.jaspersoft.com/project/jasperreports-server/releases get the jasperreports-server-cp-x.x.x-src.zip where x.x.x is your version of Jasper Server. 

If you just need the jars you will find them under WEB-INF/lib or in the JasperServer Manual installer jasperreports-server-cp-x.x.x-bin.zip on that same link.

Anyway... you may find a lot easier to interact with your Jasperserver via the REST API, trust me it will make your life easier and those APIs don't change (or at least not drastically) form version to version. You will find the REST API docs in the JRS Web Services Guidehttp://community.jaspersoft.com/documentation/tibco-jasperreports-server... there look for "REST v2 - Repository Services"

For reference Jaspersoft Studio interacts with the Server using this same REST API.

 

marianol's picture
4655
Joined: Sep 13 2011 - 8:04am
Last seen: 11 months 3 weeks ago
Feedback
randomness