Retrieve PCD from Portal...Please Help...Urgent

Hi Ritu
i hope you would have fixed your issue by now.
kindly help me ......
i am trying to use the below piece of code to fetch the list of iviews from PCD.
the problem is  i dont understand the error
Code in APC:
===========
public class APC_Comp extends AbstractPortalComponent
    public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
       try{
       Hashtable env = new Hashtable();
       env.put(IPcdContext.SECURITY_PRINCIPAL, request.getUser());
       env.put(Context.INITIAL_CONTEXT_FACTORY,IPcdContext.PCD_INITIAL_CONTEXT_FACTORY);
//       env.put(com.sap.portal.directory.Constants.REQUESTED_ASPECT, PcmConstants.ASPECT_SEMANTICS);
//           /******** Since i couldnt find      PcmConstants.ASPECT_SEMANTICS jar i used the below code.
       env.put(Constants.REQUESTED_ASPECT,"com.sap.portal.pcd.gl.PersistencyAspect");
       InitialContext ctx = null;
       DirContext dirCtx;
       List roleList = null;
       ctx = new InitialContext(env);
       dirCtx = (DirContext) ctx.lookup("pcd:portal_content/");
       PcdSearchControls pcdSearchControls = new PcdSearchControls();
       pcdSearchControls.setReturningObjFlag(false);
       pcdSearchControls.setSearchScope(
       PcdSearchControls.SUBTREE_WITH_UNIT_ROOTS_SCOPE);
       dirCtx.addToEnvironment(
       Constants.APPLY_ASPECT_TO_CONTEXTS,
       Constants.APPLY_ASPECT_TO_CONTEXTS);
       NamingEnumeration ne = dirCtx.search("","(com.sap.portal.pcd.gl.ObjectClass=com.sapportals.portal.*iview*)",
                                                                   pcdSearchControls);
       while (ne.hasMoreElements()) {
       IPcdSearchResult searchResult =
       (IPcdSearchResult) ne.nextElement();
       String location = "pcd:portal_content/" + searchResult.getName();
       roleList.add(location);
       response.write("Object is "+location);
       }catch(Exception e )
             response.write("Exception Occured due to :" +e.toString());
Error Log :
==========
<< item 1 : >>#1.5 #001125A585A0005F000003BD0002514800045CAD115E54F3#1227798297334#com.sap.portal.prt.runtime#sap.com/irj#com.sap.portal.prt.runtime#ramesht#150270##n/a##e592fa70bc8511dd9fdd001125a585a0#SAPEngine_Application_Thread[impl:3]_19##0#0#Error##Java###07:04_27/11/08_0078_79979950
[EXCEPTION]
{0}#1#java.lang.NoClassDefFoundError: com.sapportals.portal.pcd.gl.PcdSearchControls
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(J9VMInternals.java:66)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:127)

try something like this :
if image file:
ImageIcon image = (new ImageIcon(getClass().getResource("yourpackage/mypackage/image.gif")));
if text file:
InputStream is = this.getClass().getResourceAsStream( "yourpackage/mypackage/myfile.xml");
but all in all , getClass will consume a lot computational power(time). If you have to access so many file, it'd better put it outside the jar

