beaninstantiationException无法实例化org.springframework.data.elasticsearch.repository.support.simpleelasticsearchrepository

发布于 2025-02-04 07:25:36 字数 1007 浏览 2 评论 0原文

在将Spring Boot版本从2.4.2升级到2.6.8之后获得问题。当启动服务器以下时,出现错误:

14:38:38:38:38:38:38:38:38:38:jboss.msc.msc.service.fail](ServerService线程池-92)MSC000001 :无法启动服务jboss.deployment.unit。“ abc.war”。 lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'XYZESRepository' defined in com.xyelastic.repository.XYZESRepository defined in @EnableElasticsearchRepositories declared on ElasticsearchRepositoriesRegistrar.EnableElasticsearchRepositoriesConfiguration: Invocation of init method failed;嵌套异常是org.springframework.beans.BeanStantiationException:无法实例化[org.springframework.data.data.elasticsearch.repository.supportoritory.support.simpleelasticsearchrepository]:constructor trrew excepred exception;嵌套异常是org.springframework.spel.spel.spel.spelevaluationException:el1011e:方法呼叫:尝试在null上下文对象xyzesrepository上调用方法substring(java.lang.integer)


类似 ;

公共接口xyzesrepository扩展了ElasticsearchRepository< MyObject,String> {

}

Getting issue after upgrading Spring boot version from 2.4.2 to 2.6.8 .When starting the server getting below error:

14:38:38,461 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 92) MSC000001: Failed to start service jboss.deployment.unit."abc.war".undertow-deployment: org.jboss.msc.service.StartException in service jboss.deployment.unit."abc.war".undertow-deployment: java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'XYZESRepository' defined in com.x.y.elastic.repository.XYZESRepository defined in @EnableElasticsearchRepositories declared on ElasticsearchRepositoriesRegistrar.EnableElasticsearchRepositoriesConfiguration: Invocation of init method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.elasticsearch.repository.support.SimpleElasticsearchRepository]: Constructor threw exception; nested exception is org.springframework.expression.spel.SpelEvaluationException: EL1011E: Method call: Attempted to call method substring(java.lang.Integer) on null context object


XYZESRepository is like:

import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

public interface XYZESRepository extends ElasticsearchRepository<MyObject, String> {

}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文