当前位置: 首页 > 知识库问答 >
问题:

sping-cloud d-stream-binder-kstream-1.3.0: IllegalAccessError无法访问其超级接口

万选
2023-03-14

尝试使用spring-cloud-stream-binder-kstream 1.3.0。发布版本

pom。xml:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    
    <name>kafka-kstream-processor</name>
    <description>kafka-kstream-processor demo application</description>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.5.7.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.8</java.version>
        <spring-cloud.version>Dalston.SR3</spring-cloud.version>
    </properties>

    <dependencies>
        
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-stream-binder-kstream</artifactId>
            <version>1.3.0.RELEASE</version>
            <!--<version>1.0.0.BUILD-SNAPSHOT</version>-->
    </dependency>
        <dependency>
            <groupId>org.apache.kafka</groupId>
            <artifactId>kafka-streams</artifactId>
            <version>0.10.1.1</version>
        </dependency>

    </dependencies>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>${spring-cloud.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>


</project>

日志跟踪:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'kafkaProcessorConfiguration' defined in file [/Users/barath/barath-github-projects/spring-cloud-kafka-kstream/kafka-kstream-processor/target/classes/com/barath/app/KafkaProcessorConfiguration.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cloud.stream.binder.kstream.annotations.KStreamProcessor': Invocation of init method failed; nested exception is java.lang.IllegalAccessError: class org.springframework.cloud.stream.binder.kstream.$Proxy93 cannot access its superinterface org.springframework.cloud.stream.binder.kstream.KStreamBoundElementFactory$KStreamWrapper
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:564) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867) ~[spring-context-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543) ~[spring-context-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) [spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) [spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) [spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) [spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) [spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE]
    at com.barath.app.KafkaKstreamProcessorApplication.main(KafkaKstreamProcessorApplication.java:15) [classes/:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_101]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_101]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_101]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_101]
    at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) [spring-boot-devtools-1.5.7.RELEASE.jar:1.5.7.RELEASE]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cloud.stream.binder.kstream.annotations.KStreamProcessor': Invocation of init method failed; nested exception is java.lang.IllegalAccessError: class org.springframework.cloud.stream.binder.kstream.$Proxy93 cannot access its superinterface org.springframework.cloud.stream.binder.kstream.KStreamBoundElementFactory$KStreamWrapper
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1628) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:372) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1078) ~[spring-context-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.cloud.stream.binding.StreamListenerAnnotationBeanPostProcessor.invokeSetupMethodOnListenedChannel(StreamListenerAnnotationBeanPostProcessor.java:274) ~[spring-cloud-stream-1.2.2.RELEASE.jar:1.2.2.RELEASE]
    at org.springframework.cloud.stream.binding.StreamListenerAnnotationBeanPostProcessor.access$100(StreamListenerAnnotationBeanPostProcessor.java:73) ~[spring-cloud-stream-1.2.2.RELEASE.jar:1.2.2.RELEASE]
    at org.springframework.cloud.stream.binding.StreamListenerAnnotationBeanPostProcessor$1.doWith(StreamListenerAnnotationBeanPostProcessor.java:170) ~[spring-cloud-stream-1.2.2.RELEASE.jar:1.2.2.RELEASE]
    at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:530) ~[spring-core-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:537) ~[spring-core-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:510) ~[spring-core-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.cloud.stream.binding.StreamListenerAnnotationBeanPostProcessor.postProcessAfterInitialization(StreamListenerAnnotationBeanPostProcessor.java:141) ~[spring-cloud-stream-1.2.2.RELEASE.jar:1.2.2.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:423) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1633) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    ... 20 common frames omitted
