gpt4 book ai didi

org.camunda.bpm.engine.RuntimeService bean not found after upgrading to java 17(升级到java 17后找不到org.camunda.bpm.engine.RuntimeService bean)

转载 作者:bug小助手 更新时间:2023-10-25 19:52:44 25 4
gpt4 key购买 nike



After I upgraded to java 17 I am getting error in my service:

在我升级到Java 17之后,我的服务出现错误:


@Service
public class CallbackHandlerService {

public static final long DEFAULT_TIMEOUT_SECONDS = 30;

private static final Logger logger = LoggerFactory.getLogger(CallbackHandlerService.class);

private RuntimeService runtimeService;

@Autowired(required = true)
public CallbackHandlerService(RuntimeService runtimeService) {
this.runtimeService = runtimeService;
}

Error:

错误:


Parameter 0 of constructor in org.onap.so.bpmn.core.workflow.service.CallbackHandlerService required a bean of type 'org.camunda.bpm.engine.RuntimeService' that could not be found.

The injection point has the following annotations:
- @org.springframework.beans.factory.annotation.Autowired(required=true)


Action:

Consider defining a bean of type 'org.camunda.bpm.engine.RuntimeService' in your configuration

I tried to add @Autowired(required=true) but it does not work

我尝试添加@Autwire(REQUIRED=TRUE),但没有成功


更多回答

Hello, welcome to Stack Overflow! Please, provide a minimal reproducible example

你好,欢迎来到Stack Overflow!请提供一个最小的可重复使用的例子

I am using Springboot 3.0.4, java 17 and camunda-bom 7.14.0-ee. The above service was running fine in java 11 but after upgrading it throws error in junit.

我使用的是SpringBoot 3.0.4、Java 17和camunda-bom 7.14.0-ee。上述服务在Java 11中运行良好,但升级后在junit中抛出错误。

优秀答案推荐

You need Camunda 7.20.x to run with Spring Boot 3.1.x.

您需要Camunda 7.20.x才能在Spring Boot 3.1.x上运行。


https://docs.camunda.org/manual/latest/user-guide/spring-boot-integration/version-compatibility/

Https://docs.camunda.org/manual/latest/user-guide/spring-boot-integration/version-compatibility/


Today you could use 7.20.0-alpha5

今天你可以用7.20.0-alpha5


https://github.com/camunda/camunda-bpm-platform/tags

Https://github.com/camunda/camunda-bpm-platform/tags


7.20 GA should be available on the second Tuesday of October = Oct 12

7.20 GA应在10月12日的第二个星期二可用



"I am using Springboot 3.0.4, java 17 and camunda-bom 7.14.0-ee"

我使用的是SpringBoot 3.0.4、Java 17和camunda-bom 7.14.0-ee


That's the problem. As you can see in the compatibiliy matrix, spring boot 3 is NOT supported right now, Upgrade camunda to 7.19 and downgrade springboot to 2.7.x and it should work.

这就是问题所在。正如你在兼容性列表中看到的,目前不支持SpringBoot3,将Camunda升级到7.19,并将SpringBoot降级到2.7.x,它应该可以工作。


更多回答

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com