使用 Http 源会引发 org/wso2/transport/http/netty/contract/config/ListenerConfiguration 错误

Using Http source throws org/wso2/transport/http/netty/contract/config/ListenerConfiguration error

使用 http 源,我尝试将 3 个参数插入到一个流中,我将把它用作其他流的输入。

@App:name("SiddhiSample")
@App:description("Sample http")

@source(type='http', receiver.url='http://0.0.0.0:8008/event', @map(type = 'json', @attributes(a='$.a', b='$.c', c='$.c'))) 
define stream InputStream(a string, b string, c string);

我在“@source”行收到此错误 -

Caused by: org.wso2.siddhi.core.exception.SiddhiAppCreationException: Error on 'SiddhiSample' @ Line: 5. Position: 143, near '@source(type='http', receiver.url='http://0.0.0.0:8008/event', @map(type = 'json', @attributes(a='$.a', b='$.b', c='$.c')))'. org/wso2/transport/http/netty/contract/config/ListenerConfiguration

at org.wso2.siddhi.core.util.ExceptionUtil.populateQueryContext(ExceptionUtil.java:43)
        at org.wso2.siddhi.core.util.parser.helper.DefinitionParserHelper.addEventSource(DefinitionParserHelper.java:370)
        at org.wso2.siddhi.core.util.SiddhiAppRuntimeBuilder.defineStream(SiddhiAppRuntimeBuilder.java:114)
        at org.wso2.siddhi.core.util.parser.SiddhiAppParser.defineStreamDefinitions(SiddhiAppParser.java:307)
        at org.wso2.siddhi.core.util.parser.SiddhiAppParser.parse(SiddhiAppParser.java:223)
        at org.wso2.siddhi.core.SiddhiManager.createSiddhiAppRuntime(SiddhiManager.java:65)
        at org.wso2.siddhi.core.SiddhiManager.createSiddhiAppRuntime(SiddhiManager.java:74)
        at org.wso2.carbon.stream.processor.core.internal.StreamProcessorService.deploySiddhiApp(StreamProcessorService.java:100)
        at org.wso2.carbon.stream.processor.core.internal.StreamProcessorDeployer.deploySiddhiQLFile(StreamProcessorDeployer.java:93)
        ... 14 more
Caused by: java.lang.NoClassDefFoundError: org/wso2/transport/http/netty/contract/config/ListenerConfiguration
        at org.wso2.extension.siddhi.io.http.source.util.HttpSourceUtil.getListenerConfiguration(HttpSourceUtil.java:177)
        at org.wso2.extension.siddhi.io.http.source.HttpSource.initSource(HttpSource.java:478)
        at org.wso2.extension.siddhi.io.http.source.HttpSource.init(HttpSource.java:415)
        at org.wso2.siddhi.core.stream.input.source.Source.init(Source.java:69)
        at org.wso2.siddhi.core.util.parser.helper.DefinitionParserHelper.addEventSource(DefinitionParserHelper.java:365)
        ... 21 more

这在以前是有效的——我能够通过 curl 命令将数据传递到流中。有人可以帮助我了解问题所在吗?

我正在使用 WSO2SP 4.3.0 和 siddhi-io-http-1.1。2.jar

WSO2SP 4.3.0 不支持 siddhi-io-http-1.1。2.jar,请改用 WSO2SP 4.4.0,WSO2SP 4.4.0 也可以与当前最新版本的 siddhi- io-http-1.2.1.jar

https://mvnrepository.com/artifact/org.wso2.extension.siddhi.io.http/siddhi-io-http/1.2.1