on 07-22-2005 8:06 AM
Could someone help me?
I am trying to create service user for reading the PCD content from Portal service
I am using this piece of code:
private IUser getServiceUser(String strUser ) {
final String strServiceUser = strUser;
IUser serviceUser = null;
try {
serviceUser =(IUser) AccessController.doPrivileged(
new PrivilegedExceptionAction()
{
public Object run() throws NamingException
{
IUserManagementEngine umService = (IUserManagementEngine) PortalRuntime.getRuntimeResources().getService( IUserManagementEngine.KEY );
IServiceUserFactory userFactory = umService.getServiceUserFactory();
IUser user = null;
try {
userFactory.createServiceUser(strServiceUser);
user = userFactory.getServiceUser(strServiceUser);
} catch (UMException e) {
myLoc.traceThrowableT(Severity.ERROR, "", e);
}
return user;
}
}
);
} catch (PrivilegedActionException ex) {
}
return serviceUser;
}
For accesing IUserManagementEngine I put in portalapp.xml
new entry in SharingReference: com.sap.portal.usermanagment
But in runtime I receive exception :
Caused by: com.sapportals.portal.prt.core.broker.PortalApplicationNotFoundException: Could not find portal application com.sap.portal.usermanagment
I check in portal (System Administrator -> Support -> PortalRuntime -> Application Console ) that com.sap.portal.usermanagment application is deployed on my engine
Why my portal service couldn't found com.sap.portal.usermanagment application ??
Hi Rosen,
> com.sap.portal.usermanagment
If you also typed this within portalapp.xml, try
com.sap.portal.usermanag<u>e</u>ment
Hope it helps
Detlev
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Creating a new user still have a problem (Access denied)
Strange for me but:
When I invoke
IUser principalObj = getServiceUser("pcd_service");
This is the default pcd user - no problem
but when I try to create my new "service user"
for example :
IUser principalObj = getServiceUser("pcd_test_rosen_service_user");
I have access denied - when try to reading the PCD content
#1.5#000A5E3C51C00040000002AF00000BB40003FC804AB8D460#1122052869781#com.sap.security#
sap.com/irj#com.sap.security.logToFile#
Administrator#1449#####
SAPEngine_Application_Thread[impl:3]_15##0#0#Error#1#/System/Security/Audit#Plain###Administrator | USERACCOUNT.CREATE | USERACCOUNT = UACC.PRIVATE_DATASOURCE.un:pcd_test_rosen_service | | SET_ATTRIBUTE: userid=[USER.PRIVATE_DATASOURCE.un:pcd_test_rosen_service]#
#1.5#000A5E3C51C00040000002B000000BB40003FC804AB9B80D#1122052869797#com.sap.tc.lm.ctc.cpa.pcd.PCDProviderReader#sap.com/irj#com.sap.tc.lm.ctc.cpa.pcd.PCDProviderReader#Administrator#1449#####SAPEngine_Application_Thread[impl:3]_15##0#0#Error##Java###
#1#com.sapportals.portal.pcd.gl.PermissionControlException: Access denied (Object: portal_content)
at com.sapportals.portal.pcd.gl.PcdFilterContext.filterLookup(PcdFilterContext.java:415)
May be I have to add something in my method getServiceUser()
But what ??
Could someone help me ?
Please provide me a very simple working example - that create new "service user" for PCD access
Implementation of my method getServiceUser is in my first message (in this topic)
Message was edited by: Rosen Chaushev
Message was edited by: Rosen Chaushev
Here is explanation of the problem with permissions
http://help.sap.com/saphelp_nw04/helpdata/en/f9/e3162ec55f4df6922d161f3785012a/frameset.htm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 3 | |
| 3 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.