2017-12-19 17 views
0

를 찾을 수 없습니다.의 context.xml은 내가 eclipsew 세 메이븐 프로젝트를

webapp 프로젝트를 받는다는 종속성으로 serviceimplsoa 프로젝트를 포함 (그러나 같은 이클립스 프로젝트하지 항아리를!) 나는 응용 프로그램을 성공적으로 구축 할 수 있습니다 일식에서

. 이 일식의 Tomcat server v7.0에서 응용 프로그램을 배포에 올 때, 나는 다음과 같은 오류 얻을 :

2017-12-19 09:58:35,591 INFO info.magnolia.module.ModuleManagerImpl   : Starting module xyzwhatever 
Dez 19, 2017 9:58:35 AM org.apache.catalina.core.ApplicationContext log 
INFORMATION: Initializing Spring root WebApplicationContext 
2017-12-19 09:58:36,070 ERROR org.springframework.web.context.ContextLoader  : Context initialization failed 
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath:META-INF/xyzwhatever-serviceimpl-context.xml] 
Offending resource: class path resource [applicationContext.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [META-INF/xyzwhatever-serviceimpl-context.xml]; nested exception is java.io.FileNotFoundException: class path resource [META-INF/xyzwhatever-serviceimpl-context.xml] cannot be opened because it does not exist 

을하지만 생성 된 JAR를 찾을 때 (즉, 메이븐 빌드 과정에서 생성 된)이 META-INF/xyzwhatever-serviceimpl-context.xml 포함되어 있습니까 serviceimpl-2.0.0-SNAPSHOT.jar라고 . 로컬 메이븐 저장소 .m2/...에서 생성 된 JAR과 응용 프로그램의 generated 폴더에서 생성 된 것을 확인했습니다. 둘 다 xml 파일을 포함합니다.

그런데 배포하는 동안 오류가 발생하는 이유는 무엇입니까? classpath에 문제가 있습니까?

답변

0

확인 솔루션입니다 : 내 다양한 ​​xml 파일에서 나는 변경했다 :

<import resource="classpath:xyzwhatever-serviceimpl-context.xml"/>

<import resource="classpath*:xyzwhatever-serviceimpl-context.xml"/>

에 따라서 별표 (*)가있을 필요가있다!