Caused by: java.lang.IllegalAccessError: class org.springframework.cloud.stream.binder.kstream.$Proxy93 cannot access its superinterface org.springframework.cloud.stream.binder.kstream.KStreamBoundElementFactory$KStreamWrapper
    at java.lang.reflect.Proxy.defineClass0(Native Method) ~[na:1.8.0_101]
    at java.lang.reflect.Proxy.access$300(Proxy.java:228) ~[na:1.8.0_101]
    at java.lang.reflect.Proxy$ProxyClassFactory.apply(Proxy.java:642) ~[na:1.8.0_101]
    at java.lang.reflect.Proxy$ProxyClassFactory.apply(Proxy.java:557) ~[na:1.8.0_101]
    at java.lang.reflect.WeakCache$Factory.get(WeakCache.java:230) ~[na:1.8.0_101]
    at java.lang.reflect.WeakCache.get(WeakCache.java:127) ~[na:1.8.0_101]
    at java.lang.reflect.Proxy.getProxyClass0(Proxy.java:419) ~[na:1.8.0_101]
    at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:719) ~[na:1.8.0_101]
    at org.springframework.aop.framework.JdkDynamicAopProxy.getProxy(JdkDynamicAopProxy.java:122) ~[spring-aop-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.aop.framework.JdkDynamicAopProxy.getProxy(JdkDynamicAopProxy.java:112) ~[spring-aop-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.aop.framework.ProxyFactory.getProxy(ProxyFactory.java:96) ~[spring-aop-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.cloud.stream.binder.kstream.KStreamBoundElementFactory.createOutput(KStreamBoundElementFactory.java:112) ~[spring-cloud-stream-binder-kstream-1.3.0.RELEASE.jar:1.3.0.RELEASE]
    at org.springframework.cloud.stream.binder.kstream.KStreamBoundElementFactory.createOutput(KStreamBoundElementFactory.java:52) ~[spring-cloud-stream-binder-kstream-1.3.0.RELEASE.jar:1.3.0.RELEASE]
    at org.springframework.cloud.stream.binding.BindableProxyFactory$2.doWith(BindableProxyFactory.java:148) ~[spring-cloud-stream-1.2.2.RELEASE.jar:1.2.2.RELEASE]
    at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:530) ~[spring-core-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:510) ~[spring-core-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.cloud.stream.binding.BindableProxyFactory.afterPropertiesSet(BindableProxyFactory.java:134) ~[spring-cloud-stream-1.2.2.RELEASE.jar:1.2.2.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1687) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1624) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    ... 46 common frames omitted

配置类:

@Configuration
@EnableBinding(KStreamProcessor.class)
public class KafkaProcessorConfiguration {


    @StreamListener(value = "input")
    @SendTo("output")
    public KStream<?, String> splitStrings(KStream<?, String> input) {
        input.print();
        System.out.println("PROCESSOR WITH INPUT "+input.toString());
        return input
                .flatMapValues(value -> Arrays.asList(value.toLowerCase().split("\\W+")));
    }
}

application.properties:

spring.cloud.stream.bindings.input.destination=kafka-kstream-source-output
spring.cloud.stream.bindings.output.destination=kafka-kstream-processor-output

附注:注意同样的事情适用于1.0.0。BUILD-SNAPSHOT在此存储库中共享https://github.com/mbogoevici/spring-cloud-stream-binder-kstream

=================================

更新:

按照建议删除了devtools依赖项。

日志:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'kafkaProcessorConfiguration' defined in file [/Users/barath/barath-github-projects/spring-cloud-kafka-kstream/kafka-kstream-processor/target/classes/com/barath/app/KafkaProcessorConfiguration.class]: Initialization of bean failed; nested exception is java.lang.AbstractMethodError: org.springframework.cloud.stream.binder.kstream.KStreamStreamListenerResultAdapter.adapt(Ljava/lang/Object;Ljava/lang/Object;)V
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:564) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867) ~[spring-context-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543) ~[spring-context-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) [spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) [spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) [spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) [spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) [spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE]
    at com.barath.app.KafkaKstreamProcessorApplication.main(KafkaKstreamProcessorApplication.java:15) [classes/:na]
