Issues while trying to create JNDI Context in Glassfish

I believe I have searched this all across google but I didn't find a satisfactory answer so posting here to ask the question.
* Create a JNDI API InitialContext object if none exists
* yet.
try {
jndiContext = new InitialContext();
} catch (NamingException e) {
System.out.println("Could1 not create JNDI API " +
"context: " + e.toString());
e.printStackTrace();
System.exit(1);
} catch (Exception e) {
System.out.println("Exception. Could not create JNDI API " +
"context: " + e.toString());
e.printStackTrace();
System.exit(1);
System.out.println("JNDI Created");
Above is the code that is throwing exceptions
Could1 not create JNDI API context: javax.naming.NoInitialContextException: Cann
ot instantiate class: com.sun.enterprise.naming.impl.SerialInitContextFactory [R
oot exception is java.lang.NullPointerException]
javax.naming.NoInitialContextException: Cannot instantiate class: com.sun.enterp
rise.naming.impl.SerialInitContextFactory [Root exception is java.lang.NullPointerException]
     at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
     at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
     at javax.naming.InitialContext.init(Unknown Source)
     at javax.naming.InitialContext.<init>(Unknown Source)
     at examples.simple.SimpleQueueSender.main(SimpleQueueSender.java:93)
Caused by: java.lang.NullPointerException
     at com.sun.enterprise.module.single.ManifestProxy.<init>(ManifestProxy.java:75)
     at com.sun.enterprise.module.single.ProxyModuleDefinition.<init>(ProxyModuleDef
inition.java:78)
     at com.sun.enterprise.module.single.ProxyModuleDefinition.<init>(ProxyModuleDef
inition.java:73)
     at com.sun.enterprise.module.single.SingleModulesRegistry.<init>(SingleModulesR
egistry.java:79)
     at com.sun.enterprise.module.single.SingleModulesRegistry.<init>(SingleModulesR
egistry.java:67)
     at com.sun.enterprise.module.single.StaticModulesRegistry.<init>(StaticModulesR
egistry.java:66)
     at org.glassfish.internal.api.Globals.getStaticHabitat(Globals.java:84)
     at com.sun.enterprise.naming.impl.SerialInitContextFactory.<init>(SerialInitCon
textFactory.java:236)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
     at java.lang.reflect.Constructor.newInstance(Unknown Source)
     at java.lang.Class.newInstance0(Unknown Source)
     at java.lang.Class.newInstance(Unknown Source)
     ... 5 more
Earlier while researching a previous issue, ManifestProxy was earlier not able to find "findResouces" method so with older versions of jar it was giving a different issue. I checked the latest version, not sure how the change in code could have resolved the issue. Seems earlier the error was NoMethodFoundException and now that has been caught and now it is throwing NullPointerException.
Did any of you face this issue and can help? I have all the classes from GLASSFISH_HOME/lib and GLASSFISH_HOME/module in my classpath.

If you are running that code outside the container then you need to provide properties for the context factory with
  Properties props = new Properties();
  props.setProperty("java.naming.factory.initial","com.sun.enterprise.naming.SerialInitContextFactory");
  props.setProperty("java.naming.factory.url.pkgs","com.sun.enterprise.naming");
  props.setProperty("java.naming.factory.state","com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl");
  // optional   
props.setProperty("org.omg.CORBA.ORBInitialHost", "localhost");
props.setProperty("org.omg.CORBA.ORBInitialPort", "3700");
jndiContext  = new InitialContext(props);and make sure the appserv-rt.jar is on the classpath (by including it's path and name rather than by copying it to somewhere).

Similar Messages

  • Issue while trying to create Sales Order from Inbound Idoc ORDER05

    Hi All,
    I am trying to create a sales order through an Inbound idoc ORDERS05 created out of a Purchase order. The header pricing conditions from the Purchase orders gets populated in E1EDK05 segment and this needs to go to the Sales order header conditions while trying to create the Sales order.
    But when the fields are getting incorrectly mapped to the Sales order. Issue  being, the segment E1EDK05-BETRG contains the condition value. But this fields gets populated to the KOMV-KWERT (condition value) screen field on the Sales order header conditions. But this should have got mapped to field KOMV-KBETR (Rate). If I look at the Purchase order, E1EDK05-BETRG is the field getting fetched from field KOMV-KBETR on the Purchase order. So this should have correspondingly got mapped to KOMV-KBETR on the Sales order as well.
    This looks like a standard behavior. But if any of you have encountered this issue before please let me know if any Correction instructions are available for the same. If this some issue in Pricing conditions configuration, do let me know.

    Hi Paaavan
    You can set a break-point include "FV45PFAP_VBAP_BEARBEITEN_VORBE" that is called by both the SAP Standard and BAPI where the data is prepared and checked in the internal table XVBAP. Compare both SAP standard VA01 and your 'Z' program for what may be different in XVBAP.
    I think the problem my be with regards to the business_object number that is hardcoded in the standard function module. It has given me issues before and hence I tend to use the function module  SD_SALESDOCUMENT_CREATE to create sales documents with.
    Regards,
    Marius

  • Strange Database issues while trying to create new user through EM...

    I'm attempting to configure my local Oracle 11g database in order to create a Content Server user in order to setup a Fatwire installation. I'm getting some strange issues with my database that I was hoping maybe someone could help me out with.
    The guide I'm following starts with this:
    +1. Determine the Console Server port:+
    a. Open the emoms.properties file in a text editor. The file is located in:
    +<ora_home>/<servername>_<SID>/sysman/config/+
    b. Find the line,
    oracle.sysman.emSDK.svlt.ConsoleServerPort
    and make a record of the port number value at the end of the line.
    When I open the emoms.properties file in Notepad++, I'm unable to read the contents - it's all symbols/jibberish.
    The next step says this:
    +2. Log in to the Oracle Enterprise Manager console:+
    a. Execute the following command: emctl status dbconsole
    When I execute that command I get the following error:
    Environment variable ORACLE_UNQNAME not defined. Please set ORACLE_UNQNAME to database unique name.
    The third step says this:
    Open a browser and go to the URL highlighted in bold in step a above. If you see
    a “Security Mismatch” error, ignore it (the error appears if you are using a selfsigned
    certificate).
    I skipped to this step because I'm assuming the link it wants me to go to is my EM console (https://localhost:1158/em/console/aboutApplication), however when I browse to that URL I get the following error:
    503 Service Unavailable
    Service is not initialized correctly. Verify that the repository connection information provided is correct.
    Clearly, something isn't right here. What's going on? Any help would be appreciated.

    Alfonso Vicente wrote:
    Did you try what I suggested?Yes, thanks for the advice. Now I'm having some additional issues. When I run emctl status dbconsole I get the following error:
    OC4J Configuration issue. C:\app\john.smith\product\11.2.0\dbhome_1/oc4j/j2ee/OC4
    J_DBConsole_ORCL-SMITH.company.com_localhost_orcl not found.
    This is appearing after I made the appropriate changes to the emoms.properties file and set ORCL_UNQNAME to "localhost_orcl" <-- is that correct? the path to my emoms.properties is:
    C:\app\john.smith\product\11.2.0\dbhome_1\localhost_orcl\sysman\config
    Here is my emoms.properties file, does this look right?
    #Mon Mar 19 17:56:05 EDT 2012
    oracle.sysman.emSDK.svlt.ConsoleServerName=localhost\:1158_Management_Service
    oracle.sysman.eml.mntr.emdRepPwd=2ad171ddf6ce91aebf1c2f2c371ee5a315591a1be21f37965a88d54126d7528aa1091f543569e58b
    emdrep.ping.pingCommand=/bin/ping -c 3 -w 30 <hostname>
    em_oob_shutdown=false
    LargeRepository=false
    oracle.sysman.eml.mntr.emdRepPort=1521
    em_email_address=
    oracle.sysman.eml.mntr.emdRepPwdSeed=8622625238442107993
    em_oob_crash=false
    em.oms.dumpModules=omsThread,repos
    oracle.sysman.emRep.dbConn.statementCacheSize=50
    oracle.sysman.db.isqlplusUrl=%ISQLPLUS_PROTOCOL%\://%ISQLPLUS_HOST%\:%ISQLPLUS_PORT%/isqlplus/dynamic
    em_oob_startup=false
    oracle.sysman.emSDK.svlt.ConsoleServerPort=4889
    em_from_email_address=_NOT_AVAILABLE_
    oracle.sysman.eml.mntr.emdRepPwdEncrypted=TRUE
    oracle.sysman.db.isqlplusWebDBAUrl=%ISQLPLUS_PROTOCOL%\://%ISQLPLUS_HOST%\:%ISQLPLUS_PORT%/isqlplus/dba/dynamic
    oracle.sysman.emSDK.svlt.ConsoleServerHost=localhost
    em_from_email_name=_NOT_AVAILABLE_
    oracle.sysman.emSDK.svlt.ConsoleServerHTTPSPort=1159
    em_email_gateway=
    oracle.sysman.eml.mntr.emdRepServer=localhost
    oracle.sysman.eml.mntr.emdRepSID=NO_VALUE
    oracle.sysman.eml.mntr.emdRepConnectDescriptor=(DESCRIPTION\=(ADDRESS_LIST\=(ADDRESS\=(PROTOCOL\=TCP)(HOST\=localhost)(PORT\=1521)))(CONNECT_DATA\=(SERVICE_NAME\=orcl)))
    oracle.sysman.emkeyfile=C:\app\john.smith\product\11.2.0\dbhome_1\localhost_orcl\sysman\config\emkey.ora
    em.ip.ui.enable=true
    oracle.sysman.eml.mntr.emdRepUser=sysman
    oracle.sysman.emSDK.svlt.PublicServletEnabled=true

  • Issue while trying to create a Client Proxy

    Hello,
    I am new to this field of using web services, so maybe i am missing something here. I need to consume a webservice in ABAP. So these are the steps that I performing
    1. Goto Se80 and select Enterprise Services and select Client proxy ->Create
    2. Select radiobutton for Local file (I have the WSDL file saved on my desktop) Entered the path of the local file.
    3. Requested it to be saved as a local object witha prefix as ZFR_
    4 Click on Complete on the wizard.
    I get an error on this Exception occured in library handler.
    Exception occured in communication framework. Error in file upload.
    Am I missing something. Do I have to configure anything before I can create a Client proxy. I need to use as it creates a class and that needs to be invoked in the ABAP program.
    Please suggest.
    Thanks and Regards
    Sachin

    Follow the following steps.
    Go To SE80
    then select Package name in which u are suppose to work
    then Right click on Enterprise service
    then right click on Client Proxies and then create
    You have local WSDL file so select local file selection
    then select file from local file with browse
    then select package name and give prefix name
    then save and activate it. ( note down abap name ).
    Regards,
    Chintan Contractor

  • Keep getting an error message that reads, "LR An error has occurred while creating the book on Blurb" An error has occurred while trying to create texts and fonts.  Pleas advise as Blurb has said that it's a LR issue.

    Keep getting an error message that reads, "LR An error has occurred while creating the book on Blurb" An error has occurred while trying to create texts and fonts.  Pleas advise as Blurb has said that it's a LR issue.

    Are you behind a firewall or double NAT??
    What is the device that is immediately plugged into the main modem or router? Has that one been able to update?
    It is plugged in of course isn't it.. no nasty join wireless anywhere??
    The best way to work around these sort of problems is to simplify the network.. Plug each device directly into the main router.. by ethernet. You can trigger the firmware upgrade by wireless but use ipad or iphone version of airport utility and see what happens.

  • Bar Code entry while trying to create one through FB03

    Hi Guru
    We recently had techical upgrade to ECC6.0. While trying to create a barcode entry for a document through FB03 I am getting the following error message
    oa280 - Bar code not active -system administration .
    All the configuration are in place in OAC5,OBD2 . I couldnt able to find any relevant notes regarding to this issue . Can some one help me out in fixing this issue
    Thanks
    Auroar

    Hi
    I raised the question to SAP and they provided me the notes 173521 as suggested by  you . But  following this note will open bar code entry access for all user and for all accounting document which will be an issue .  After few trial and error I was able to get an solution for this issue .  I created an entry in oac5  with barcode active  for object type and user specified and an another entry with barcode inactive for object type ,document type FIIInvoice and user .  This enabled only the authorized user for bar code entry to make changes . One drawback is that it does allow permitted user for all document type
    Thanks all for your suggestion
    Regards
    auroar

  • ORA-01422: while trying to create a job

    Hi all,
    WE need a help from you, group of experts
    we are getting the following error
    ORA-01422: exact fetch returns more than requested number of rows
    ORA-06512: at "SYS.DBMS_ISCHED", while trying to create a job using the following code
    BEGIN
    DBMS_SCHEDULER.create_program
    (program_name => 'FAILURE_MONITOR_PRG',
    program_action => 'JOB_MGR.SPR_FAILURE_MONITOR',
    program_type => 'STORED_PROCEDURE',
    number_of_arguments => 1,
    enabled => FALSE
    DBMS_SCHEDULER.define_metadata_argument
    (program_name => 'FAILURE_MONITOR_PRG',
    argument_position => 1,
    metadata_attribute => 'EVENT_MESSAGE'
    DBMS_SCHEDULER.create_job
    (job_name => 'FAILURE_MONITOR_JOB',
    program_name => 'FAILURE_MONITOR_PRG',
    enabled => TRUE,
    auto_drop => FALSE,
    start_date => SYSDATE,
    event_condition => 'tab.user_data.event = ''FAILED''',
    queue_spec => 'event_queue'
    END;
    Oracle allows us to create the job if the parameter values for enabled is "false" in the DBMS_SCHEDULER.create_job call. But we got the same error
    when tried to enable the job using exec DBMS_SCHEDULER.ENABLE ('FAILURE_MONITOR_JOB');
    ORA-01422: exact fetch returns more than requested number of rows
    ORA-06512: at "SYS.DBMS_ISCHED", line 2751
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 1794
    ORA-06512: at line 1
    Please help us to solve this issue
    Thanks,
    Reghu
    null

    Hi Ravi,
    Thank you for your kind support
    That issue has been solved. Problem was with the event queue and only for that particular job i mentioned in the first post (I was able to create other jobs with different Events using the same queue) . After recreating the event queue i am able to create the same job. I got the same error when I tired to drop the queue, and then I dropped the queue table itself. Do you have any idea about what might had caused the issue?
    Thanks
    Reghu

  • Error while trying to create tree using same EMP how to tutorial

    Hi,
    I get the following error while trying to create a sample tree similar to the one
    posted in the how-tos web page.
    The final query that creates the tree is also as follows
    The Current Query shown in my apex window and the one on the howtos tutorial is as follows
    select "EMPNO" id,
    "MGR" pid,
    "ENAME" name,
    null link,
    null a1,
    null a2
    from "RJOSEEMPCLUB"."EMP"
    where DEPTNO = 1
    The error is as follows
    ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    Debug:
    1: begin
    2: wwv_flow_wiz_confirm.create_tree (
    3: p_flow_id => :FB_FLOW_ID,
    4: p_region_template => replace(:F4000_P112_REGION_TEMPLATE,'%'||'null%',null),
    5: p_start_option => :F4000_P112_START_OPTION,
    6: p_owner => :F4000_P112_OWNER,
    7: p_table_name => :F4000_P112_TABLE,
    8: p_id => :F4000_P112_ID,
    9: p_pid => :F4000_P112_PID,
    10: p_name => :F4000_P112_NAME,
    11: p_link_option => :F4000_P112_LINK_OPTION,
    12: p_link_page_id => :F4000_P112_LINK_PAGE_ID,
    13: p_link_item => :F4000_P112_LINK_ITEM,
    14: p_where => :F4000_P112_WHERE,
    15: p_order_by => :F4000_P112_ORDER_BY,
    16: p_page_id => :F4000_P112_PAGE_ID,
    17: p_page_name => :F4000_P112_PAGE_NAME,
    18: p_tab_set => :F4000_P112_TAB_SET,
    19: p_tab_text => :F4000_P112_TAB_TEXT,
    20: p_region_name => :F4000_P112_REGION_NAME,
    21: p_tree_name => :F4000_P112_TREE_NAME,
    22: p_tree_type => :F4000_P112_TREE_TYPE,
    23: p_max_levels => :F4000_P112_MAX_LEVELS);
    24: end;

    Hi Kart,
    If you have the sample EMP table, the DEPTNO values are 10, 20 or 30.
    Did you specify a root value for the tree?
    Regards
    Andy

  • Application hangs while trying to create a socket

    Hello,
    We have a third party application that makes HTTP connections using a old version of HTTPClient. Recently we have run into problems where the application hangs as one thread seems to hang while trying to create a socket (thread dumps show the hang occurs in native code) and other threads end up waiting for this thread as they need to obtain a lock on HTTPClient.HTTPConnection. We found out that HTTPClient was not setting a timeout on the underlying socket (SO_TIMEOUT) and the relevant patch has been implemented in the hope that if the condition arises again the offending thread will be timed out and allow other threads to try and continue.
    We will not be able to see if the patch works until Monday and I would like to understand the problem a little better if it fails. My question at what point will the socket timeout starting ticking? As our offending thread is waiting in native code is there a chance that the timeout will not be "active".
    Also can anyone provide reasons for an application hanging while trying to create a socket and any suggestions for monitoring or mitigating this problem?
    Thanks a lot.
    Sun Solaris 5.8
    JDK 1.4.1 b02

    It looks like our version of the JDK offer a connect method with a timeout value, I think this will do the trick.

  • Error while trying to create a new company

    Hey All
    I found an error while trying to create a new company.
    the Error like - No matching Records Found - [ODBC -2028]
    This can generate only database but not any tables in that database.
    Please help me.
    Thanking you
    Hepil Doshi

    Hello,
    I would prefer local language instead of US english.....
    My tips.
    1. DID you tried to Not apply the UDO/UDF things?
    2. Do not log in to the database, start from
    3. Please post the error message itself....
    4. If you are running on MS SQL 2005 server (not express) , You can start SQL profiler, and monitor the New Database creation.... you will see in profielr where is the error message and which tables / data is missing.
    If i know well,
    When you create a new company, the SBO-COMMON database is used to deploy the new database....
    If you get stock, reinstall your sbo-common from the last applyied patch..... (Detach SBO-common, move the files another directory, and start upgarder.exe).
    Regards,
    J.

  • Getting error while trying to create the push certificate...

    I am getting the following error while trying to create a push certificate for the mdm from the apple site.
    Certificate Signature Verification failed because the signature  is invalid.
    I am mdm vendor as well as the customer. I did the following steps.
    openssl x509 -inform der -in mdm_identity.cer -out mdm.pem
    openssl x509 -inform der -in AppleWWDRCA.cer -out intermediate.pem
    openssl x509 -inform der -in AppleIncRootCertificate.cer -out root.pem
    openssl req -inform pem -outform der -in customer.csr -out customer.der
    created the plist_encoded file using a java program which uses the "SHA1WthRSA"
    When i tried to upload the plist_encoded file to the apple site (https://identity.apple.com/pushcert/), it creates a file with the following error
    {"ErrorCode":-80018,"ErrorMessage":"Certificate Signature Verification failed","ErrorDescription":"Certificate Signature Verification failed because the <a href=\"http://www.apple.com/business/mdm\" target=\"_blank\">signature<\/a> is invalid."}
    Any help would be greatly appreciated....

    Please see the solution in (The Descriptive Flexfield With Application Name Receivables (AR) and Name Party Site Information (HZ_PARTY_SITES) Is Not Frozen [ID 743262.1]).
    Thanks,
    Hussein

  • Facing issue while trying to disable automatic discovery of devices through Apple Bonjour

    Hi All,
    I am facing issue while trying to disable automatic discovery of devices through Apple Bonjour.
    Background: Whenever our application is in running state, devices are automatically discovered if it connects to PC. We are using Apple Bonjour's auto discovery technology( mdnsresponder ).
    We are registering a particular service type by using DNS API "DNSServiceRegister". Service type is getting registered properly and we are able to discovered that particular type of device.
    Platform:  Windows 7.0 / MAC 10.8
    Issue:
    But we are facing issue while trying to disable auto discovery of a device programmatically. i.e, unregistered a service reference programmatically from our windows application.
    To unregistered a service we are using "DNSServiceRefDeallocate" DNS API. But looks like it is not working properly.
    Is this DNS API “DNSServiceRefDeallocate” is correct one to unregistered the service?
    Here is the step by step procedure that we are following to de-allocate a service reference:
    1.Browsing / Query a service by using service type to get service reference (DNSServiceRef). 
    2.Get reference socket FD by using DNS API "DNSServiceRefSockFD".  
    3.Select a socket by using "select" API.
    4.Close the socket that we got from step 2 by closesocket().
    5.Delete the service reference by using DNS API "DNSServiceRefDeallocate" and service reference from step 1.
    Are we missing any step to unregistered a service? 
    Regards,
    Goutam

    Original problem I noticed was that regular websites I go to (such as msn) were only partially downloading.  I could see the text on the site but no pictures or videos.  All web surfing was extremely slow.  When I would go to a site such as man I would see another address in the lower left corner for "ads1.msads.net" or "cdn.optimizely.com" that is was trying to connect to. I tried using all three of my browsers (firefox, safari, chrome) and got the same response on all browsers.  After I spent some time researching the issue I decided I probably had a adware/malware problem so I decided to try adwaremedic.com.  I could also not access that site along with thesafemac.com or apple.com.  I was also getting the same response on my other devices (iPhone, iPad, and a mac air).  I could not access any of these sites on any of my devices although I could get to almost any other site although it was very slow.  At that point I decided to unplug the router.  I also did a number of other things before then to try and manually get rid of any adware.  Eventually I got msn back working, apple.com, and the speed was much faster.  But, I still can not access adwaremedic and thesafemac.com.  I could access these on my phone with 3G but not on my wifi.  This is where the problem still stands.  I am sure I still have some adware on my computer and need to find a way to remove it.  I am no techie so the complicated manual fixes are difficult for me to do.

  • HT201289 Aperture keeps 3.6 on Yosemite keeps going "non responsive" while trying to create a new vault or back up to an existing vault. Any help would be great.

    Aperture keeps 3.6 on Yosemite keeps going "non responsive" while trying to create a new vault or back up to an existing vault.
    Any help would be great.

    Where is your vault stored? Is it on a drive with the correct formatting - MacOS Extended (Journaled)?

  • TS3297 the 'none' payment option is not displayed in the preferred payment method while trying to create an apple id?

    While trying to create a new apple ID, I do not see the option of 'NONE' payment.  Only the VISA and MASTERCARD options are displayed.  What is the reason?

    Welcome to the Apple Support Communities, Joseph
    http://support.apple.com/kb/ht2534

  • Getting an exception while trying to create a territory

    Hi All,
    I got a dump while trying to create a territory using tcode crmm_terrman. The dump was in program CRM_TERRMAN_READ_EMP_OF_POS saying NO_ACTIVE_PLVAR Found Exception. Request you all to please guide me in finding the reason behind this dump.
    Regards
    Mandeep

    Hi All,
    The dump was coming because there were empty postitions created in the org structure.
    Regards
    Mandeep

Maybe you are looking for

  • Error message on application updater itself

    Friends: I keep getting an error message when I use the applications updater.  The error is on the extension updater (CS6) itself. Adobe Extension Manager CS6 Update Installation failed.   Error Code: U44M1P7 Thoughts? DrWoodhall

  • Find my friends notify me button couldn't be clicked?

    Ok so me and my girlfriend have the iPhone 5 so obviously everything is up to date on ios6. I set up find my friends on both our phones at the same time in the same way She can find me and when she clicks on me she can use notify me without any probl

  • Strange view with iOS 8 devices

    Hi there, with our iOS 8 devices the SharePoint 2010 delivers a stange view. The content stays the same, but the horizontal and vertical navigation look strange. Some items in the horizontal navigation cannot be clicked. Look at this screenshot. On t

  • XL Reporter Amount not Showing same value in JDT1

    Dear Expert, The client currently have a report in Balance Sheet XL Report but the amount shown is not the same as the amount in SAP Account Balance. Example: Per JDT1  (based on the query generator)                       Summary of Debits = 12,450,2

  • How to reset the router?

    I tryed to secure the router with the easy-link program and i want to reset the whole thing.Also if anyone know how to reset the netowrk setup from the control panel that would be great too.