2014-09-10 2 views
1

파일 업로드/다운로드를 위해 REST 서비스를 테스트하는 JUnit 테스트 (일부는 '통합 테스트'라고도 함)가 있습니다.ClassNotFoundException : JUnit 테스트의 com.ibm.ejs.ras.hpel.HpelHelper (thinclient 포함)

ClientConfig config = new ClientConfig(); 
LtpaAuthSecurityHandler secHandler = new LtpaAuthSecurityHandler(); 
secHandler.setUserName(user); 
secHandler.setPassword(password); 
secHandler.setSSLRequired(false); 
config.handlers(secHandler); 
RestClient client = new RestClient(config); 

하지만 예외 얻을 : 나는 STANDART 스피어 8.5 라이브러리에서 아파치 윙크를 사용하고

java.lang.ClassNotFoundException가 : com.ibm.ejs.ras.hpel.HpelHelper

I는 다음의 시험 종속성을 사용하고 있습니다 :

<dependency> 
    <groupId>com.ibm.was</groupId> 
    <artifactId>com.ibm.ws.jpa.thinclient</artifactId> 
    <version>8.5.0.2</version> 
    <scope>test</scope> 
</dependency> 
<dependency> 
    <groupId>junit</groupId> 
    <artifactId>junit</artifactId> 
    <version>4.11</version> 
    <scope>test</scope> 
</dependency> 

나는 무엇을 누락 이리? 테스트 된 코드는 WebSphere에 배포 할 때 정상적으로 작동하지만 thinclient를 사용하는 독립 실행 형 junit 테스트 (또는 주요 기능)로 작동하지 않습니다.

+0

비슷한 응답이를 - http://stackoverflow.com/questions/15341336/embeddable-ejb-container-of-websphere-8-can-not-created- noclassdeffounderror-h –

+0

@AntonNovopashin 정확하지 않습니다. Maven을 사용하지 않는 OP입니다. –

답변

0

다음과 같은 예외가 발생하여 해결되었습니다.

<dependency> 
    <groupId>com.ibm.jaxws</groupId> 
    <artifactId>thinclient</artifactId> 
    <version>8.0.0</version> 
    <scope>provided</scope> 
    </dependency> 
2

동일한 오류가 발생했습니다. 이 문제를 해결하려면 내가 이러한 종속성 추가 :

<classpathentry kind="lib" path="lib/com.ibm.jaxws.thinclient_8.5.0.jar"/> 
<classpathentry kind="lib" path="lib/com.ibm.ws.admin.client_8.5.0.jar"/> 
<classpathentry kind="lib" path="lib/com.ibm.ws.webservices.thinclient_8.5.0.jar"/>