Similar Messages

  • I bought an iphone 5 on 01 February 2013 from your store to use in Turkey. But the phone is sim-locked. What can I do now?  Please help urgently.

    I bought an iphone 5 from apple store in Geneva to use in Turkey. But it is sim-locked. What can I do now. Please help urgently.

    Return it to the store where you purchased & get your money back. Either that, or call the store. No one here can help you, as there is no one from Apple here.

  • I have lost my iphone 4 just an hour ago... i need to delete my personal photos from it. PLease help urgently.. Thanks

    I have lost my iphone 4 just an hour ago... i need to delete my personal photos from it. PLease help urgently.. Thanks

    If you had find my iphone enabled follow the steps in the article below:
    http://support.apple.com/kb/ph2701

  • Please Help Urgently to refresh the report on the change in data

    We want to refresh report at runtime for the Drill Down report if any user changes the Data. We changes the data from the form which is called from the report and we want to this effect on the report on the prompt.
    Is there any method to close the report while it is in the queue of Background Engine? Can we refresh the report ? Please help urgently.
    Thanks in Advance.

    Pritesh,
    Reports goes out to the database and fetches the data (not a snapshot) and returns the information, formats it and displays it. The only way to refresh, is to rerun the report.
    If your are running from the server, you need to make sure you are not fetching from cache (you determine this from destype and set the life of the cache in the servername.ora file).
    I am unaware of any way to programatically close the report once displayed. The user must take action to close the report (unless you call the operating system to kill the display). When you rerun the report from Oracle Forms, you will get fresh data.
    Regards,
    The Oracle Reports Team jls

  • PASSWORD FOR FLODERS  PLEAse  HELP URGENT

    HI ALL
    please tell me the method of implementing password
    provision for some folders/files in the system.
    it should ask for password authentification before
    opening when i click on the folder.
    please help urgent
    thanks
    belur

    Hi Swaroopba,
    It can be very well done thru Form based Authentication.
    For eg let me explain with respect to Tomcat.
    Go to
    $TOMCAT_HOME/webapps/examples/WEB-INF directory.
    Please add the following code in it.
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>Protected Area </web-resource-name>
    <!-- Define the context URL's to be protected -->
    <url-pattern>/jsp/security/protected</url-pattern>
    </web-resource-collection>
    </security-constraint>
    Please add the following code in it. And you have to specify the roles for it.
    I hope this will be helpful for you.
    Or if you want it in an application, please let me know.
    Thanks
    Bakrudeen

  • HT1689 i have my daughters iphone 3, i want to use it as an i-pod, but it keeps receiving messages from some her friends is there a way to stop this from happening, please help, my phone is maxed out and would really like the storage for music, thanks

    i have my daughters iphone 3, i want to use it as an i-pod, but it keeps receiving messages from some her friends is there a way to stop this from happening, please help, my phone is maxed out and would really like the storage for music, thanks

    It sounds like it still has her information on it, so it might be efficient to navigate to Settings, then General, then Reset, then Erase All Content and Settings. You can then set up the phone again, using your information. This way the phone will be yours, officially, and her data and information will be removed.

  • I want to buy an in-app purchase but i don`t remember my security questions and i cant access my recovery email either, what can i do? i have 100$ on my account and cant use it because of that problem, please help URGENT

    I want to buy an in-app purchase but i don`t remember my security questions and i cant access my recovery email either, what can i do? i have 100$ on my account and cant use it because of that problem, please help URGENT

    If you have a rescue email address on your account then you can use that - follow steps 1 to 5 half-way down this page will give you a reset link on your account : http://support.apple.com/kb/HT5312
    If you don't have a rescue email address (you won't be able to add one until you can answer your questions) then you will need to contact Support in your country to get the questions reset : http://support.apple.com/kb/HT5699

  • I accidentally removed iphoto from dock, please help?

    I accidentally removed iphoto from dock, please help?
    iPhoto isn't in my applications to I can't drag it to dock.  All images and movies are still on Mac (heart did stop as I thought I'd lost everything and nearly cried) but I don't know how to get iPhoto back.  I'm worried about trying different things as don't want to lose anything on Mac.  Noticed that I haven't been using Time Machine and bought a couple of years ago so not sure what operating with.  I have our 2 CDs from when we bought the Mac - 13-inch Macbook Pro (Mac OS X Install DVD) and 13 inch MacBook Pro (Applications Install DVD).  My photos are not backed up so not sure if I need to do this first - can I back up to iCLoud or do I need newer software?
    Any help would be greatly appreciated - need lots of step by step instructions though!

    All images and movies are still on Mac
    Of course they are.  Deleting an app doesn't delete the files that's in it.

  • Please help URGENT : Chinese handwriting doesn't seem to work on Lion OSX. the handwriting trackpad appears but anything i write in Chinese doesn't appear in word, chrome,..... HELP PLEASE

    please help URGENT : Chinese handwriting doesn't seem to work on Lion OSX. the handwriting trackpad appears but anything i write in Chinese doesn't appear in word, chrome,..... HELP PLEASE
    And in system prefs/language and text/input languages, simplified chinese and traditional chinese are ticked as usual with handwriting options on !!!!

    Please search the forum for "chinese" to find the many other earlier posts about your issue, like
    https://discussions.apple.com/message/15746805#15746805

  • HT4623 After i updated my iPhone i realized i do not have my camera anymore how to get it back? I also using a new notebook so I do not have a back up to transfer it from.  Please help

    After i updated my iPhone i realized i do not have my camera anymore how to get it back? I also using a new notebook so I do not have a back up to transfer it from.  Please help

    I'm assuming you mean you don't have your camera application (which is not saved on any backup anyway).
    One way to find it is to get to your home screen, swipe the screen from right to left, and type "Camera" in the search field.  Camera is a core Apple app and cannot be deleted, so it must be there somewhere.
    An alternate approach is to do Settings > General > Reset > Reset Home Screen Layout

  • Need Sample code to retrieve Data from Portal DB(Oracle)

    Would anyone provide me steps to create application with a sample code to retrieve data from portal DB which is oracle and see the output in table format.

    Hi Bris ,
    The sample code , you didnt specified from where do u want to access the oracle thorough java code or through webdynpro .
    Sample code to access through Java
    import java.sql.*;
    class Customer
    public static void main(String args[]) throws SQLException
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    System.out.println("Connecting to the database...");
    try
    Connection cn=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:orcl","scott","t");
    Statement st=cn.createStatement();
    ResultSet rs=st.executeQuery("select 'Connected' from dual");
    rs.next();
    String s=rs.getString(1);
    System.out.println(s);
    st.close();
    cn.close();
    catch(Exception ex)
    System.out.println("The exception raised is:" + ex);
    [code]
    If accessing through JDBC datasorce.
    https://www.sdn.sap.com/irj/sdn/thread?threadID=328550
    https://www.sdn.sap.com/irj/sdn/thread?threadID=309386
    [code]
    package com.dhl.employeemodel;
    import java.sql.Connection;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.sql.DataSource;
    public class DBConnectionManager {
         Connection connection;
          * @return
         public Connection getConnection() {
              try
                   Context jndiContext = new InitialContext();
                   DataSource ds = (DataSource)jndiContext.lookup("jdbc/MyAlias");
                   connection = ds.getConnection();
             catch(Exception connectionErrEx)
                   //connectionErrEx.printStackTrace();
                   return null;
              return connection;
    Thanx
    Pankaj

  • Please Help - Urgent

    Hi everyone, I�m having problems with Java Mail, I have just installed it along with the java activation framework, they are located in the following directories:
    JavaMail: C:\jdk1.3.1\lib\javamail-1_2[1]
    Java activation framework: C:\jdk1.3.1\lib\jaf1_0_1[1]
    I have the classpath set as: C:\jdk1.3.1\lib\mail.jar;C:\jdk1.3.1\lib\activation.jar
    When I try to compile the sample code provided with these packages, msgsend.java using Jbuilder 2 I get the following errors:
    Error (36): cannot access directory javax\mail.
    Error (37): cannot access directory javax\mail\internet.
    Error (209): class message not found in class msgsend.
    Error (210): class MessagingException not found in class msgsend
    Error (134): class Session not found in class msgsend
    Error (134): variable Session not found in class msgsend
    Error (139): class Message not found in class msgsend
    Error (139): class MimeMessage not found in class msgsend
    Error (141): class InternetAddress not found in class msgsend
    Error (145): cannot access class Message.RecipientType;neither class nor source found for Message.RecipientType.
    Error (146): Variable InternetAddress not found in class msgsend
    Error (148): cannot access class Message.RecipientType;neither class nor source found for Message.RecipientType.
    Error (149): Variable InternetAddress not found in class msgsend
    Error (151): cannot access class Message.RecipientType;neither class nor source found for Message.RecipientType.
    Error (152): Variable InternetAddress not found in class msgsend
    Error (162): Variable Transport not found in class msgsend
    Error (170): class Store not found in class msgsend
    Error (172): class URLName not found in class msgsend
    Error (172): class URLName not found in class msgsend
    Error (189): class Folder not found in class msgsend
    Error (195): Variable Folder not found in class msgsend
    Error (197): class Message not found in class msgsend
    Error (197): class Message not found in class msgsend
    If I try to use another Java package to compile it I get even more errors (52), I cannot compile it by using the Javac command line compiler, it just says �Bad command or file name�.
    Can anyone tell me Why this is happening and how I might be able to fix it please, I need to start learning Java Mail quickly but at the moment I can�t even begin to do this until I can understand how to get this sample code to work.
    Thanks Everyone
    Noel

    First of all... don't post with topics like "Please Help - Urgent". The topic is supposed to reflect what the question is about.
    Secondly... think for a second. If mail.jar is in C:\jdk1.3.1\lib\javamail-1_2[1]... why are you with your classpath saying that mail.jar is in C:\jdk1.3.1\lib ?
    You classpath is supposed to point directly at you jar-files.
    /Michael

  • How to download garageband old version? i mean version 1.0 to install it on iphone 4s with ios 6.0.1??? please help urgently, how to download garageband old version? i mean version 1.0 to install it on iphone 4s with ios 6.0.1??? please help urgently

    how to download garageband old version? i mean version 1.0 to install it on iphone 4s with ios 6.0.1??? please help urgently, how to download garageband old version? i mean version 1.0 to install it on iphone 4s with ios 6.0.1??? please help urgently

    I did this a few weeks ago to be sure it was going to work for a young person I was giving my ipod to.  Then I reset the information for her and now it will not load.  Very sad.  She is so talented and she really needs this.   Anyone know?

  • I received an iCloud backup notification on my ipad mini but tapping "OK" does not remove it and therefore I am unable to do any activity on my ipad mini. please help urgent.

    I received an iCloud backup notification on my ipad mini but tapping "OK" does not remove it and therefore I am unable to do any activity on my ipad mini. please help urgent.??

    Have you tried a reset ? Press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider if it appears), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.

  • I want to cahage my peyment method ( i wana do take out my credit card  from there) please help how???

    want to cahage my peyment method ( i wana do take out my credit card  from there) please help how???

    You can't change to 'None' until you clear up the previous payment problem.  Add a fresh iTunes gift card, or add a credit card, and then once the billing issue clears, you can choose 'None' again.

Maybe you are looking for

  • How to use a Sybase table in Oracle SQL statement?

    How to use a Sybase table in Oracle SQL statement? Sybase version : 11.9.2.4 Oracle version : 10.2.05 Thanks.

  • End of Useful life for an asset

    Hello, Does anyone know if there is any standard report which states when the asset's useful life is going to end? Even if there is no standard report, does anyone know if this information is stored in any tables from which it can be extracted. Basic

  • Linking a CRM case to a document in an external Content server - CRM 6.0

    Hi, We are creating a case from a scanned document, the document is stored in a separate content server. Now we need to link the created case to the scanned document in the content server. We need to be able to access the document/image from within t

  • Open help in new window

    Hi, I use following to link OHW <af:goLink text="Help" destination="#{adfFacesContext.helpProvider['title.htm'].externalUrl}" targetFrame="_blank" /> when i click the link, it opens help in new tab. How do i open new window without toolbar. I tried u

  • Why can't you trim or merge (pathfinder) a gradient?

    Whenever I try to trim or merge a gradient it only divides it, but when it's solid it works. Why? I'm trying to trim/merge some artwork with a lot of gradients and it's making it impossible. If anyone knows of a way to do this with gradients please l