(WCS) jar에 있는 클래스의 메소드를 호출하려고 하니 java.lang.NoClassDefFoundError
|
|
!!!...jar에 있는 클래스의 메소드를 호출하려고 하니 아래와 같은 Exception 발생...!!!
java.lang.NoClassDefFoundError: kr.co.sys4u.core.actor.order.InsertOpTempClmInfo
Caused by: java.lang.NoClassDefFoundError: kr.co.sys4u.core.actor.order.InsertOpTempClmInfo
Caused by: java.lang.ClassNotFoundException: kr.co.s..... 어쩌구 저쩌구
출처 : http://www.ibmwcs.com/2011/06/adding-external-jar-file-to-wcs.html
Steps.
1. Add the jar file to the enterprise project WC/lib.
2. Make an entry for JAR file in the Stores.war\META-INF\MANIFEST.MF (the file has specific formatting with a space before and after each line and also blank line at the end.
3. Add the jar file to the WebSphereCommerceServerExtensionsData classpath. Mak sure the exported flag is true.
<classpathentry exported="true" kind="lib" path="/WC/lib/custom/recaptcha4j.jar"/>
4. Build
5. Restart
2,3번까진 관계없는거? 같고, 메인프로젝트인 WC프로젝트에 jar를 넣어주니 오류(클래스를 찾지 못하는...)가 발생하지 않았음.
(WC프로젝트의 Property for WC > Java EE Module Dependencies 라는 메뉴를 통해 해당 jar 파일 추가하면 자동 빌드가 되고 종속되어 있는 프로젝트에는 자동으로 추가됨.)