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.

View solution in original post

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
Did you miss .conf21 Virtual?

Good news! The event's keynotes and many of its breakout sessions are now available online, and still totally FREE!