Dear Team,
In 7.31 sp05 in a wd java application i have added the KM jars(bc.rf.framework_api, bc.rf.global.service.urlgenerator_api, bc.sf.framework_api, bc.util.public_api, commons-collections-2.1, prtapi) via external lib and i have written the below code.
try{
IWDClientUser wdClientUser = WDClientUser.getCurrentUser();
IUser user = wdClientUser.getSAPUser();
ResourceContext cxt= ResourceContext.getInstance(user);
}catch(Exception e){
wdComponentAPI.getMessageManager().reportException("init exce:"+e.getLocalizedMessage());
}
But I get the below runtime error at ResourceContext line. What should be done to reference the correct jar at runtime.
java.lang.ClassNotFoundException: com.sapportals.portal.security.usermanagement.UserManagementException ------------------------- Loader Info ------------------------- ClassLoader name: [com.h/myresoutce] Loader hash code: 5ee51952 Living status: alive Direct parent loaders: [system:Frame] [interface:webservices] [interface:cross] [interface:security] [interface:transactionext] [library:webservices_lib] [library:opensql] [library:jms] [library:ejb20] [service:p4] [service:ejb] [service:servlet_jsp] [library:tc~ddic~runtime~facade] [library:tc~aii~base~offline~facade] [library:tc~cmi] [sap.com/tc~wd~api] [library:tc~bl~logging~api] [library:tc~bl~exception~lib] Resources: /path/cluster/apps/com.h/myresoutce/servlet_jsp/webdynpro/resources/com.h/myresoutce/root/WEB-INF/lib/bc.rf.framework_api.jar /path/cluster/apps/com.h/myresoutce/servlet_jsp/webdynpro/resources/com.h/myresoutce/root/WEB-INF/lib/bc.rf.global.service.urlgenerator_api.jar /path/cluster/apps/com.h/myresoutce/servlet_jsp/webdynpro/resources/com.h/myresoutce/root/WEB-INF/lib/bc.sf.framework_api.jar /path/cluster/apps/com.h/myresoutce/servlet_jsp/webdynpro/resources/com.h/myresoutce/root/WEB-INF/lib/bc.util.public_api.jar /path/cluster/apps/com.h/myresoutce/servlet_jsp/webdynpro/resources/com.h/myresoutce/root/WEB-INF/lib/com.h~myresoutce.jar /path/cluster/apps/com.h/myresoutce/servlet_jsp/webdynpro/resources/com.h/myresoutce/root/WEB-INF/lib/commons-collections-2.1.jar /path/cluster/apps/com.h/myresoutce/servlet_jsp/webdynpro/resources/com.h/myresoutce/root/WEB-INF/lib/prtapi.jar ---------------------------------------------------------------
at com.sap.engine.boot.loader.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:278)
at com.sap.engine.boot.loader.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:247)
at h.com.myresoutce.wd.comp.myrescomp.MyResCompView.wdDoInit(MyResCompView.java:125)
at h.com.myresoutce.wd.comp.myrescomp.wdp.InternalMyResCompView.wdDoInit(InternalMyResCompView.java:105)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.doInit(DelegatingView.java:59)
... 61 more
Regards,
Shamila