cancel
Showing results for 
Search instead for 
Did you mean: 

error in resourceontext

Former Member
0 Kudos

Hi

i am trying to build an portal app which access KM using the following code

IUser epUser = (IUser)request.getUser().getUser();

ResourceContext ctx = new ResourceContext(epUser);

String repository = "/documents";

RID rid=RID.getRID(repository);

ICollection collectiona =(ICollection) (ResourceFactory.getInstance().getResource(rid, ctx));

collectiona.createCollection(u201Cfolder_nameu201D,null);

but in the line resourcecontext i get a error the security and user management cannot be resolved

i am using nwds 7.1 with ep 7.11 sp3

i think it need two jar files

com.sap.security.api.ep.jar

com.sap.security.api.jar

i was unable to find the jar files.

any suggestions and help on this topic would be good

thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi ,

if u want add jarfiles

go to -> Build path -> Add External Jar files in to Work Space .

Regards ,

venkat

Former Member
0 Kudos

Hi venkat reddy,

i have already added the jar file

com.sap.security.api.jar to the build path still i am getting the error.

thanks

Former Member
Former Member
0 Kudos

hi there

thanks for the info, but i still get the error message

"

The project was not built since its build path is incomplete. Cannot find the class file for com.sapportals.portal.security.usermanagement.IUser. Fix the build path then try building this project kmportalappproject Unknown 1214395184412 302

"

form where do i get this api , if you are having these api can u send me com.sap.security.api.ep5.jar

com.sap.security.api.jar

at mujahidzain at gmail

thanks in advance

Former Member
0 Kudos

hi venkat,

i am using the following code to create a folder in the km

IUser epUser = (IUser)request.getUser().getUser();

ResourceContext ctx = new ResourceContext((com.sapportals.portal.security.usermanagement.IUser) epUser);

String repository = "/documents";

RID rid=RID.getRID(repository);

ICollection collectiona =(ICollection) (ResourceFactory.getInstance().getResource(rid, ctx));

collectiona.createCollection(u201Cfolderu201D, null, as(IExtendedCollection.class));

the last line is displaying the wrong argument error can you let meknow where i am wrong

thanks