Hi,
I am trying to write in a KM text file through WEBDynpro java application and receiving below error message:
java.lang.ClassNotFoundException: com.sapportals.wcm.repository.IResourceContext ------------------------- Loader Info ------------------------- ClassLoader name: [local/ACN_DesktopParameters] Parent loader name: [Frame ClassLoader] References: common:service:http;service:servlet_jsp service:ejb common:service:iiop;service:naming;service🤪4;service:ts service:jmsconnector library:jsse library:servlet common:library:IAIKSecurity;library:activation;library:mail;library:tc~sec~ssl library:ejb20 library:j2eeca library:jms library🤯pensql
i have imported all the below 7 jar files into my code.
bc.rf.framework_api.jar
bc.rf.global.service.urlgenerator_api.jar
bc.sf.framework_api.jar
bc.util.public_api.jar
com.sap.portal.usermanagementapi.jar
com.sap.security.api.ep5.jar
com.sap.security.api.jar
prtapi.jar
below is my code:
IResourceFactory factory=com.sapportals.wcm.repository.ResourceFactory.getInstance();
IWDClientUser wdClientUser =WDClientUser.getCurrentUser();
com.sap.security.api.IUser sapUser = wdClientUser.getSAPUser();
ResourceContext context = new ResourceContext(WPUMFactory.getUserFactory().getEP5User(sapUser));
IResource resource = factory.getResource(RID.getRID("/documents/SAP Desktop Parameters/Change log.txt"),context);
String existingComments;
IContent cont = resource.getContent();
BufferedReader buf_in = new BufferedReader(new InputStreamReader(cont.getInputStream()));
existingComments = buf_in.readLine();
existingComments = existingComments + sapUser;
ByteArrayInputStream inputStream = new ByteArrayInputStream(existingComments.getBytes());
cont = new Content(inputStream,"text/html",-1,null);
resource.updateContent(cont);
cont.close();
please some one help me