on 05-20-2007 8:34 AM
Hi all,
I wrote this code in a dynpage:
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, IPcdContext.PCD_INITIAL_CONTEXT_FACTORY);
env.put(Context.SECURITY_PRINCIPAL, req.getUser());
env.put(Constants.REQUESTED_ASPECT, PcmConstants.ASPECT_ADMINISTRATION);
InitialContext initialContext = null;
initialContext = new InitialContext(env);
String iViewID = "pcd:portal_content/Development/ClickMe";
IAdminBase result =(IAdminBase)initialContext.lookup(iViewID);
IAttributeSet myIview = (IAttributeSet)
result.getImplementation(IAdminBase.ATTRIBUTE_SET);
res.write("1 --> " + myIview.getAttribute("com.sap.portal.pcd.gl.CreatedAt") + "<BR>");
res.write("2 --> " + myIview.getAttribute("com.sap.portal.reserved.iview.IsolationMode"));
I use the following jars in my classpath:
com.sap.portal.ivs.api_landscape_api.jar
com.sap.portal.ivs.api_portalpcm_api.jar
com.sap.portal.pcm.admin.apiservice_api.jar
gl_api.jar
prtjndisupport.jar
and added the following sharing reference to portalapp.xml:
com.sap.portal.pcm.admin.apiservice
I wrote the same code in my WD application.
Instead of req.getUser() I used WDClientUser.getCurrentUser().getSAPUser()
I added the following sharing reference: PORTAL:sap.com/com.sap.portal.pcm.admin.apiservice
The code compiles but when I run it I get:
java.lang.NoClassDefFoundError: com/sapportals/portal/prt/jndisupport/InitialContext
I copied the 'prtjndisupport.jar' to the lib folder, compile and run again and then I got: java.lang.NoClassDefFoundError: EDU/oswego/cs/dl/util/concurrent/ConcurrentReaderHashMap
the class 'ConcurrentReaderHashMap' is under 'concurrency.jar' but when I added this jar under the lib folder and run, the TLN, DTN were gone - see snapshot (I needed to restart the server).
http://img129.imageshack.us/img129/4638/errjndiwz3.jpg
I guess something is wrong in the runtime.
What jars/sharing references do I need?
My portal is EP6 SP17.
The J2EE/Web Dynpro are under the same machine.
Thanks,
Omri
Hi Omri,
I was playing around with PCD-WD half a year ago. I have an example with following sharing references which works:
PORTAL:sap.com/com.sap.portal.ivs.api_iview
PORTAL:sap.com/com.sap.portal.ivs.iviewservice.oldpcm.iviews_dt
PORTAL:sap.com/com.sap.portal.ivs.iviewservice.templates_cache_srv
PORTAL:sap.com/com.sap.portal.statelesssessionservice
PORTAL:sap.com/com.sap.portal.ivs.api_landscape
PORTAL:sap.com/com.sap.portal.admin.util.PcmUtil
PORTAL:sap.com/com.sap.portal.ivs.connectorservice
PORTAL:sap.com/com.sap.portal.pcd.glservice
PORTAL:sap.com/com.sap.portal.ivs.iviewservice
I`m not sure whether all of them are required but you can start from here.
best regards, Maksim Rashchynski.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you both for your posts! I have been searching everywhere to find some detailed information on this topic. Since I am also traversing the PCD, I had to include the two sharing references you both mentioned, plus the third one listed below (in case it helps someone else working on this type of issue):
PORTAL:sap.com/com.sap.portal.pcm.admin.apiservice
PORTAL:sap.com/com.sap.portal.ivs.connectorservice
PORTAL:sap.com/com.sap.portal.navigation.api_service
The jar file is "com.sap.portal.navigation.api_service_api.jar"
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
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.