How to access properties from portallapp.xml in jsp file

<b>portalapp.xml</b>
<property name="SupportUrl" value="http://sapdp1ci.zrh.swissre.com:53000/irj/portal?navigationtarget=navurl://8f7e974723098424468c8ae903228c0e">
          <property name="personalization" value="dialog"/>
          <property name="plainDescription" value="Support Desk Link URL"/>
          <property name="category" value="Navigation"/>
        </property>
<b>jsp code</b>
private String getSupportUrl(IPortalComponentRequest request)
     IPortalComponentContext myContext = request.getComponentContext();
     IPortalComponentProfile profile = myContext.getProfile();
     String supportDeskLocation = profile.getProperty("SupportUrl");
     //String supportDeskLocation = (String)request.getNode().getValue(SUPPORT_URL);
     return supportDeskLocation;
but supportDeskLocation is coming as null.
Please help me in solving the issue.
Points will be awarded
thanks
bala

Hi Michal,
How are you?
I´m trying to access a property from portalapp.xml and I have in the right place according to your post and here is my code to retrieve it:
String value = (String)request.getNode().getValue("MyLogoffUrl");
Did you activated something or did something else so your property could be reached by the JSP?
It is just returning null in my case.
Thanx in Advanced!
Kind Regards,
Gerardo j

