Run time error while running Session Bean sample

Hi,
I am new to EJB. When I try to run one sample session bean, I am getting following exeception.
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
     at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
     at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:255)
     at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:292)
     at javax.naming.InitialContext.lookup(InitialContext.java:359)
     at RunEJB.main(RunEJB.java:31)
Exception in thread "main"
This exception is thrown by client project. naming.jar file is already include in the class for Client project as well.
I am testing this sample on WSAD.
The code on the client is as follows.
          Context initial = new InitialContext();
          Context myEnv = (Context)initial.lookup("java:comp/env");
          Object objref = myEnv.lookup("ejb/MyTestBeanHome");
          MyTestBeanHome home =
            (MyTestBeanHome) PortableRemoteObject.narrow(objref, MyTestBeanHome.class);
          MyTestBean firstBean = home.create(); 
          firstBean.testMessage();
          firstBean.remove();

Hi Vikas,
The fact that this client is coded to use java:comp/env means it's a J2EE Application Client component. Application Clients are full-fledged J2EE components that run within an Application Client container. You'll need to consult the documentation for your J2EE implementation to see how to invoke its Application Client container.
--ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • Run time error while running BDC for production order creation and confirmation:

    Dear Gurus,
    We have a situation, where the users are trying to do the entries creation of order or confirmation (through manual and BDC). But, if there is any kind of a deficit quantities in consumption or GR quantity, then it is going to run time error and Dumps are coming in program SAPLCORB
    and the transaction code is coming for CO11N.
    How to avoid this error to run the production system in smoothing way...Any flash lights on this will be great full
    Regards,
    Madhu.G

    Hi Madhu,
    Expert Caetano has rightly point out. Refer Note 1840705 - RAISE_EXCEPTION short dump if running CO11N in background
    Cause
    The short dump is triggered because SAP transaction CO11N contains new GUI elements that cannot always be dealt with in a background process,
    such as the confirmation texts.
    Resolution
    SAP recommends that the standard production order BAPIs, such as BAPI_PRODORDCONF_CREATE_TT, should be used to post a confirmation in background.
    If this is not feasible, the following workaround may be uses:
    Define a confirmation profile in transaction OPK0; 
    In the detail areas, remove the area "Confirmation text"; 
    Set this profile as standard, so that it is chosen automatically by the system when a batch-job
    is started; 
    Assign this confirmation profile to the batch user with transaction SU3 using parameter CORUPROF.
    Also see Note 429432 - CO11N: Batch input in background dumps if long text is maintained
    Refer to note 1154692 - Endless loop during confirmation in background if you doing Auto GR during confirmations
    Thanks & Regards,
    Ramagiri

  • Run time error while running a webdynpro - urgent

    Hi Guys
    I am getting the following error while running the webdynpro.
    My Default view is a INPUT_VIEW.
    please see below runtime error
    Regards,
    Rahul
    ===========================================================
    The following error text was processed in the system NSP : The lead selection has not been set. INPUT_VIEW
    The error occurred on the application server BomwSAPk210_NSP_00 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: RAISEELEMENT_NOT_FOUND of program CL_WDR_CONTEXT_NODE===========CP
    Method: PATH_TABLE_GET_ELEMENT2 of program CL_WDR_CONTEXT_NODE===========CP
    Method: GET_BOUND_ELEMENT of program CL_WDR_VIEW_ELEMENT_ADAPTER===CP

    Hi Rahul,
    The error appears when a UI element is bound to a context node or attribute on a node , where this node is defined as : cardinality 0..n or 0..1.
    The framework will not create a default empty element in this case.
    When the view is to be rendered, its source content doesnt exist. AS the node
    has no elements. rendering fails.... Now in your case check for the cardinality. You can try with different cardinalities as per your requirements.
    Check also the initialization lead selection property:
    For cardinality: 0..n, selection: 0..1, initialization lead selection: false
    and for cardinality: 1..n or 1..1, selection: 0..1, initialization lead selection: true
    Best regards,
    Suresh

  • Run-time Error while running Webutil

    I have the following version of Forms Developer Forms [32 Bit] Version 9.0.4.0.19 and I have installed Webutil 1.0.5 package.
    While running the forms I am getting the following error...
    Exception occurred during event dispatching:
    java.lang.ExceptionInInitializerError: java.security.AccessControlException: access denied (java.util.PropertyPermission java.home read)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
         at java.lang.System.getProperty(Unknown Source)
         at oracle.forms.webutil.common.VBeanCommon.<clinit>(VBeanCommon.java:130)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Unknown Source)
         at oracle.forms.handler.UICommon.instantiate(Unknown Source)
         at oracle.forms.handler.UICommon.onCreate(Unknown Source)
         at oracle.forms.handler.JavaContainer.onCreate(Unknown Source)
         at oracle.forms.engine.Runform.onCreateHandler(Unknown Source)
         at oracle.forms.engine.Runform.processMessage(Unknown Source)
         at oracle.forms.engine.Runform.processSet(Unknown Source)
         at oracle.forms.engine.Runform.onMessageReal(Unknown Source)
         at oracle.forms.engine.Runform.onMessage(Unknown Source)
         at oracle.forms.engine.Runform.processEventEnd(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.redispatchEvent(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processKeyEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Please guide...
    Thanks in advance
    Kaustubh.

    Are you trying to write to the application server or client machine?
    it may be a long shot but if you are using the sun JRE have you tried changing the java.policy file to allow it to read the java.home property?
    add a line like the following:
         permission java.util.PropertyPermission "java.home", "read";
    to the grant section of {JREHOME}\lib\security\java.policy

  • Run time error while running payroll simulation

    Dear All SAP HR experts,
    I am getting an error in QA Server, This occurs whenever I run payroll simulation for an employees  getting an error dump i.e .."TABLE_FREE_IN_LOOP" . The transaction code for which I am getting error is PC00_M40_CALC_SIMU.
    Attached is the dump for reference.
    Trigger Location of Runtime Error
        Program                                 SAPLRPIB
        Include                                 LRPIBU01
        Row                                     165
        Module type                             (FUNCTION)
        Module Name                             RP_FILL_WAGE_TYPE_TABLE
    Please help in this regard.
    Thanks
    Srini

    function module RP_FILL_WAGE_TYPE_TABLE
    is generally used for reading the wage type assigned for indirect valuation (INVAL A,B,C,D)
    check whether you are using any Z function in your payroll schema which might be giving problem
    Also check with your basis guys whether QA server has any memory issues.
    Regards
    Sumit Pradhan.

  • Run time error while Creating IDN and Inbound Delivery

    Hi All,
    I am getting Run time error while creating Inbound Delivery Notification from Inbound Queue and Inbound Delivery from IDN
    After debugging i come to know that system is looking for Patch Level SAPKNA7026 but in my system Patch is upto SAPKNA7022
    Is there any OSS notes available to deactivate/resolve this run time error ? I tried 0001798794 Deactivation of hierarchical access functionality but system is still giving me run time error
    Regards,
    P@M

    Hi Agrawal
    As you are getting run-time error after entering the sold to party and material and the error is in SAPLV61Z ,
    close the session for sometime and open again and then create sales order and then enter sold to party and material and then check wheather you are getting or not. If you are still facing the problem then take the help of the ABAP & BASIS consultant's.
    Regards
    Srinath

  • Run Time Error while Entering Quantity in Sales Order

    Dear All,
    Iam getting Run time Error while iam entering material quantity in sales order.Please  find the screenshot of the same.
    kindly Help Me.Me. Plz note that we had done a system copy two days back to our new server.
    Rgds
    Thomson
    ST22 Screenshot

    Dear All
    Its Resolved Thanks For your Valuable time Support
    INCLUDE LV03VFB4 inside below code trigger error.
    PERFORM VVBBD_AUFBAUEN USING WA_AVBBD
                                        WA_AVBBD-APOMOBILE
                                        DA_SUBRC
                                        DA_UPDKZ
                                        DA_VVBBD_TABIX
                                        0.
    This Was the Error some how 0 was there we are removed the 0 now it is working fine
    Rgds
    Thomson

  • Run-time error while executing alv grid report

    Hi everyone
    I m trying to run a alv grid report it is giving a run time error while executing the statement CALL METHOD V_ALV->SET_TOOLBAR_INTERACTIVE.
    Actually i added 2 buttons in the toolbar.after that when i execute the report i m getting errors.
    <b>Error Analysis</b>
    An exception occurred that is explained in detail below.                     
    The exception, which is assigned to class 'CX_SY_REF_IS_INITIAL', was not    
    caught in                                                                   
    procedure "TOOLBAR_MENUS_INIT" "(METHOD)", nor was it propagated by a RAISING
    clause.                                                                     
    Since the caller of the procedure could not have anticipated that the        
    exception would occur, the current program is terminated.                    
    The reason for the exception is:                                             
    You attempted to use a 'NULL' object reference (points to 'nothing')         
    access a component (variable: "ME->M_CL_MENU_BUTTON_VARIANT").               
    An object reference must point to an object (an instance of a class)         
    before it can be used to access components.                                  
    Either the reference was never set or it was set to 'NULL' using the         
    CLEAR statement.

    Hi Dinesh,
    Seems you have not initialised ( Instantiated in OO ) the object and / or the parent container.
    Check if you have create object for both the parent as well as the alv object.
    So when you instatntiate the object of ALV you pass the object ( instantiated before hand ) in the parent container position.
    Also you would have to register the events to the object using method. Then only the buttons will finction.
    eg :
    IF G_CUSTOM_CONTAINER IS INITIAL.
        CREATE OBJECT CUSTOM_CONTAINER_1
               EXPORTING CONTAINER_NAME = CONTAINER_1.
        CREATE OBJECT GRID1
               EXPORTING I_PARENT = CUSTOM_CONTAINER_1.
        CALL METHOD ALV_GRID1->SET_TABLE_FOR_FIRST_DISPLAY
             EXPORTING I_STRUCTURE_NAME = 'VBAK
             CHANGING  IT_OUTTAB        = IT_VBAK.
    Reward points if useful.

  • MIGO run time error while excution

    Hi,
    I have getting run time error while executing MIGO transaction.
    Syntax error in program "CL_EX_MB_MIGO_BADI============CP ".
    the type "MB_MIGO_BADI"  is unknown.
    Regards
    Abdul

    Hi Rashid
    The error clearly states that the BADI MB_MIGO_BADI is not present in your system.
    Just go to SE18 & enter the name of the above BADI & check if it exists there.
    Also if the BADI exists, just check if there is an implementation created for the same.
    Hope this helps.
    Regards
    Abhii

  • Run time error while doing VL10B transaction for STO

    Dear All,
    We are facing problem of run time error while creating Delivery (VL10B) for  STO .We have two company codes .For one company code its working fine .But we are trying for another company code ,this error coming.error detals
    Error in the ABAP Application Program
    The current ABAP program "SAPLV05I" had to be terminated because it has
    come across a statement that unfortunately cannot be executed.
    Error analysis
        An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not cau
         in
        procedure "SD_PARTNER_UPDATE" "(FUNCTION)", nor was it propagated by a RAI
         clause.
        Since the caller of the procedure could not have anticipated that the
        exception would occur, the current program is terminated.
        The reason for the exception is:
        If you use an ABAP/4 Open SQL array insert to insert a record in
        the database and that record already exists with the same key,
        this results in a termination.
        (With an ABAP/4 Open SQL single record insert in the same error
    Kindly suggest as to how to resolve this asap.
    regards
    umesh

    These Kind of Errors Generally Occor for the wrong maitnaince of the partner functions. If you are using any user exits to detremine the partner functions. check the logic in that routine.
    Because we do frequently get this error, but only if we hae not maintained as per the rule written in the  user exit..
    The USer exits for partner Determiantion to check is Function Module EXIT_SAPLV09A_003.  THis gets activated, if you have give the source parner function as "X/Y/Z" in your partenr determiantion procedures.

  • Run time error while using Class gcl_error

    Hi All,
    I am getting run time error while using class gcl_error
                                          type REF to zsreport_error_handling:
    '' Attempt to access a component using 'NULL' object reference (points to nothing).
    An object reference must point to an object ( an instance of a class) before you can use it to access components ( variable : ''GCL_ERROR'').
    Either the reference point has not yet been set or it has been reset to 'NULL' by a clear statement."
    Can you please suggest any solution for this ?
    Thanks in advance.

    Dear All
    Its Resolved Thanks For your Valuable time Support
    INCLUDE LV03VFB4 inside below code trigger error.
    PERFORM VVBBD_AUFBAUEN USING WA_AVBBD
                                        WA_AVBBD-APOMOBILE
                                        DA_SUBRC
                                        DA_UPDKZ
                                        DA_VVBBD_TABIX
                                        0.
    This Was the Error some how 0 was there we are removed the 0 now it is working fine
    Rgds
    Thomson

  • Run time error while installing Labview 8.6.1 in Vista x64

    hai friends,
               i got an error( Run time error) while installing Labview 8.6 software. this software has bought from NI. it shows the error path as setup.exe. this software i had tried to install in vista x64. but when i am installing the same software in windows xp, it is installing fine...so what was the problem for this error. how to solve it, please help me....

    Thank You Mr.Jason Daming,
    Same error what post Mr.muks referred in the last reply....
    When the installation begins an error occurs (after the acceptance of licence step in the installation procedure) with the title on the error window "Microsoft Visual C ++ Runtime Library " and displays the program set up path with these statements " This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information."
    while installing the same Labview in windows XP..... it is installing fine... but in vistax64 only i am facing this kind of problem...

  • System is giving ABAP run time error while perform LT06 or create TO with r

    Hi SAP WM Gurus,
    System is giving ABAP run time error while perform LT06 or create TO with respect to posting change notice, below are runtime analysis details.
    Short dump has not been completely stored. It is too big.
    P_MENGA = P_MENGE.
    007940       P_UMREZ = 1.
    007950       P_UMREN = 1.
    Can you give any idea on this issue.
    Thanks and Regards,
    SHARAN.

    Hi,
    Go to Tcode ST22 and mentione the dump code there and check.
    Also take help[ of Abapers to fix it.
    Thanks
    Utsav

  • ABAP run time error while perform LT06 or create TO with respect to posting

    Hi SAP WM Gurus,
    System is giving ABAP run time error while perform LT06 or create TO with respect to posting change notice, below are runtime analysis details.
    >> Short dump has not been completely stored. It is too big.
    >       P_MENGA = P_MENGE.
    007940       P_UMREZ = 1.
    007950       P_UMREN = 1.
    Can you give any idea on this issue.
    Thanks and Regards,
    SHARAN.

    This part is just the place in the program where the error occured, but why the error occured is mentioned earlier in the dump.
    Maybe you have a too big number in the field and hence a field overflow, maybe you have a character instead of a number in the field.
    Read the dump from the beginning. if you dont know how to read a dump,then try to get help from any local Abaper.

  • Portal run time error while accessing R/3 transaction code

    Hi all,
    We have configured R/3 system and BW system to the Portal.
    In R/3 system we have user ids named "ADMIN" and "FIAR" . ADMIN is for adminstrator and FIAR is for FIAR module. I created the same user ids in Portal , for ADMIN i have assigned ADMINSTRATOR role and for FIAR BI as it is also for our BW system.
    But when iam checking the r/3 iviews for FIAR , it shows PORTAL RUN TIME ERROR , while for ADMIN it works fine.
    Can any body have some ideas about this , pts will be assigned,
    Thanks ..

    Have you collected the error log details which looks similar to the below one??
    "The initial exception that caused the request to fail was:
    User has no RFC authorization for function group SDIFRUNTIME.
    com.sap.mw.jco.JCO$Exception: (104) RFC_ERROR_SYSTEM_FAILURE: User has no RFC authorization for function group SDIFRUNTIME.
    at com.sap.mw.jco.MiddlewareJRfc.generateJCoException(MiddlewareJRfc.java:455)
    at com.sap.mw.jco.MiddlewareJRfc$Client.execute(MiddlewareJRfc.java:1442)
    at com.sap.mw.jco.JCO$Client.execute(JCO.java:3979)
    at com.sap.mw.jco.JCO$Client.execute(JCO.java:3416)
    at com.sap.mw.jco.JCO$Repository.execute(JCO.java:20471)"

Maybe you are looking for

  • PO not appearing in SRM portal

    Dear all, One of the PO is not appearing in SRM portal.  This issue related to specific PO only.  Remaining POs of the vender are appearing in the portal.  All the XML messages are processed successfully.  we are using SUS senario.  Pl. help me in th

  • Error - No permitted payment method exists

    Hi guys, I'm trying to create a Automatic Payment Transactions (transaction F110) using Custumer account. In the job log, the system displays the error message: > No permitted payment method exists. If I edit the proposal and reallocate the document,

  • Png within my document when converted to a pdf are printing black and white rest is color-help! WHY?

    I am creating a document in Publisher & converting to a pdf. Most of my png elements within the document, are then printing black and white from the pdf (everything else is in color)? Don't know what is going on, doesn't seem to happen on all printer

  • How can I get rid of cache files?

    Premiere Pro, can't find cache files on Mac, not in the common folder, clean doesn't work, I know there are Gigs of them on my drive.  How can I get rid of them? I started a premiere project I had worked on before using an external drive but forgot t

  • Help with Trial Balance

    I have a situation where in my client sold 3 of its plants. Now the problem is that my client still has the balances coming from those plants in the trial balance. What is the best approach in SAP to display the trial balance excluding those plants'