// Log in using a basic authorization header
// Note: Do not call the Service.login method
Service service = new Service("xyz.xyz.xyz.xyz", 8089);
String credentials = "username:password";
String basicAuthHeader = Base64.encode(credentials.getBytes());
service.setToken("Basic " + basicAuthHeader);
// Print the session token
System.out.println("Your session token: " + service.getToken());
Getting exception this LINE
// Create the job
InputStream exportStream = service.export(mySearch, jobArgs);
java.lang.RuntimeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at com.splunk.HttpService.send(HttpService.java:326)
at com.splunk.Service.send(Service.java:1211)
at com.splunk.HttpService.get(HttpService.java:130)
at com.splunk.Service.export(Service.java:196)
at com.splunk.Service.export(Service.java:211)
at
... View more