Hi,
I am trying to access PCD iview properties using PCD API. I got the below exception:
com.sap.portal.pcm.iview.admin.AttributeSetiView incompatible with com.sap.portal.pcm.iview.IiView
Here is the code:
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,IPcdContext.PCD_INITIAL_CONTEXT_FACTORY);
env.put(Context.SECURITY_PRINCIPAL, request.getUser());
env.put(Constants.REQUESTED_ASPECT, PcmConstants.ASPECT_SEMANTICS);
String id = "pcd:portal_content/google";
InitialContext iCtx = null;
try {
iCtx = new InitialContext(env);
IiView result=(IiView) iCtx.lookup(id); // getting Exception at this line
response.write(result.getAttribute("com.sap.portal.pcm.Title",request.getLocale()));
}
catch ( Exception e)
{
response.write(e.getMessage());
}
Can someone help me on this.
Regards,
Lakshmi