Splunk Search

Splunk integration Spring: Failed to read schema document 'http://www.springframework.org/schema/integration/splunk/spring-integration-splunk.xsd'

maximus_reborn
Path Finder

I am getting the below error while running Splunk integration spring adapter.

org.xml.sax.SAXParseException; lineNumber: 16; columnNumber: 212; schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/integration/splunk/spring-integration-splunk.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.

I tried to search http://www.springframework.org/schema/integration/splunk/ but it looks like it is not reachable. Has Spring deprecated the support of Splunk?

My bean configuration looked like this:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:int="http://www.springframework.org/schema/integration"
        xmlns:int-splunk="http://www.springframework.org/schema/integration/splunk"
        xmlns:stream="http://www.springframework.org/schema/integration/stream"
        xmlns:context="http://www.springframework.org/schema/context"
        xsi:schemaLocation="http://www.springframework.org/schema/integration/stream http://www.springframework.org/schema/integration/stream/spring-integration-stream.xsd
                http://www.springframework.org/schema/integration/splunk http://www.springframework.org/schema/integration/splunk/spring-integration-splunk.xsd
                http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd
                http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
                http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.4.RELEASE.xsd">;
        <import resource="SplunkInboundChannelAdapterCommon-context.xml"/>

        <int-splunk:inbound-channel-adapter id="splunkInboundChannelAdapter"
                auto-startup="true" search="sourcetype=SplunkRabbitMQ_messaging | spath input=msg_body | where '3' > 0" splunk-server-ref="splunkServer" channel="inputFromSplunk" mode="realtime" initEarliestTime="-1d">
                <int:poller fixed-rate="5" time-unit="SECONDS"/>
        </int-splunk:inbound-channel-adapter>

</beans>
Tags (1)
0 Karma
1 Solution

maximus_reborn
Path Finder

Building Spring-Splunk adapter itself contains all the XSDs. So just put the jar in the classpath while executing the Spring application.

View solution in original post

0 Karma

maximus_reborn
Path Finder

Building Spring-Splunk adapter itself contains all the XSDs. So just put the jar in the classpath while executing the Spring application.

0 Karma

acharlieh
Influencer

I also don't see the XML schema there, but it does look like schema may be a resource in the built JAR... here's the github project. I also see there's an interesting comment in one of the other schemas:

from http://www.springframework.org/schema/integration/spring-integration.xsd

```
This schema is for the 1.0 version of Spring Integration Core. We cannot update it to the current schema
because that will break any applications using 1.0.3 or lower. For subsequent versions, the unversioned
schema is resolved from the classpath and obtained from the jar.
Please refer to github:

https://github.com/spring-projects/spring-integration/tree/master/spring-integration-core/src/main/r...
```

So not knowing much about Spring's integrations here, could it be they moved newer versions?

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

From Data to Insight: Announcing the Winners of the Splunk Dashboard Contest

Hi Splunkers, First off, thank you to everyone who participated in our very first From Data to Insight: The ...

Splunk Developers: Construct Your Future at the .conf26 Builder Bar

Calling all Splunk architects, platform admins, and app developers: the site is open, and the blueprints are ...

Quick connection discovery mode for forwarders

When a Splunk forwarder loses connectivity to its indexers, it does not always reconnect immediately. In many ...