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

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.

  • 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,

  • Getting Error While accessing Accounts from oim

    Hi All,
    I am getting an exception while accessing user accounts from oim through the jdeveloper(I m giving UserId as input)
    Exception:
    avax.ejb.EJBAccessException: [EJB:010160]Security Violation: User: '<anonymous>' has insufficient permission to access EJB: type=<ejb>, application=oim#11.1.2.0.0, module=iam-ejb.jar, ejb=ProvisioningService, method=getAccountsProvisionedToUserx, methodInterface=Remote, signature={java.lang.String,java.lang.String}.
         at weblogic.ejb.container.internal.MethodDescriptor.checkMethodPermissionsBusiness(MethodDescriptor.java:581)
         at weblogic.ejb.container.internal.BaseRemoteObject.checkMethodPermissions(BaseRemoteObject.java:111)
         at weblogic.ejb.container.internal.BaseRemoteObject.preInvoke(BaseRemoteObject.java:274)
         at weblogic.ejb.container.internal.StatelessRemoteObject.__WL_preInvoke(StatelessRemoteObject.java:41)
         at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:24)
         at oracle.iam.provisioning.api.ProvisioningService_p7m7x_ProvisioningServiceRemoteImpl.getAccountsProvisionedToUserx(Unknown Source)
         at oracle.iam.provisioning.api.ProvisioningService_p7m7x_ProvisioningServiceRemoteImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:667)
         at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:522)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:518)
         at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
    Process exited with exit code 0.

    Which user are you using for creating connection with OIM ?
    Which method are you using to create connection with OIM ?
    Re: OIMClient login throwing AuthenticationException execption (FOR R2)

  • Error while accessing table from procedure but no error from anonymous plsq

    Hi All,
    I am getting a strange error while accessing a table from a different schema.
    In that concerned schema OWBSYS, i executed the following:
    grant Select on wb_rt_audit to ods;In Ods schema i executed:
    CREATE OR REPLACE SYNONYM wb_rt_audit FOR OWBSYS.wb_rt_audit;In ODS schema, when i execute:
    create or replace
    procedure pp_test as
    lv_owb_reject number := 0;
    lv_filename_1 varchar2(200):= 'asda';
    begin
        SELECT MAX(aud.rta_iid) into lv_owb_reject
                              FROM   wb_rt_audit aud
                              WHERE  aud.rta_lob_name LIKE Upper(lv_filename_1)
    end;
    /I get the error:
    Warning: execution completed with warning
    procedure Compiled.
    ORA-00942 - TABLE OR VIEW DOES NOT EXISTHowever, when i execute as an anonymous plsql the same code:
    declare
    lv_owb_reject number := 0;
    lv_filename_1 varchar2(200):= 'asda';
    begin
        SELECT MAX(aud.rta_iid) lv_owb_reject
                              FROM   wb_rt_audit aud
                              WHERE  aud.rta_lob_name LIKE Upper(lv_filename_1)
    end;
    anonymous block completedthere is no issue.
    Can someone help me understand what I might be missing:
    Edited by: Chaitanya on Feb 28, 2012 12:31 AM

    Check if have some other steps.
    SQL>conn scott1/tiger
    Connected.
    SQL>create table wb_rt_audit (rta_iid number);
    Table created.
    SQL>insert into wb_rt_audit values (100);
    1 row created.
    SQL>insert into wb_rt_audit values (200);
    1 row created.
    SQL>commit;
    Commit complete.
    SQL>grant select  on wb_rt_audit to scott2;
    Grant succeeded.
    SQL>conn scott2/tiger
    Connected.
    SQL>create synonym wb_rt_audit for scott1.wb_rt_audit;
    Synonym created.
    SQL>create or replace procedure pp_test as
        l_number number(10);
        begin
            SELECT MAX(rta_iid) into l_number
                                  FROM   wb_rt_audit;
      end pp_test;
    Procedure created.

  • Error code -17306 while accessing container from TestStand

    Hi,
    I am getting an error -17306 while accessing the TestStand container present in Station Globals using invoke node property object. Please find below the code snippet.
    Thanks,
    Neha

    Hi
    I am not sure too, how to obtain sequence context from TS application manager. However, did you try using the lookupstring as "StationGlobals.UUT1.Name" or as "FileGlobals.UUT1.Name"?
    I think, the reference to globals will include Station Globals and File Globals. so, you might have to be specific in the lookup string.
    the error says the name of the variable or property is not valid.
    also, you wired "0" which means do not create the variable if not found. is that what you wanted to configure?

  • B1WS - (401)Unauthorized Error while accessing Webservice from JAVA

    Hi,
    While accessing B1WS getting the following error.
    Please help us to resolve the error
    {http://xml.apache.org/axis/}HttpErrorCode:401
    (401)Unauthorized
        at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744)
        at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
        at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
    Here is the Code :
    public class Test {
    //     public static final java.lang.String _dst_MSSQL2008 = "dst_MSSQL2008";
         public static final LoginDatabaseType dst_MSSQL2008 = new LoginDatabaseType("dst_MSSQL2008");
         public static final LoginLanguage ln_English = new LoginLanguage("ln_English");
        public static void main(String[] arg) throws ServiceException, IOException
            LoginServiceSoapStub login = (LoginServiceSoapStub) new LoginServiceLocator().getLoginServiceSoap(new URL("http://10.10.5.115/sapb1web/WebReferences/LoginService.wsdl"));
        try {
            login.login("ESPL-LAP-048", "INDIAHEAD", dst_MSSQL2008,"manager", "12345", ln_English, "ESPL-LAP-048:30000");
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
            System.out.println("Error "+e.getMessage());
    Thanks
    Ravi Shankar

    Hi,
    Not sure this is right forum to post. You may try post in SDK forum to get quick response.
    Thanks & Regards,
    Nagarajan

  • Problems in authentication while accessing WSDL from  Sharepoint

    I am trying to access objects from a SharePoint on my company site, which requires Authentication and Authorization in order to access  the same. I have written a client and am trying to access the WSDL using Axis 1.0.
    I am  getting an authentication error whiletyring to access the same . The details are listed below.  Is there any workaround you may be knowing to get over this firewall problem, that they may be facing ?
    Exception in thread "main" AxisFault
    faultCode: {http://xml.apache.org/axis/}HTTP
    faultString: (401)Unauthorized
    faultActor: null
    faultDetail:
          null: return code:  401
    &lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot; &quot;http://www.w3.org/TR/html4/strict.dtd">
    &lt;HTML&gt;&lt;HEAD&gt;&lt;TITLE&gt;You are not authorized to view this page&lt;/TITLE&gt;
    &lt;META HTTP-EQUIV=&quot;Content-Type&quot; Content=&quot;text/html; charset=Windows-1252&quot;&gt;
    &lt;STYLE type=&quot;text/css&quot;&gt;
      BODY { font: 8pt/12pt verdana }
      H1 { font: 13pt/15pt verdana }
      H2 { font: 8pt/12pt verdana }
      A:link { color: red }
      A:visited { color: maroon }
    &lt;/STYLE&gt;
    &lt;/HEAD&gt;&lt;BODY&gt;&lt;TABLE width=500 border=0 cellspacing=10&gt;&lt;TR&gt;&lt;TD&gt;
    &lt;h1&gt;You are not authorized to view this page&lt;/h1&gt;
    You do not have permission to view this directory or page using the credentials that you supplied because your Web browser is sending a WWW-Authenticate header field that the Web server is not configured to accept.
    &lt;hr&gt;
    &lt;p&gt;Please try the following:&lt;/p&gt;
    &lt;ul&gt;
    &lt;li&gt;Contact the Web site administrator if you believe you should be able to view this directory or page.&lt;/li&gt;
    &lt;li&gt;Click the &lt;a href=&quot;javascript:location.reload()&quot;&gt;Refresh&lt;/a&gt; button to try again with different credentials.&lt;/li&gt;
    &lt;/ul&gt;
    &lt;h2&gt;HTTP Error 401.2 - Unauthorized: Access is denied due to server configuration.&lt;br&gt;Internet Information Services (IIS)&lt;/h2&gt;
    &lt;hr&gt;
    &lt;p&gt;Technical Information (for support personnel)&lt;/p&gt;
    &lt;ul&gt;
    &lt;li&gt;Go to &lt;a href=&quot;http://go.microsoft.com/fwlink/?linkid=8180">Microsoft Product Support Services&lt;/a&gt; and perform a title search for the words &lt;b&gt;HTTP&lt;/b&gt; and &lt;b&gt;401&lt;/b&gt;.&lt;/li&gt;
    &lt;li&gt;Open &lt;b&gt;IIS Help&lt;/b&gt;, which is accessible in IIS Manager (inetmgr),
    and search for topics titled &lt;b&gt;About Security&lt;/b&gt;, &lt;b&gt;Authentication&lt;/b&gt;, and &lt;b&gt;About Custom Error Messages&lt;/b&gt;.&lt;/li&gt;
    &lt;/ul&gt;
    &lt;/TD&gt;&lt;/TR&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;

    As a workaround I can start the application in debug mode, log into the Weblogic console and stop then restart the deployment and this issue goes away, sort of a pain but it does work.

  • Error while accessing WebServices from remote Server

    Hi Friends,
    I am trying to access webservice located on a remote server.But I am getting the following eror...
    stackTrace -*- java.lang.NullPointerException
         at org.apache.axis.message.MessageElement.addTextNode(MessageElement.java:1396)
         at org.apache.axis.message.SOAPHandler.addTextNode(SOAPHandler.java:148)
         at org.apache.axis.message.SOAPHandler.endElement(SOAPHandler.java:112)
         at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
         at weblogic.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:585)
         at weblogic.apache.xerces.impl.XMLNamespaceBinder.handleEndElement(XMLNamespaceBinder.java:898)
         at weblogic.apache.xerces.impl.XMLNamespaceBinder.endElement(XMLNamespaceBinder.java:644)
         at weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1008)
         at weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1469)
         at weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:329)
         at weblogic.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:525)
         at weblogic.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:581)
         at weblogic.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
         at weblogic.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1175)
         at weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogicXMLReader.java:135)
         at weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:138)
         at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
         at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
         at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:695)
         at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
         at org.apache.axis.wsa.WSAHandler.processClientResponse(WSAHandler.java:82)
         at org.apache.axis.wsa.WSAHandler.invoke(WSAHandler.java:41)
         at org.apache.axis.client.AxisClient.invokeTransport(AxisClient.java:154)
         at org.apache.axis.client.AxisClient.invoke(AxisClient.java:289)
         at org.apache.axis.client.Call.invokeEngine(Call.java:2838)
         at org.apache.axis.client.Call.invoke(Call.java:2824)
         at org.apache.axis.client.Call.invoke(Call.java:2501)
         at org.apache.axis.client.Call.invoke(Call.java:2424)
         at org.apache.axis.client.Call.invoke(Call.java:1835)
         at com.bofa.crme.ccs.proxy.PartyOrchestratorPortStub.login(PartyOrchestratorPortStub.java:1236)
         at com.bofa.pbes.cedrelay.Utils.loginPartyOrchService(Utils.java:251)
         at com.bofa.pbes.cedrelay.Utils.loginCMWService(Utils.java:212)
         at com.bofa.pbes.cedrelay.RelayServlet.init(RelayServlet.java:59)
         at weblogic.servlet.internal.ServletStubImpl$ServletInitAction.run(ServletStubImpl.java:993)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
         at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:869)
         at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:848)
         at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:787)
         at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:518)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:362)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    Please give your guidance...
    Thanks and Regards...

    Hi Friends,
    I solved it.It was because of old jar files.Then I replaced it and every thing started working fine.
    Thanks and Regards..

  • Error while accessing data from MS Access DB through Window AD architec

    Dear Members,
    Iam having a BO 3.0 installation on a standalone PC with the basic tomcat and mysql setup... As a test environment, Now while designing universes i can easily connect to Oracle EBS structure also SQL server DB ... the problem is when iam linking to a MS Access DB through a network drive (its all ok in the designer) but while in Webi while runnning the query, it throws an error of (WIS 10901 .... database error DSN not specified)
    I have configured ODBC properly also given appropriate rights for the users and strangely the same universe is running well with my thick client desktop and webi rich client
    (so iam sure its not a odbc issue)
    Looking forward for any comments on this problem

    possibly the account running the webi report server doesn't have access to the drive. Is it local system? Try using the same account you are logged into the webi rich client as, but you will most likely need to grant that account local admin on the server so it can run the service.
    Regards,
    Tim

  • Error while accessing Livecache from LC10

    We had a problem on our APO system that dialog work processes are hanging on the central instance showing semaphores 26 (enqueue table) and 43 (rspo cache).
    The dwstat logfile indicates that the enqueue process is running (with the longest processing time of all processes), while the spool process is stuck with semaphere 26 on "global actions".
    The problem is mostly likely caused by a bug in SAP and two recent SAP notes were found that describe the situation: note 1293472 and note 661487.
    The first one states to update the kernel and set rspo/event_update_nocsec = 1, the second one to add an entry to the table TSPOPTIONS.
    now we are upgrading the SAP Kernel to Patch Level 221 that was released on Aug 28.
    kernel release                700 - 64 BIT - Non-Unicode
    But after upgrading the kernel to the patch 221 we are not able to access livecache through LC10, LC10 hangs for a while and then fails with a RFC error
    Name and Server : LS5 u2013 plsapas500
    DBMRFC Function : DBM_CONNECT
    Error: Communication Error
    Error Message: Error when opening a RFC connection
    further we found that the RFC connection SAPDB_DBM_DAEMO is not registered for program dbmrfc@sapdb.
    tried to register it but no success....
    this problem was not faced with old Kernel havin patch 185
    kindly suggest
    thanks & regards,
    Deepak

    hello,
    Can you check the connection test in db59 and check the detailed log.
    check this if helpful:   Re: LC10: system error
    thanks,
    Prasanna Kulkarni

  • NullPointerException when accessing EntityManagerFactory from within EJB

    Hello everyone,
    I am having trouble getting an EJB to work properly with persistence. Here is the code for my EJB:
    package HelpDesk.ejb;
    import javax.ejb.Stateless;
    import HelpDesk.entity.Tecnico;
    import javax.persistence.*;
    import javax.persistence.EntityManagerFactory;
    @Stateless
    public class HelpDeskManager implements HelpDeskManagerInterface {
       @PersistenceUnit(unitName="HelpDeskPU")
       EntityManagerFactory emf;
      public void newTecnico(String nombre, String username, String privilegio, String password)
          javax.persistence.EntityManager em = emf.createEntityManager();
          Tecnico tec = new HelpDesk.entity.Tecnico(nombre, username, privilegio, password);
          em.persist(tec);     
    }The error happens on the line: javax.persistence.EntityManager em = emf.createEntityManager();
    This method is then called from a servlet which has the following code on its doGet() method:
          response.setContentType("text/html;charset=UTF-8");
            PrintWriter out = response.getWriter();
            try {
                HelpDesk.ejb.HelpDeskManager hdm = new HelpDesk.ejb.HelpDeskManager();
                hdm.newTecnico(request.getParameter("nombre"), request.getParameter("username"), request.getParameter("privilegio"), request.getParameter("password"));
                out.println("Técnico creado exitosamente.");
                response.sendRedirect("index.jsp");
            catch(Exception ex){out.println(ex.getMessage());}
            finally {
                out.close();
            }Using this try statement simply causes the word "null" to be output to the browser. Without the try statement, I get the NullPointerException on the app server logs. I am using Netbeans 6.5/ Glassfish v2. I can guarantee that the Persistence Unit is correctly configured and that a connection pool has been defined in Glasfish for this database, as well as a JNDI name for it, though I do not know if it's necessary to register the EJB as a JNDI name as well.
    Any advice will be truly appreciated, as I am rather new to EJB technology. Thank you.

    Hello again, thanks for your quick reply,
    I tried it out the way you suggested, but I now get the following error displayed on my browser:
    type Exception report
    message
    descriptionThe server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: PWC1391: Servlet.init() for servlet newTecnico threw exception
    root cause
    java.lang.RuntimeException: WEB5002: Exception in handleBeforeEvent.
    root cause
    com.sun.enterprise.InjectionException: Exception attempting to inject Unresolved Ejb-Ref help_desk.servlet.newTecnico/hdm@jndi: HelpDesk.ejb.HelpDeskManager@[email protected]@Session@null into class help_desk.servlet.newTecnico
    root cause
    javax.naming.NameNotFoundException: HelpDesk.ejb.HelpDeskManager#HelpDesk.ejb.HelpDeskManager not foundI believe it is because I need to define the EJB as a JNDI resource. However, I am unsure how to go about this. When I try to do create a new JNDI resource via the Glassfish Admin Console, it asks for several fields, including Resource Type and Resource Factory. I think Resource Type can be the fully qualified class name, but my EJB doesn't have any factory classes associated with it.
    Thanks again for the information. your help is greatly appreciated!

  • 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

  • Problem While Loading mp3 From Jar File?

    Hello There
    I've Made a jar File That Contains mp3 file That Should be Played When the jar is opened
    but the file doesn't play?
    and my code snippet to load from the jar
    URL url=getClass().getResource("/file.mp3");
    MediaLocator ml=new MediaLocator(url);
    final Player player = Manager.createRealizedPlayer(url);
    I don't Know where's The Error
    Could any one Help?

    First_knight wrote:
    Hello
    -Yes I Use NetBeans 6.1 To create The Jar With The Following Steps:
    First I've Add The Sound File To a Package In NetBeans 6.1
    And Then Called The Sound From The Package And The Program Runs Okay Then I Made The jar
    and after making the jar now i have to call the sound file from the jar by the code mentioned above
    i used it and run the program it run okay but when i try to open the jar i hear no sound????????????
    I Don't know whyyyyyyyyy This seems to indicate that your app is finding the mp3 file. You would probably get a null pointer exception if the file wasn't found. Something else seems to be going on.
    -How are you launching the jar outside of NetBeans?...By Double Click On It
    I suggest trying to launch the jar using the command promptjava   -cp   YourJarFile.jar  YourMainClassAnd if that works, try java   -jar   YourJarFile.jarAnd if that works, your computer's file association is not set up correctly.

  • Images not loading while accessing portal from internet

    Hi all
      we are trying to publish the portal on internet. We have used  apache as reverse proxy  and it is in dmz .
    When we access the portal from internet we are getting the  login page  but it is with out images (e.g branding imag etc).
    we also could login  in the portal but we only see  the links for  Help  Personalize  Log off  , Histrory Back  and Forward  remaining page is blank.
    Is this reverse proxy configuration issue?
    Can any body help us in resolving this issue. 
    Regards
    Rajendra.

    Hi Rajendra/Experts,
    We are currently working on custom webdynpro application which needs to be exposed to Internet using Apache HTTP Server.
    We can able to access URL, but no images are getting displayed and also the application not functioning when we click any button/links.
    Below is HTTPD file configuration
    ProxyPass /esampleApp http://hostname:port/webdynpro/dispatcher/local/esampUI/ESamplingApp
    ProxyPassReverse /esampleApp  http://hostname:port/webdynpro/dispatcher/local/esampUI/ESamplingApp
    when we look in to images URL which is being called from Apache we  found out "webdynpro" is missing in the URL.
    Actual URL in Portal Server: (working)
    http://portalhostname:port/webdynpro/resources/local/esampUI/Components/esampling.ui.ESamplingComp/logo.gif
    Apache URL:
    http://Apachehostname:port/resources/local/esampUI/Components/esampling.ui.ESamplingComp/logo.gif
    Please suggest.
    Thanks
    Aravind

Maybe you are looking for