Developing for Splunk Platform

Getting XML parsing error while connecting to Splunk via java SDK.

New Member

PFB code

HttpService.setSslSecurityProtocol( SSLSecurityProtocol.TLSv1_2 );

     ServiceArgs serviceArgs = new ServiceArgs();

     // Create a Service instance and log in with the argument map
     Service service = Service.connect(serviceArgs);  // throwing error here 

     for (Application app : service.getApplications().values()) {

PFB the error

[Fatal Error] :1:3: The markup in the document preceding the root element must be well-formed.
Exception in thread "main" java.lang.RuntimeException: The markup in the document preceding the root element must be well-formed.
at com.splunk.Xml.parse(
at com.splunk.Xml.parse(
at com.splunk.Service.login(
at com.splunk.Service.login(
at com.splunk.Service.connect(
Labels (2)
0 Karma
Get Updates on the Splunk Community!

Improve Your Security Posture

Watch NowImprove Your Security PostureCustomers are at the center of everything we do at Splunk and security ...

Maximize the Value from Microsoft Defender with Splunk

 Watch NowJoin Splunk and Sens Consulting for this Security Edition Tech TalkWho should attend:  Security ...

This Week's Community Digest - Splunk Community Happenings [6.27.22]

Get the latest news and updates from the Splunk Community here! News From Splunk Answers ✍️ Splunk Answers is ...