on 09-28-2012 1:29 PM
Hi
while creating WebDynPro component for searching PCD I received error
com.sapportals.portal.pcd.gl.PermissionControlException: Access denied (Object(s): portal_content/TEST)
code is:
Hashtable env = new Hashtable(); | ||||||
env.put(Context.INITIAL_CONTEXT_FACTORY, IPcdContext.PCD_INITIAL_CONTEXT_FACTORY); | ||||||
//env.put(Context.SECURITY_PRINCIPAL, /*request.getUser()*/ /*getUser().getUid()*/ UMFactory.getAuthenticator().getLoggedInUser().getUid() ); | ||||||
env.put(Context.SECURITY_PRINCIPAL, getUser().getUid()/* UMFactory.getAuthenticator().getLoggedInUser().getUid()*/ ); | ||||||
//env.put(Constants.REQUESTED_ASPECT, PcmConstants.ASPECT_SEMANTICS); | ||||||
env.put(Constants.REQUESTED_ASPECT, IPcdAttribute.PERSISTENCY_ASPECT/*.ASPECT_SEMANTICS*/); | ||||||
InitialContext iCtx = null; | ||||||
iCtx = new InitialContext(env); | ||||||
IPcdContext myPcdContext = (IPcdContext) iCtx.lookup("pcd:portal_content/TEST"); //ERROR HERE |
in solutions in SCN was proposed to edit sequrity zone in portalapp.xml file
but In my solution I have not such a files,
I think due to component pack it it onto .EAR files, below is one such file,
so I have no diret access to edit.
my question are:
1. For what reason that error can happaen
2. If it need to edit portalapp.xml,
how to do it in WebDynPro component?
thanks
packed portalapp.xml :
<?xml version="1.0" encoding="UTF-8"?>
<application>
<application-config>
<property name="SharingReference" value="sap.com/tc~wd~dispwda"/>
<property name="SharingReference" value="PORTAL:sap.com/com.sap.portal.ivs.init"/>
<property name="SharingReference" value="omk.ru/ui~plan~wd"/>
<property name="SharingReference" value="omk.ru/ui~core~wd"/>
<property name="SharingReference" value="omk.ru/ui~record~wd"/>
<property name="SharingReference" value="omk.ru/ui~request~details~wd"/>
<property name="SharingReference" value="PORTAL:sap.com/com.sap.portal.pcd.glservice"/>
<property name="SharingReference" value="sap.com/tc~wd~corecomp"/>
<property name="SharingReference" value="omk.ru/ui~request~general~wd"/>
<property name="SharingReference" value="omk.ru/ui~comment~wd"/>
<property name="SharingReference" value="omk.ru/ui~request~repl_dir"/>
<property name="SharingReference" value="omk.ru/ui~history~wd"/>
<property name="SharingAccess" value="true"/>
<property name="LibrariesReference" value="tc/ddic/ddicservices"/>
<property name="LibrariesReference" value="com.sap.aii.proxy.framework"/>
<property name="LibrariesReference" value="webservices_lib"/>
<property name="LibrariesReference" value="tc/graphics/igs"/>
<property name="LibrariesReference" value="com.sap.mw.jco"/>
<property name="LibrariesReference" value="com.sap.lcr.api.cimclient"/>
<property name="LibrariesReference" value="omk.ru~mdm~api~lib"/>
<property name="LibrariesReference" value="sapxmltoolkit"/>
<property name="LibrariesReference" value="com.sap.aii.util.rb"/>
<property name="LibrariesReference" value="com.sap.util.monitor.jarm"/>
<property name="LibrariesReference" value="tc/ddic/ddicruntime"/>
<property name="LibrariesReference" value="com.sap.security.api.sda"/>
<property name="LibrariesReference" value="omk.ru~other~api~lib"/>
<property name="LibrariesReference" value="caf/eu/gp/api"/>
<property name="LibrariesReference" value="omk.ru~service~process~lib"/>
<property name="LibrariesReference" value="com.sap.aii.util.xml"/>
<property name="LibrariesReference" value="omk.ru~service~request~lib"/>
<property name="LibrariesReference" value="com.sap.aii.util.misc"/>
<property name="LibrariesReference" value="tc/cmi"/>
<property name="ServicesReference" value="sld"/>
</application-config>
<components/>
<services/>
<webdynpro>
<!-- applications -->
<applications>
<part shortName="CardCreatorApp" name="ru.omk.ui.CardCreatorApp">
<!-- application to component -->
</part>
<part shortName="ShowProcessApplication" name="ru.omk.ui.request.card.app.ShowProcessApplication">
<!-- application to component -->
</part>
</applications>
<!-- components -->
<components>
<part shortName="ShowProcessComponent" name="ru.omk.ui.request.card.spc.ShowProcessComponent">
<!-- component to component(Interfaces) -->
<alias name="ru.omk.ui.comment.cec.CommentEditorComp" objectName="omk.ru/ui~comment~wd" partName="ru.omk.ui.comment.cec.CommentEditorComp" partType="Component"/>
<alias name="ru.omk.ui.record.Attachments" objectName="omk.ru/ui~record~wd" partName="ru.omk.ui.record.Attachments" partType="Component"/>
<alias name="ru.omk.ui.record.rec.RecordEditorComp" objectName="omk.ru/ui~record~wd" partName="ru.omk.ui.record.rec.RecordEditorComp" partType="Component"/>
<alias name="ru.omk.ui.plan.apec.ApprovalPlanEditorComp" objectName="omk.ru/ui~plan~wd" partName="ru.omk.ui.plan.apec.ApprovalPlanEditorComp" partType="Component"/>
<alias name="ru.omk.ui.request.repl_dir.rdc.ReplicationDirectionComp" objectName="omk.ru/ui~request~repl_dir" partName="ru.omk.ui.request.repl_dir.rdc.ReplicationDirectionComp" partType="Component"/>
<alias name="ru.omk.ui.request.details.rdec.RequestDetailsEditorComp" objectName="omk.ru/ui~request~details~wd" partName="ru.omk.ui.request.details.rdec.RequestDetailsEditorComp" partType="Component"/>
<alias name="ru.omk.ui.history.hvc.HistoryViewerComp" objectName="omk.ru/ui~history~wd" partName="ru.omk.ui.history.hvc.HistoryViewerComp" partType="Component"/>
<alias name="ru.omk.ui.request.general.rec.RequestEditorComp" objectName="omk.ru/ui~request~general~wd" partName="ru.omk.ui.request.general.rec.RequestEditorComp" partType="Component"/>
<!-- component to models -->
<!-- component to implementedInterfaces -->
</part>
<part shortName="CardGenerator" name="ru.omk.ui.generation.CardGenerator">
<!-- component to component(Interfaces) -->
<!-- component to models -->
<!-- component to implementedInterfaces -->
</part>
</components>
<!-- interface definitions -->
<interfaces>
</interfaces>
<models>
<!-- models -->
</models>
<runtime-classes>
</runtime-classes>
<wdgeninfo>
<wdgencomponent name="SapMetamodelCore">7.0018.20081020084443.0000 (release=NW04S_18_REL, buildtime=2010-01-19:15:13:18[UTC], changelist=49392, host=PWDFM114.wdf.sap.corp)</wdgencomponent>
<wdgencomponent name="SapMetamodelCommon">7.0018.20081020084443.0000 (release=NW04S_18_REL, buildtime=2010-01-19:15:13:23[UTC], changelist=49392, host=PWDFM114.wdf.sap.corp)</wdgencomponent>
<wdgencomponent name="SapMetamodelDictionary">7.0018.20081020084251.0000 (release=NW04S_18_REL, buildtime=2010-01-19:15:22:16[UTC], changelist=49369, host=PWDFM114.wdf.sap.corp)</wdgencomponent>
<wdgencomponent name="SapMetamodelWebDynpro">7.0018.20081020084854.0000 (release=NW04S_18_REL, buildtime=2010-01-19:15:27:47[UTC], changelist=49427, host=PWDFM114.wdf.sap.corp)</wdgencomponent>
<wdgencomponent name="SapGenerationFrameworkCore">7.0018.20081020084310.0000 (release=NW04S_18_REL, buildtime=2010-01-19:15:12:25[UTC], changelist=49373, host=PWDFM114.wdf.sap.corp)</wdgencomponent>
<wdgencomponent name="SapDictionaryGenerationCore">7.0018.20081020084244.0000 (release=NW04S_18_REL, buildtime=2010-01-19:15:24:54[UTC], changelist=49368, host=PWDFM114.wdf.sap.corp)</wdgencomponent>
<wdgencomponent name="SapDictionaryGenerationTemplates">7.0018.20081020084244.0000 (release=NW04S_18_REL, buildtime=2010-01-19:15:25:01[UTC], changelist=49368, host=PWDFM114.wdf.sap.corp)</wdgencomponent>
<wdgencomponent name="SapWebDynproGenerationCore">7.0018.20081020084840.0000 (release=NW04S_18_REL, buildtime=2010-01-19:15:31:02[UTC], changelist=49426, host=PWDFM114.wdf.sap.corp)</wdgencomponent>
<wdgencomponent name="SapWebDynproGenerationTemplates">7.0018.20110316075807.0000 (release=NW04S_18_REL, buildtime=2011-03-16:07:22:38[UTC], changelist=107580, host=pwdfm114)</wdgencomponent>
<wdgencomponent name="SapWebDynproGenerationCTemplates">7.0018.20110316075807.0000 (release=NW04S_18_REL, buildtime=2011-03-16:07:22:38[UTC], changelist=107580, host=pwdfm114)</wdgencomponent>
<wdgencomponent name="SapIdeWebDynproCheckLayer">7.0018.20081020084840.0000 (release=NW04S_18_REL, buildtime=2010-01-19:15:30:56[UTC], changelist=49426, host=PWDFM114.wdf.sap.corp)</wdgencomponent>
</wdgeninfo>
</webdynpro>
</application>
does the user
UMFactory.getAuthenticator().getLoggedInUser().getUid() )
have access to the Portal_Content/TEST folder? It needs atleast "read" access in the permissions
Did you define the permissions correctly
sandip
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.