cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing PCD objects from within webdynpro

Former Member
0 Kudos

I am trying to run this code within a webdynpro app

Hashtable env = new Hashtable();

try

{

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

env.put(Constants.REQUESTED_ASPECT, IPcdAttribute.PERSISTENCY_ASPECT);

env.put(Context.SECURITY_PRINCIPAL, WDClientUser.getCurrentUser());

String roleID = "pcd:portal_content/SBX_NEXEN_Content_Admin";

InitialContext iCtx = new InitialContext(env);

}

After this I am looking for some iView objects using PcdSearchControls.

I am getting the following error:

java.lang.NoClassDefFoundError: EDU/oswego/cs/dl/util/concurrent/ConcurrentReaderHashMap

at com.sapportals.portal.prt.jndisupport.util.MemoryHierarchicalContext.prepare(MemoryHierarchicalContext.java:43)

at com.sapportals.portal.prt.jndisupport.util.AbstractHierarchicalContext.<init>(AbstractHierarchicalContext.java:53)

at com.sapportals.portal.prt.jndisupport.util.AbstractHierarchicalContext.<init>(AbstractHierarchicalContext.java:33)

at com.sapportals.portal.prt.jndisupport.util.MemoryHierarchicalContext.<init>(MemoryHierarchicalContext.java:28)

at com.sapportals.portal.prt.jndisupport.JNDISupport.<init>(JNDISupport.java:32)

at com.sapportals.portal.prt.jndisupport.JNDISupport.getInstance(JNDISupport.java:71)

at com.sapportals.portal.prt.jndisupport.NamingManager.findContextFactory(NamingManager.java:164)

at com.sapportals.portal.prt.jndisupport.NamingManager.getInitialContext(NamingManager.java:41)

at com.sapportals.portal.prt.jndisupport.InitialContext.getDefaultInitCtx(InitialContext.java:39)

at javax.naming.InitialContext.init(InitialContext.java:219)

at javax.naming.InitialContext.<init>(InitialContext.java:195)

at com.sapportals.portal.prt.jndisupport.InitialContext.<init>(InitialContext.java:24)

Is there something I need to configure in my webdynpro app that allows it access to com.sapportals.portal.prt.jndisupport.InitialContext??

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

This piece of code has a chance to work only when Webdynpro and portal are running on the same server.

Hope this helps.

Thanks and Regards,

Prasanna Krishnamurhy

Former Member
0 Kudos

Hi Roaa,

had you solve your problem. I you solve your problem, pls give me help to solve this problem.

I have same problem with lookup. I have been getting initail context but I am getting same error when I lookup some object.

advance thanks for your help.

Regards,

Krishna.