프로젝트 구조에는 Rest (Rest API와 Implementaion 클래스가있는), Service API (서비스 인터페이스가 정의 됨) 및 Service Impl 어떤 서비스 API의 구현이 배치되는지). 내 코드 PersonalInfoServiceImpl
에 PersonalInfoRequestBean
값을 PersonalInfoResponseBean
(몇 가지 더 속성) 개체로 설정하고 을 반환하면됩니다. 그것은 잘 작동했다. 그러나 몇 가지 더 인터셉터와의 통합 후, 지금 갑자기이 코드에서 다음과 같은 오류를 받기 시작 :java.lang.LinkageError : 로더 제약 조건 위반. 인터페이스 메소드 (서비스 클래스)를 해석 할 때
Caused by java.lang.LinkageError: loader constraint violation: when resolving
interface method "personal.info.service.api.PersonalInfoService.getPersonalInfoDetails(Lcom//personal/info/model/PersonalInfoRequestBean;)Lpersonal/info/model/PersonalInfoResponseBean;"
the class loader (instance of org/apache/felix/framework/BundleWiringImpl$BundleClassLoaderJava5)
of the current class, personal/info/rest/impl/PersonalInfoRESTServiceImpl,
and the class loader (instance of org/apache/felix/framework/BundleWiringImpl$BundleClassLoaderJava5)
for the method's defining class, personal/info/service/api/PersonalInfoService,
have different Class objects for the type personal/info/model/PersonalInfoRequestBean
used in the signature at personal.info.rest.impl.PersonalInfoRESTServiceImpl.getPersonalInfoDetail(PersonalInfoRESTServiceImpl.java:112)
누군가가 나에게이 문제에 도와 드릴까요? 우리는 우리의 서비스를 배치하기 위해 아파치 카라프를 사용하고 있습니다. 그래서 karaf/delpoyment/maven 종속성과 관련이 있다면이 문제를 디버깅하는 방법은 무엇입니까?