k.Herkt Posted February 10, 2016 Share Posted February 10, 2016 HelloI just tryed the jasper repository guide on the following link:http://community.jaspersoft.com/documentation/tibco-jasperreports-server-ultimate-guide/v610/repository-apiI 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.FolderImplI 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.RepoFolderI 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 Link to comment Share on other sites More sharing options...
Solution marianol Posted February 10, 2016 Solution Share Posted February 10, 2016 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 Guide: http://community.jaspersoft.com/documentation/tibco-jasperreports-server-web-services-guide/v610/introduction-0 there look for "REST v2 - Repository Services"For reference Jaspersoft Studio interacts with the Server using this same REST API. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now