Similar Messages

  • Exception while loading properties from an xml file

    Hi all,
    I've got a problem while loading properties from an XML file:
    java.lang.ClassCastException: org.apache.xerces.dom.DeferredCommentImpl cannot be cast to org.w3c.dom.Element
    ERROR - Cannot load properties from the specified file <./conf/login.prop> java.lang.ClassCastException: org.apache.xerces.dom.DeferredCommentImpl cannot be cast to org.w3c.dom.Element
         at java.util.XMLUtils.importProperties(XMLUtils.java:97)
         at java.util.XMLUtils.load(XMLUtils.java:69)
         at java.util.Properties.loadFromXML(Properties.java:852)
         at g2.utility.HRPMProperties.<init>(HRPMProperties.java:78)
         at g2.utility.HRPMProperties.getInstance(HRPMProperties.java:94)
         at g2.gui.workers.ApplicationSwingWorker.<init>(ApplicationSwingWorker.java:36)
         at g2.main.Main.main(Main.java:37)but this code worked before, and I've got the xerces and xercesImpl packages in the classpath, anyone can give me an hint on how to fix the problem?

    Here there's the code that instantiates the HRPMProperties object loading the property file:
    public class HRPMProperties extends Properties {
         * A reference to myself.
        protected static HRPMProperties mySelf = null;
         * The property file to which load the configuration.
        protected static String propertyFile = "./conf/login.prop";
          * A set of static strings used as keys in the properties file.
         public final static String DATABASE_URL = "database_url";
         public final static String DATABASE_USERNAME = "database_username";
         public final static String DATABASE_PASSWORD = "database_password";
         public final static String REAL_USERNAME = "real_username";
         public final static String REAL_PASSWORD = "real_password";
         public final static String PHANTOM_LOGIN = "login_thru_phantom_user";
         public final static String AUTOCONNECT = "autoconnect";
         public final static String TRANSLATION_FILE = "translation_file";
         * Builds up an empty properties map.
        protected HRPMProperties(){
         super();
         this.reload();
         * Builds up the property map from the specified input file. <B> The file must be in XML format</B>.
         * In case of exception and/or problems reading from the specified file, an empty property map is returned.
         * @param fileName the path and the name of the file with the XML representation of the properties.
        protected HRPMProperties(String fileName){
         super();
         try{
             this.loadFromXML(new FileInputStream(fileName));        
         }catch(Exception e){
             Logger.error("Cannot load properties from the specified file <"+fileName+"> " + e);
             e.printStackTrace();
         * Provides an instance of the property class loaded from the default configuration file.
         * @return the property instance
        public static final HRPMProperties getInstance(){
         if( HRPMProperties.mySelf != null )
             return HRPMProperties.mySelf;
         else{
             HRPMProperties.mySelf = new HRPMProperties(HRPMProperties.propertyFile);
             return HRPMProperties.mySelf;
    }The constructor is the one triggering the exception, so there's a problem loading the XML property file.

  • APIs  for Retrieving properties from portalapp.xml

    Hi all,
    Can anyone tell me Is there any Java/Portal APIs for retrieving properties from portalapp.xml as well as from manifest.mf.
    Help wud be highly appreciated.
    Regards,
    Karthick

    Hi Karthick,
    If you want to access the manifest file, you could do something like this:
    import java.io.File;
    import java.io.FileInputStream;
    import java.util.jar.Manifest;
    import com.sapportals.portal.prt.runtime.IPortalRuntimeResources;
    import com.sapportals.portal.prt.runtime.PortalRuntime;
    File privateResoucePath = PortalRuntime.getRuntimeResources().getLocation(IPortalRuntimeResources.LT_PRIVATE_RESOURCES);
    File parPath = new File ( privateResoucePath, "HelloWorldProject" );  // name - par file name without the ".par" extension);       
    if ( parPath.exists()!=false ) {
        try {
            File manifestPath = new File ( parPath, "META-INF" );
            FileInputStream fis = null;
            fis = new FileInputStream(new File(manifestPath, "MANIFEST.MF"));
            Manifest mf = new Manifest(fis);
            java.util.jar.Attributes attr =  mf.getMainAttributes();
            if (attr!=null) {
                return attr.getValue("Specification-Title");
            else {return null;}
        } catch (Exception e) {
            e.printStackTrace();
            return "ERROR"+e.toString();
    META-INF is top level folder.
    Hope this helps.
    Daniel

  • From my iPad I can print wirelessly in my office, but how do I print remotely via the web through my HP ePrint printer.  It is set up with an email address but i don't know how to access it from my iPad.

    I can print wirelessly in my office from my iPad, but how do I print remotely via the web to my HP ePrint printer.  The printer is set up with an email access address but I don't know how to access it from my iPad.

    Read through this for some information on how to do this:
    http://www8.hp.com/us/en/support-topics/mobile-printing/how-to-print-mobile-devi ces-ipad-iphone.html

  • How to access symbol from different stage

    Hi everyone,
    I'm really new at Edge, so I still have a lot to learn and I need your help with something..
    I want to know how to access a symbol from another stage, here's what I've and what I want to do..
    I've the main index page with symbol named "content", in content I load other composition (page). called "page2".
    all I want to do is when I click a symbol "XX" inside "page2". The "content" symbol loads other composition called "page3".
    I don't know how to access "Content" from "page2", so I could load "page3" ..  that's it
    I feel like it's simple, but I just couldn't know how to do it, I',m sorry for bothering you for such a question, but I've searched a lot and I got nothing.
    Thanks
    I thought I could use something like this
    var comp = Edge.getComposition("EDGE-638329");  
    var stage = comp.getStage(); 
    var symp= comp.stage.getSymbol("content");
    EC.loadComposition("assets/units/stage1/s1_3/s1_3.html",symp);
    but it's still not working, could someone please tell me what I'm doing wrong?

    I have multiple compositions, where I need to go from one to another.
    I use click scripts in an element to do this, using identical pages with different animations on each page.:
    Click script:
    AdobeEdge.goLoc(url); //url is the URL of an identical new html page with a different animation
    Then I have a custom .js page that I use that has the function:
    AdobeEdge.goLoc = function(url) {
    location=url;
    Peter Small

  • I created a folder from my camera roll and shared with my icloud acct, can't figure out how to access it from my computer?

    I created a folder from my camera roll and shared with my icloud acct, can't figure out how to access it from my computer? I log onto icloud and can't find anywhere where "shared" photos are..

    You need Mountain Lion (10.8.2 or higher) and iPhoto '11 (9.4 or higher) or Aperture 3.4 to get shared photo streams on Mac.
    Another option to transfer them is to either import them to iPhoto using your usb cable, as explained here:http://support.apple.com/kb/HT4083, or to us an app like PhotoSync to transfer them to your Mac over your wifi.  (PhotoSync will also transfer albums, not just photos from the camera roll.)

  • How to access a JAVA Script variable in JSP Code

    How to access a JAVA Script variable in JSP Code. I have been unable todo this.
    Plz Suggest a way.
    Thanks
    Soumya

    try to do this code
    String s=request.getParameter("javascriptvariablename");

  • How to extract data From Hyperion Essbase to Flat Files

    Hi ,
    Can anyone tell me how to extract data from Hyperion essbase to Flat file(e.g. .csv , .txt ,...) or Oracle Table using ODI.
    Regards,
    Avneet

    Hi sutirtha,
    I have make one column as key column now i am getting this error,
    org.apache.bsf.BSFException: exception from Jython:
    Traceback (innermost last):
    File "<string>", line 1, in ?
    com.hyperion.odi.essbase.ODIEssbaseException: The number of columns returned by script [10] is less than the source data columns exposed [12]
    at com.hyperion.odi.essbase.ODIEssbaseDataReader.getAppData(Unknown Source)
    at com.hyperion.odi.essbase.AbstractEssbaseReader.extract(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java)
    at org.python.core.PyMethod.__call__(PyMethod.java)
    at org.python.core.PyObject.__call__(PyObject.java)
    at org.python.core.PyInstance.invoke(PyInstance.java)
    at org.python.pycode._pyx7.f$0(<string>:1)
    at org.python.pycode._pyx7.call_function(<string>)
    at org.python.core.PyTableCode.call(PyTableCode.java)
    at org.python.core.PyCode.call(PyCode.java)
    at org.python.core.Py.runCode(Py.java)
    at org.python.core.Py.exec(Py.java)
    at org.python.util.PythonInterpreter.exec(PythonInterpreter.java)
    at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:144)
    at com.sunopsis.dwg.codeinterpretor.k.a(k.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSqlC.treatTaskTrt(SnpSessTaskSqlC.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
    at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
    at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
    at com.sunopsis.dwg.cmd.e.k(e.java)
    at com.sunopsis.dwg.cmd.g.A(g.java)
    at com.sunopsis.dwg.cmd.e.run(e.java)
    at java.lang.Thread.run(Unknown Source)
    Caused by: com.hyperion.odi.essbase.ODIEssbaseException: The number of columns returned by script [10] is less than the source data columns exposed [12]
    at com.hyperion.odi.essbase.wrapper.EssbaseReportDataIterator.validateColumns(Unknown Source)
    at com.hyperion.odi.essbase.wrapper.EssbaseReportDataIterator.init(Unknown Source)
    ... 33 more
    com.hyperion.odi.essbase.ODIEssbaseException: com.hyperion.odi.essbase.ODIEssbaseException: The number of columns returned by script [10] is less than the source data columns exposed [12]
    at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:146)
    at com.sunopsis.dwg.codeinterpretor.k.a(k.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSqlC.treatTaskTrt(SnpSessTaskSqlC.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
    at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
    at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
    at com.sunopsis.dwg.cmd.e.k(e.java)
    at com.sunopsis.dwg.cmd.g.A(g.java)
    at com.sunopsis.dwg.cmd.e.run(e.java)
    at java.lang.Thread.run(Unknown Source)

  • How can i access properties from APP server through JNLP with ot using JAR

    Hello
    i want to retrive a Properties file from WL-7 app installed location like :bea/home/externalized.properties
    now i want to use this properties file throgh out the application. if any property is changed in "externalized.properties" that could be reflect dynamically in my code.
    So my requirement is :
    The current implementaion is using the JNLP down load the required code which contains the properties in .jar files, i have around 500 properties which are embedded in differnet .jar files with differnt property name. So i want to make all 500 properties to get out side from the jar files. and keep that consolidated properties in a single location and access it dynamically after deployed my ear file in wl7 app server.
    my application is implemented in SWING and EJB now i want to create an ear file which can be deployed any instance or cluster of WL7 app server.
    My Q:
    1. How can i access properties file through JNLP? (not a single property, want to access all properties in externalized.properties)
    2. is thare any known issue with SUN to load properties file through JNLP?
    your help is highly appreciated.
    -Siva

    Hey Thanks for your response,
    My question is Still not answered,
    see infact i have different type of environments to launch my application.
    infact my weblogic is deployed at remote location whihch is installed in linux,
    code is exist in our local system.
    At the time of code build for my local system i'm not able to get the properties from remote WL server,
    so at the time of code compilation and making the EAR file i'm not having this externalized properties file in newly generated EAR file.
    so once i copied my EAR in to WL7 cluster and i'm running the application using startAdminserver.sh, in this script file i'm defining the
    java -DexternalizedProperty=$WL_HOME/externalizedProperty.properties so now i'm able to get this properties to 'externalizedProperty"
    But when i download my application required jars, at this time i does not having the property file in my downloaded JAR files.
    So i want to access the remote properties file in suh sistuation.
    now i'm runnig the application at my local side to launch and Server side as well.
    So i have 2 runtimes 1 is my local and another is my server. In this case using "-DexternalizedProperty" i'm able to get this in server side,
    once control is come to local system it is not able to find this "-DexternalizedProperty" [externalizedProperty].
    Hope now u get my scenario..
    Thanks,

  • How to retrieve value from AIAInstallProperties.xml in AIA Flow.

    After PIP Developement, Installer team will build the OUI installer for the PIP.They will build the screens for our PIP based on the requirements we give them.We give them a list of properties that we need the installer to prompt for and then the installer will store the values entered by the user in AIAInstallProperties.xml file.When the code is written, these properties are used instead of hardcoding any machine names, usernames, passwords, etc. When the services are deployed the properties are replaced with the values in AIAInstallProperties.xml.
    How to retreive those values from AIAInstallProperties.xml file to your participating applications or any adapters in your code?
    When the services are deployed how the properties are getting replaced with the values in AIAInstallProperties.xml.?
    Can anyone explain the above two flow.
    Thanks in advance.

    Hi
    Prem Edwin's posting about AIAInstallProperties.xml is correct.
    Two points, the 11gR1 is a foundation pack only release, that is why the OUI is only built to collect FP related information. In the future, when PIPs arrive, new wizard steps will involve to collect PIP specific information during installation/deployment time.
    For your example of of getting a file location during installation, it would be effectively for your self-built PIPs. That is why the 11gR1 FP OUI would not support that.
    Also, there are only finite number of tokens can be detokenized from AIAInstallProperties.xml to composite.xml, if you were introducing a random new 'file path', I don't believe it would be replaced automatically by default in R1 time.
    Thanks!

  • OWSM Policy - how to access subject from within protected service

    I am setting up a new instance of SOA Suite 11g for integration purposes at my organization. I am planning to use predefined WSM policies to protect the services (see http://download.oracle.com/docs/cd/E12839_01/web.1111/b32511/policies.htm).
    Most communication is server-to-server (e.g. HR sending data to CRM), so it would make sense to use something like X.509 (i.e. oracle/wss11_x509_token_with_message_protection_service_policy). However, I have a requirement that the underlying services (BPEL processes, for example), must know the subject (i.e. the server) that sent the message. For example, did this incoming message come from the HR system or the CRM system. This is used internally by the BPEL process for audit logs and other things.
    We also use OAM, so I will likely eventually use the oracle/wss_oam_token_service_policy to verify ObssoCookie values. In those cases, the underlying Java service or BPEL process will need to have access to the username of the authenticated user.
    I've searched and searched the documentation, and I cannot find any instructions about how to access details about the authenticated subject (such as username, roles, or X.509 properties) from within the protected service, whether it be a Java-based service, a BPEL process, or anything else.
    I did find some information about how to read SOAP header values from within Oracle BPEL processes (see http://chintanblog.blogspot.com/2007/12/insertextract-soap-headers-in-bpel-it.html). However, this looks like it will only work if I use the WSS UsernameToken policy (e.g. oracle/wss_username_token_service_policy), since that is the only policy where the actual subject identifier (username) is specified in a SOAP header.
    Do the other policies (X.509, SAML, and OAM) provide a mechanism to convey properties of the authenticated subject to the underlying service? If so, where is this documented? Thanks much!
    Sincerely,
    Nathan Kopp

    Is it wrong question or wrong thing to do?
    Let's make it a little bit easier/better/worse:
    How can I change policy permissions at runtime?

  • How to access data from node of other view into node of diff view?

    Hi all,
                  My requirement is that I have account defined in 'CLEAR_HEAD' component , view is 'CLEAR_HEAD/ClearAccountsEF'
    context node is 'TARGETVALUE' and attribute is 'ACCOUNT1'. I need to access this account information in the same component but in another view 'CLEAR_HEAD/ClearAddressEL' and the context node is 'DEPLIST' and attribute is 'RADIO1'. I have one custom controller 'CLEAR_HEAD/CuCoHead'  already defined in this component. I checked the above 'TARGETVALUE' node but it is not bind to any Custom controller. And I also checked the above pre-defined custom controller  'CLEAR_HEAD/CuCoHead'  and the context node in this Custom controller is different from those of the above context nodes and the only one context node defined in this custom controller  'CLEAR_HEAD/CuCoHead' is 'LISTNODE'.
    My quesitons are
    1. How to bind the above context node(TARGETVALUE) to the custom controller. Can I bind it to the above existing custom controller  'CLEAR_HEAD/CuCoHead'  , if so then how can I do since the above custom controller doesn't contain this context node(TARGETVALUE) and it contains only  the context node 'LISTNODE'. If I can use the above existing Custom Controller then can I directly do binding by right clicking the context node(TARGETVALUE) -> Create binding. Then what should be the value in Target Contex Node?
    2. Do I need to create another custom controller If so then can I directly follow the steps defined in this link '/people/vikash.krishna/blog/2009/12/28/crm-70-how-to--5d-custom-controller-and-binding-of-context-nodes' ? If so then what should be the Model node and Bol Entity name?
    I appreciate your help..
    Thanks,
    Chinnu.

    HI Chinnu, <br />
    <br />
    Approach 1: <br />
    Bind the context node view1  TARGETVALUE with Component controller.<br />
    and in View2 <br />
    data lr_comp_controller type ref to X----component controller<br />
    lr_entity TYPE REF TO cl_crm_bol_entity.<br />
    lr_comp_controller ?= me-&gt;comp_controller.<br />
    <br />
    lr_entity ?= lr_comp_controller-&gt;typed_context-&gt;Y-&gt;collection_wrapper-&gt;get_current( ). Y---CONTExt node in view1.<br />
    <br />
    Approach 2: <br />
    Declare a static attribute in the View controller of first view.<br />
    Read the attribute D1 value from DO_PREPARE_OUTPUT of first View and pass it to the Static sttribute.<br />
    In your 2nd view u can read this Static Atribute and use it.<br />
    Static Attribute u need to call as follows . Z********IMPL(Implemantation Class)=&gt;ATTR1<br />
    <br />
    Approach 3: <br />
    Creae a custom controller with the same context node used in view 1. <br />
    Bound the custom controller context node to view 1 context node.<br />
    <br />
    Now in view 2, get the custome controller and read data from it.<br />
    <p />
    <br />
    View1 context node: BTADMINH<br />
    <p />
    Custom controller: BT115QH_SLSQ/AdminH   context node: BTADMINH_CUCO<br />
    <p />
    In view 1 context class (CTXT class), go to CREATE_BTADMINH method and append the below code to bind both the context nodes,<br />
    <pre class="jive-pre"><code class="jive-code jive-java">* bind to custom controller
       owner-&gt;do_context_node_binding(
                iv_controller_type = CL_BSP_WD_CONTROLLER=&gt;CO_TYPE_CUSTOM
                iv_name =
                <font color="navy">'BT115QH_SLSQ/AdminH'</font>                         <font color="red">&quot;#EC NOTEXT</font>
                iv_target_node_name = <font color="navy">'BTADMINH_CUCO'</font>
                iv_node_2_bind = BTADMINH ).
    Now in view 2 get the custom controller using the below code,
    Data: lr_cuco type ref to &lt;custom controller class&gt;.
    lr_cuco   ?= me-&gt;get_custom_controller( controller_id = <font color="navy">'BT115QH_SLSQ/AdminH'</font> ).
    lr_entity     = lr_cuco-&gt;typed_context-&gt;BTADMINHCUCO-&gt;collection_wrapper-&gt;get_current( ).
    </code></pre> <br />
    <p />
    If you are just reading a attribute value  from view1, then approach 2 shud b easy one. <br />
    Approach 1 & 3, more or less the same, except we are using component controller vs custom controller. These approaches holds good when the data required to be accessed/updated from either views. <br />
    <br />
    Coming to your specific scenario, I think there is already a context node available in the compoenent controller TARGETBP, which can have the required data for you. Please look into that. <br />
    <br />
    Cheers, Satish<br />
    Edited by: Satish Reddy Palyam on Aug 13, 2011 12:50 PM

  • Can't remember how to access voicemail from a landline or phone outside the verizon network?

    Can't remember how to access voice mail from a land line or a mobile phone outside the Verizon network?

    Dial your full 10-digit number, then hit the * key whenyour voicemail answers.  It will ask for your password and you will be connected to your voicemail as if you were on your phone.

  • How to access server from TOAD

    i have a doubt as to how to access a Database server from TOAD. If, we have to access from SQLplus command prompt, we define the entry in tnsnames.ora file. But, how to access a Database server from TOAD. I hope, my question is clear. Please, help in solving the doubt.
    regards.

    thanks, for your answer. Does it mean that I need to install oracle to get tnsnames.ora?
    Also, my scenario is that I need to connect using TOAD to oracle which is there on a system over a remote LAN. My entry in tnsnames.ora has to match the local LAN IP which is specified in the listener.ora but If I put the local LAN IP of the remote LAN in my tnsnames.ora, it will not make much sense. The entry in
    tnsnames.ora is
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.10.26)(PORT = 1521))
    But, I have access to the system like public IP 192.29.212.156.

  • NullPointerException while accessing .Properties from JAR

    Hi,
    I have created a JAR file which contains the .class as well as .properties in my application. Similarly when generating the JAR i have included the respective JAR's as well as the Main class of the app. in the Manifest.MF file.
    Below is the code i am using to load the properties from the LoggerConstants.
    if (properties == null) {
                   try {
                        properties = new Properties();
                        properties.load(Thread.currentThread().getContextClassLoader()
                                  .getResourceAsStream (LoggerConstants.LOGGER_PROPERTIES_PATH));
                        PropertyConfigurator.configure(properties);
                   } catch (IOException ioe) {
                        throw new LoggerException("unable to load file="
                                  + LOGGER_PROPERTIES_PATH, ioe);
    When i access the JAR in other app. by putting that in the build path, i am getting the following exception:-
    Exception in thread "main" java.lang.NullPointerException
         at java.util.Properties$LineReader.readLine(Properties.java:418)
    It seems that it is not able to pick the .properties which is there in the JAR file? But it is able identify the .class file?
    I tried by copying the same in the ANT Class path in eclipse, but still the problem persists. What i need to make sure that the .properties will be identified by the other app (App. 2)? Please shed some light into this.
    Thanks,
    Rithu

    Thanks Guys, the logger.properties will be under the classpath in the eclipse which will be under " src/com/example/logger.properties" directory. To brief , i am going to give this logger app. by compressing it in the JAR and will send to another machine , they need to use this JAR in their application and make use of the LogLevels i have created. The same will be done for other app. as well. So a Single Logger comp. which is build independently will be used by other standalone app. which needs to log the information.
    1) So, when i give the "LoggerComponent" JAR to other application. they should not modify any code (or create any classes) to use the .class or the .properties of the JAR?
    2) .class may not be a problem, but with .properties which may be a problem, hence are you saying that we need to load the logger.properties again in the referenced app. explictly, like wise do it for other app. which is going to use it? Because from my side i will give the Logger Comp. JAR to the other machines, just they need to use it as it is, without any modification in their code.
    3) Moreover when i create a JAR whether i need to package log4j.jar as well as other dependent JAR for the logger app.? So that the other reference app. dont have their own log4j.jar in their system to make use of it? Whether that makes sense or we should package a JAR with other JAR's(dependent JAR of the app.)?
    4) Ok. say if i am going to access the properties in my JAR in the reference app., like:-
    String sConfigFile = "src/com/example/logger.properties";
    InputStream in = LoggerTest.class.getClassLoader().getResourceAsStream(sConfigFile);
    if (in == null) {
         //File not found! (Manage the problem)
    Properties props = new java.util.Properties();
    props.load(in);
    LogManager logManager = new LogManager(); // Main class in the LoggerApplication JAR used in the reference app.
    logManager.logMessage("Test log msg");
    I will load properties and invoke the main class in JAR like above? Please clarify these queries. Thanks for the support
    Thanks,
    rithu

Maybe you are looking for

  • No video playback in premiere elements 12

    No playback after a few mins of editing.  Tried most of the potion in the adobe troubleshooting section (http://helpx.adobe.com/premiere-elements/kb/troubleshoot-digital-video-playback-premiere-2 .html) but never got anywhere.  Most options listed ar

  • How do I copy a Macbook hard drive onto an external hard drive?

    Hello all. I am trying to do a back up of a hard drive on a circa 2006 Macbook that I'd like to wipe clean but retain all of the info from the HD on an external hard drive. I tried simply right-clicking the hard drive, selecting "Copy" and then pasti

  • Problem viewing alerts in RWB

    in my alert inbox in RWB, i can only view current day's alerts, how come? how can i view older alerts???

  • How to Hide the Seeded User views using personailization

    Hi , we have requirement in PO Buyer work center in R12 , Requisition search have seeded user views ,one of them is unassigned requisitions , i want to hide this view ,Please let me know is there any way . Thanks Maheswara Raju

  • Support for packages

    When would there be support for packages and viewing them? At the moment, double clicking the specification item against a package throws up a null pointer exception. Any idea on time scales? Many thanks