2012-11-07 3 views
0

스프링을 사용하여 다른 인터페이스를로드하는 WebSphere Application Server Community Edition에 귀를 배치했습니다. 생산을 위해 모든 클래스는 귀 안에로드됩니다. 나는 그 클래스들을 EAR 외부의 jar 파일 안에있는 다른 클래스로 오버라이드하려고 시도하고있다. EAR 외부에서 jar 파일을 찾을 수 없습니다. - WebSphere 커뮤니티 에디션

나는 lib 디렉토리/공유 /의/var 내 항아리를 배치하고 I 클래스 경로에 그 폴더를 포함 할 것이라고 생각 배포 의존성이 있습니다

<sys:dependencies> 
<sys:dependency> 
<sys:groupId>org.apache.geronimo.configs</sys:groupId> 
<sys:artifactId>sharedlib</sys:artifactId> 
</sys:dependency> 
</sys:dependencies> 

내가 무엇을 놓치고를? 클래스를 찾을 수 없다는 것을 나타내는 NoClassDef가 봄에 나타납니다.

답변

0

Websphere에는 공유 라이브러리 기능이 있습니다. jar를 공유 라이브러리에 추가 한 다음 websphere 관리 콘솔을 사용하여 해당 라이브러리를 애플리케이션에 추가하십시오.

Using shared libraries at the application level 
To define a shared library named VersionCheckerV2_SharedLib and associate it 
to our ClassloaderTest application, do the following steps: 
1. In the administrative console, select Environment → Shared Libraries. 
2. Select the scope at which you want this shared library to be defined, such as 
Cell, and click New 

이 작업을 위해

Select Applications → Application Types→ WebSphere enterprise 
applications. 
6. Select the ClassloadersExample application. 
7. In References, select Shared library references. 
8. Select AppName in the Application row. 
9. Click Reference shared libraries. 
10.Select the VersionCheckerV2_SharedLib and click the >> button to move it 
to the Selected column 

사용 shared library을 추가합니다. 지침으로는 this book을 사용하십시오.

관련 문제