Caused by: java.lang.AbstractMethodError: org.springframework.cloud.stream.binder.kstream.KStreamStreamListenerResultAdapter.adapt(Ljava/lang/Object;Ljava/lang/Object;)V
    at org.springframework.cloud.stream.binding.StreamListenerAnnotationBeanPostProcessor.invokeSetupMethodOnListenedChannel(StreamListenerAnnotationBeanPostProcessor.java:310) ~[spring-cloud-stream-1.2.2.RELEASE.jar:1.2.2.RELEASE]
    at org.springframework.cloud.stream.binding.StreamListenerAnnotationBeanPostProcessor.access$100(StreamListenerAnnotationBeanPostProcessor.java:73) ~[spring-cloud-stream-1.2.2.RELEASE.jar:1.2.2.RELEASE]
    at org.springframework.cloud.stream.binding.StreamListenerAnnotationBeanPostProcessor$1.doWith(StreamListenerAnnotationBeanPostProcessor.java:170) ~[spring-cloud-stream-1.2.2.RELEASE.jar:1.2.2.RELEASE]
    at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:530) ~[spring-core-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:537) ~[spring-core-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:510) ~[spring-core-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.cloud.stream.binding.StreamListenerAnnotationBeanPostProcessor.postProcessAfterInitialization(StreamListenerAnnotationBeanPostProcessor.java:141) ~[spring-cloud-stream-1.2.2.RELEASE.jar:1.2.2.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:423) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1633) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE]
    ... 15 common frames omitted

当然,看起来依赖项版本不匹配。因此,共享依赖关系树以供参考。

共有1个答案

令狐宏浚
2023-03-14

在应用程序中使用devtools工件有什么特殊的原因吗?能否删除该选项并重试?似乎有些代理在幕后的工作方式可能存在缺陷。我们正在进一步研究这个问题。

您可能希望将所有Spring Cloud stream依赖项带到1.3.0行。

您能否在GitHub上提供一个简单的示例应用程序,我们可以在其中重现该问题?

我通过将所有scst版本升级到1.3来运行示例应用程序,但我没有得到您得到的异常。不要使用sping-cloud BOM,而是尝试使用它:

<dependencyManagement>
                <dependencies>
                        <dependency>
                                <groupId>org.springframework.cloud</groupId>
                                <artifactId>spring-cloud-stream-dependencies</artifactId>
                                <version>Ditmars.RELEASE</version>
                                <type>pom</type>
                                <scope>import</scope>
                        </dependency>

                </dependencies>
        </dependencyManagement>
 类似资料:
  • 我尝试使用Logstash tcp套接字追加器将日志从java应用程序发送到Logstash。java应用程序。已经可以使用logback 1.1.9(slf4j)和其他追加器。 现在,我将以下行添加到logback-test.xml中:

  • 问题内容: 我有两节课。 类具有受保护的方法,是的实例。 Class 与class在同一包中。 我正在尝试访问,但正在获取… 怎么了? 问题答案: 编译器应该捕获这样的错误。当您显然在运行时得到此消息时,发生了一些奇怪的事情。可能您已更改了源代码,但已完全重新编译。 另一个潜在但晦涩的问题是通过不同的类加载器加载类。即使包名称相同,从不同的类加载器加载的类也将位于不同的包中(以与由不同的类加载器加

  • 当尝试运行稍微修改过的word count示例版本时,我遇到了一个错误,即“没有符合条件的'org.apache.kafka.streams.kstream.KStreamBuilder'类型的bean”。在我的POM中,我使用了Spring-Cloud-Stream依赖项:Elmhurst。M3导入依赖项,其中导入了spring cloud stream绑定器kstream:2.0.0。立方米。

  • 我正在使用Spring云流Kafka活页夹编写Kafka生产者和消费者。我想在生产者和消费者中访问以下信息 a) 主题 b)分区 b)偏移 我确实检查了文档,但并没有真正找到在哪里完成这项工作。我在文档中看到的只是指定一个作为生产者/消费者配置的一部分。有人能告诉我这到底是怎么做到的吗?

  • 我试图用Spring的云流Kafka流来阅读Kafka。然后我在一分钟的时间窗口内汇总事件,并将其转移到不同的主题。然后,我需要从主题中读取聚合事件,并将其写入另一个主题,同时将该主题与另一个Kafka集群中的不同主题绑定。但我得到了下面的例外。 我按照链接中的示例,尝试了下面的代码。 应用属性 哈格。JAVA Transporter.java EGSRC处理器。JAVA

  • 我按照这里的安装指南使用自制程序在我的Mac OS 10.10上安装Postgres。