Quantcast
Channel: SCN : Discussion List - SAP Enterprise Portal : Administration and Development
Viewing all articles
Browse latest Browse all 2686

Runtime exception while using PCD API in NW 7.3 EHP1

$
0
0

Hi,

I am trying to get the attribute values of a perticular pcd objects in the DC, using the PCD API. Though my DC is deployed successfully, I get an exception from my NWDI logs, which says

'Application can not be started. Reason: it has Hard reference to the following resources, which are currently not available on the system: hard to SAPPORTAL/com.sap.portal.pcm.admin (public) (f=true, cl=true);'

 

In my portalapp.xml, i have added the following sharing reference:

<property name="SharingReference" value=

"urlgenerator,com.sap.portal.htmlb,

com.sap.portal.navigation.service,

com.sap.portal.navigation.helperservice,

com.sap.portal.pcd.glservice,

com.sap.portal.pcm.admin"/>

 

Here is my code:

Hashtable ht_env = new Hashtable();

//Setting environment variables

ht_env.put(Context.INITIAL_CONTEXT_FACTORY,IPcdContext.PCD_INITIAL_CONTEXT_FACTORY);

ht_env.put(Context.SECURITY_PRINCIPAL, request.getUserPrincipal());

ht_env.put(Constants.REQUESTED_ASPECT, PcmConstants.ASPECT_SEMANTICS);

InitialContext iCtx = null;

IiView iView = null;

IPage ipage = null;

 

try {

             iCtx = new InitialContext(ht_env);

             Object currentObject = iCtx.lookup("portal_content/somepath/somepath");

           

             if (currentObject instanceof IiView) {

                         iView = (IiView) currentObject;

                         Enumeration enum1 = iView.getAttributeIds();

                      if(enum1!=null){

                                  while(enum1.hasMoreElements()){

                                              String str = (String)enum1.nextElement();

                                              //Displaying all the attributes of the iview

                                              response.write("Attribute : " + str + " : " +iView.getAttribute(str).toString() + "<BR>");

                                  }

                      }

             }else if (currentObject instanceof IPage) {

                         ipage = (IPage) currentObject;

                         Enumeration enum1 = iView.getAttributeIds();

                          pt ="";

                      if(enum1!=null){

                                  while(enum1.hasMoreElements()){

                                              String str = (String)enum1.nextElement();

                                             pt = pt+">>"+ipage.getAttribute(str);

                                              //Displaying all the attributes of the iview

                                              response.write("Attribute : " + str + " : " +ipage.getAttribute(str).toString() + "<BR>");

                                  }

                      }

             }

 

I am following the following thread as reference:

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/508baf88-9335-2d10-efa6-c6ad61e5fc4b?quicklink=index&overridelayout=true

 

Some pointers would be extremely helpful. thanks in advance.


Viewing all articles
Browse latest Browse all 2686

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>