I'm new using splunk and the java sdk api.
I combined a grails environnement with that api and getting an error on the simplest search, giving into the doc exemple :
Here is my code :
package fr.ftprod.splunk
import com.splunk.Job
import com.splunk.JobCollection
import com.splunk.Service
class LoginController {
def index() {
//connect and login
def connectionParameters = [host: 'localhost', username: 'username' ,password: 'password']
Service service = Service.connect(connectionParameters)
String myQuery = 'source="source" get status=200'
// Retrieves the collection of search jobs
def jobs = service.getJobs()
}
}
Here is my grails stacktrace :
| Error 2013-06-24 14:15:10,689 [http-bio-8080-exec-10] ERROR errors.GrailsExceptionResolver - UnsupportedOperationException occurred when processing request: [GET] /splunk/ Stacktrace follows: Message: null Line | Method ->> 159 | entrySet in com.splunk.ResourceCollection - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 621 | putAll in java.util.HashMap | 195 | doFilter in grails.plugin.cache.web.filter.PageFragmentCachingFilter | 63 | doFilter in grails.plugin.cache.web.filter.AbstractFilter | 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor | 615 | run
in java.util.concurrent.ThreadPoolExecutor$Worker ^ 722 | run . . . in java.lang.Thread
Any idea ?
Thanks