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),但没有成功
更多回答
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,它应该可以工作。
更多回答
我是一名优秀的程序员,十分优秀!