How to find my EJBs?

i want to get the EJB in my servlet:
the EJB is:ejb.archive.ArchiveManager
i have configratured reference name:ejb/archive/archivemanager
in SUN FORTE .
Hashtable env = new java.util.Hashtable(1);
//initialiate context
try {
initContext = new javax.naming.InitialContext();
catch (Exception e) {
System.out.println("Exception creating InitialContext: " + e.toString());
return;
//lookup ArchiveManager
try {
System.out.println("Looking up ArchiveManager bean home interface");
String JNDIName = "java:comp/env/ejb/archive/archivemanager";
System.out.println("Looking up: " + JNDIName);
Object obj = initContext.lookup(JNDIName);
armHome = (ArchiveManagerHome) javax.rmi.PortableRemoteObject.narrow(obj,ArchiveManagerHome.class);
catch(Exception e) {
System.out.println("ArchiveManager bean home not found - " +
"Is bean registered with JNDI?: " + e.toString());
e.printStackTrace();
return;
//create ArchiveManager
try {
System.out.println("Creating the ArchiveManager bean");
arm = armHome.create();
catch(CreateException e) {
System.out.println("Could not create the ArchiveManager bean: "+
e.toString());
return;
in runtime the error is:
javax.ejb.EJBException: nested exception is: javax.ejb.CreateException: Could not create stateless EJB: java.lang.reflect.InvocationTargetException
javax.ejb.CreateException: Could not create stateless EJB: java.lang.reflect.InvocationTargetException
at com.sun.ejb.containers.StatelessSessionContainer.createStatelessEJB(StatelessSessionContainer.java:358)
at com.sun.ejb.containers.StatelessSessionContainer.getContext(StatelessSessionContainer.java:285)
why?how can i get my EJB?
thanks

i want to get the EJB in my servlet:
the EJB is:ejb.archive.ArchiveManager
i have configratured reference name:ejb/archive/archivemanager
in SUN FORTE .
Hashtable env = new java.util.Hashtable(1);
//initialiate context
try {
initContext = new javax.naming.InitialContext();
catch (Exception e) {
System.out.println("Exception creating InitialContext: " + e.toString());
return;
//lookup ArchiveManager
try {
System.out.println("Looking up ArchiveManager bean home interface");
String JNDIName = "java:comp/env/ejb/archive/archivemanager";
System.out.println("Looking up: " + JNDIName);
Object obj = initContext.lookup(JNDIName);
armHome = (ArchiveManagerHome) javax.rmi.PortableRemoteObject.narrow(obj,ArchiveManagerHome.class);
catch(Exception e) {
System.out.println("ArchiveManager bean home not found - " +
"Is bean registered with JNDI?: " + e.toString());
e.printStackTrace();
return;
//create ArchiveManager
try {
System.out.println("Creating the ArchiveManager bean");
arm = armHome.create();
catch(CreateException e) {
System.out.println("Could not create the ArchiveManager bean: "+
e.toString());
return;
in runtime the error is:
javax.ejb.EJBException: nested exception is: javax.ejb.CreateException: Could not create stateless EJB: java.lang.reflect.InvocationTargetException
javax.ejb.CreateException: Could not create stateless EJB: java.lang.reflect.InvocationTargetException
at com.sun.ejb.containers.StatelessSessionContainer.createStatelessEJB(StatelessSessionContainer.java:358)
at com.sun.ejb.containers.StatelessSessionContainer.getContext(StatelessSessionContainer.java:285)
why?how can i get my EJB?
thanks

Similar Messages

  • How to find the source code of EJB?

    I have download the EJB class file on the sun's site,but I wanna download java file of EJB,how to find the java file?

    download a decompiler for java ...search in downlaod.com

  • How to find EJB client IPAddress

    Hi,
    We have a thick client making IIOP/t3 calls to EJBs.
    How to find the IPAddress of the client in the EJB?
    thank you,

    I don't think EJB/RMI standard specifies standard mechanism to get remote client IP, However you can use weblogic connection filter api to know remote client IP address.
    http://e-docs.bea.com/wls/docs81/security/con_filtr.html#1030512

  • How do jsp call ejb in weblogic 6.0?

    I put the jsp in the DefaultWebApp_Server folder and put the ejb jar file in
              the applications folder.
              I use the administrator console to deploy the ejb.
              The ejb package is 'com.test.bmp'.
              Howerver, the jsp can't import the ejb package and can't find the ejb class.
              How do the jsp call the ejb?
              

    Any classes that are used by the JSP should be in the WEB-INF\classes
              directory. So your bean classes could be in two places if they are
              referenced in a jsp. Make sure the classes are identical.
              "Alex" <[email protected]> wrote in message
              news:[email protected]..
              > I put the jsp in the DefaultWebApp_Server folder and put the ejb jar file
              in
              > the applications folder.
              > I use the administrator console to deploy the ejb.
              > The ejb package is 'com.test.bmp'.
              > Howerver, the jsp can't import the ejb package and can't find the ejb
              class.
              > How do the jsp call the ejb?
              >
              >
              >
              

  • How to find by email with JPA?

    How to find by email with JPA? My this but not worked
    public WnUser findUser(WnUser email) {
    return (WnUser) em.createQuery
    ("SELECT object(u.email) FROM entities.WnUser u WHERE u.email =:email").setParameter("email", email.getEmail()).getSingleResult();
    javax.ejb.EJBException: javax.persistence.NoResultException: No entity found for query
    12:23:44,843 ERROR [STDERR]      at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:63)
    12:23:44,843 ERROR [STDERR]      at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
    12:23:44,843 ERROR [STDERR]      at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
    12:23:44,843 ERROR [STDERR]      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)

    First off, you are not really doing:
    GWAccount->GWAddressBook->GWAddressBookEntrie->
    get_EmailAddress,get_DisplayName()
    are you?
    If you enter the full line, it will read in all
    of the entries each time it is called.
    You should break each part into an object:
    gwAccount
    gwBook
    gwEntries
    I'm not sure what you are doing.
    Are you trying to compose an email?
    If so, why are you not using Recipients.Resolve()?
    Are you trying to get the recipients from an email?
    Preston
    >>> On Friday, April 16, 2010 at 1:26 AM,
    hillp<[email protected]>
    wrote:
    > as title,
    > i can get the display name from the to, cc, bc edit box,
    > then i need to get the email address,
    > current i use object API to query:
    >
    GWAccount‑>GWAddressBook‑>GWAddressBookEntrie >get_EmailAddress,get_Di
    splayName
    > but i find it is really slow when there are many contacts, example
    > 10000.
    >
    > so is there any other effective method to get the email address?

  • J2EE setup - Can't find javax.ejb.EJBObject

    I am running my first client side program and the below error is being returned:
    Exception in thread "main" java.lang.NoClassDefFoundError:javax/ejb/EJBObject.
    I am guessing that my classpath to find
    javax.ejb.EJBObject is not setup properly. Does
    anyone know how it should be set. I am using J2EE.

    Apparently there is a better solution from previous post:
    classpath=.;..;c:\jdkee1.3\lib\j2ee.jar;
    If you specify a directory, Java will search for class files in that directory; if you specify an archive (zip or jar) Java will search for class files in the archive. The class files you need reside in the two archives c:\jdk1.3\lib\rt.jar and c:\jdkee1.3\lib\j2ee.jar.

  • Discoverer Report: How to find Business Area name from Report Name.

    Hi
    I opened a report in Disco Desktop 4 -> Resonsibiolity --> Report Name.
    So I know Report name but don’t know which Business Area it belongs to.
    How to find Business Area Name from Report Name?
    Cheers
    Vijay

    Hi,
    There is no relationship between reports and business areas. Each report can be built from many folders. Each folder can be in many business areas.
    However you can try the following SQL which may give you the result you want for an v5 EUL. You will have to modify for Discoverer 4 EUL:
    select distinct doc_name, obj.obj_name folder_name, bas.ba_name
    from eul_us.eul5_documents doc
    , eul_us.eul5_elem_xrefs xref
    , eul_us.eul5_expressions exp
    , eul_us.eul5_objs obj
    , eul_us.eul5_ba_obj_links bol
    , eul_us.eul5_bas bas
    where xref.ex_from_id = doc.doc_id
    and doc.doc_name = &your_report
    and xref.ex_to_id = exp.exp_id
    and obj.obj_id = exp.it_obj_id
    and bol.bol_obj_id = obj.obj_id
    and bas.ba_id = bol.bol_ba_id
    Rod West

  • How to find a specific word in sentence in each line?

    How to find a specific word in sentence in each line and output will show start from the beginning from specific word plus with small description from each sentence?
    For example: I need to find a "+Wednesday+" and "+Thursday+" word in each sentence by line by line from "myfile.txt".
    Go ballet class next Wednesday.
    On the Wednesday is going to swim class.
    We have a meeting on Thursday at Panda's.
    Then it will show the output:
    Wednesday : ballet class
    Wednesday : swim class
    Thursday: meeting at Panda's
    I am going to figure out in Java console to read from a file for specific word from each line and how to make it output in correct way. I know already to make input/file codes.

    I got it and understand much better. Thank you very much. There is a problem with it because I knew how to make
    a specific word in sentence but how I should make Output for specific word and some words from sentence.
    For example:
    Input:
    +"On Thursday go to ballet class"+
    +"Swim class on Friday one time a month at 2 p.m."+
    I used the codes for that:
    class FindSchedule{
         String firstline = "On Thursday go to ballet class ";
         String secondline = "Swim class on Friday one time a month ";
         FindSchedule(){
              System.out.println(firstline + findTheIndex("Thursday", firstline));
              System.out.println(secondline + findTheIndex("Friday", secondline));
         public int findTheIndex(String word, String sentence){
              int index;
              index = sentence.indexOf(word);
              return index;
         public static void main (String[] args){
              new FindSchedule();
    }The output will be:
    Thursday: ballet class
    Friday: 14:00 swim class one time a week
    Notice that time is changing in output complete different from input.
    I need to find out how to extract some words from each sentence for output. Do you know how to do it?

  • How to find out the user-exits?

    hi.
    how to find out the user-exits?
    regards
    eswar.

    Hi,
    *& Report  ZEXITFINDER
    *report  zexitfinder.
    *& Enter the transaction code that you want to search through in order
    *& to find which Standard SAP User Exits exists.
    *& Tables
    tables : tstc, "SAP Transaction Codes
    tadir, "Directory of Repository Objects
    modsapt, "SAP Enhancements - Short Texts
    modact, "Modifications
    trdir, "System table TRDIR
    tfdir, "Function Module
    enlfdir, "Additional Attributes for Function Modules
    tstct. "Transaction Code Texts
    *& Variables
    data : jtab like tadir occurs 0 with header line.
    data : field1(30).
    data : v_devclass like tadir-devclass.
    *& Selection Screen Parameters
    selection-screen begin of block a01 with frame title text-001.
    selection-screen skip.
    parameters : p_tcode like tstc-tcode obligatory.
    selection-screen skip.
    selection-screen end of block a01.
    *& Start of main program
    start-of-selection.
    Validate Transaction Code
    select single * from tstc
    where tcode eq p_tcode.
    Find Repository Objects for transaction code
    if sy-subrc eq 0.
    select single * from tadir
    where pgmid = 'R3TR'
    and object = 'PROG'
    and obj_name = tstc-pgmna.
    move : tadir-devclass to v_devclass.
    if sy-subrc ne 0.
    select single * from trdir
    where name = tstc-pgmna.
    if trdir-subc eq 'F'.
    select single * from tfdir
    where pname = tstc-pgmna.
    select single * from enlfdir
    where funcname = tfdir-funcname.
    select single * from tadir
    where pgmid = 'R3TR'
    and object = 'FUGR'
    and obj_name = enlfdir-area.
    move : tadir-devclass to v_devclass.
    endif.
    endif.
    Find SAP Modifactions
    select * from tadir
    into table jtab
    where pgmid = 'R3TR'
    and object = 'SMOD'
    and devclass = v_devclass.
    select single * from tstct
    where sprsl eq sy-langu
    and tcode eq p_tcode.
    format color col_positive intensified off.
    write:/(19) 'Transaction Code - ',
    20(20) p_tcode,
    45(50) tstct-ttext.
    skip.
    if not jtab[] is initial.
    write:/(95) sy-uline.
    format color col_heading intensified on.
    write:/1 sy-vline,
    2 'Exit Name',
    21 sy-vline ,
    22 'Description',
    95 sy-vline.
    write:/(95) sy-uline.
    loop at jtab.
    select single * from modsapt
    where sprsl = sy-langu and
    name = jtab-obj_name.
    format color col_normal intensified off.
    write:/1 sy-vline,
    2 jtab-obj_name hotspot on,
    21 sy-vline ,
    22 modsapt-modtext,
    95 sy-vline.
    endloop.
    write:/(95) sy-uline.
    describe table jtab.
    skip.
    format color col_total intensified on.
    write:/ 'No of Exits:' , sy-tfill.
    else.
    format color col_negative intensified on.
    write:/(95) 'No User Exit exists'.
    endif.
    else.
    format color col_negative intensified on.
    write:/(95) 'Transaction Code Does Not Exist'.
    endif.
    Take the user to SMOD for the Exit that was selected.
    at line-selection.
    get cursor field field1.
    check field1(4) eq 'JTAB'.
    set parameter id 'MON' field sy-lisel+1(10).
    call transaction 'SMOD' and skip first screen.
    Regards

  • How to find out the Transactions used per month & the USER who used that

    Hi,
    1)How to find out the Transactions used per month & the USER who used that?
    2)and can i get the above same for minimum 20 month?
    System : SAP- Enterprise Core Component.

    You can use my program...
    *& Report  Z_ABAP_TCODE_MONITOR
    *****&  Program Type          : Report                                 *
    *****&  Title                 : Z_ABAP_TCODE_MONITOR                   *
    *****&  Transaction code      : ZTCODE_USAGE                           *
    *****&  Developer name        : Shailendra Kolakaluri                  *
    *****&  Deveopment start date : 26 th Dec 2011                         *
    *****&  Development Package   : ZDEV                                   *
    *****&  Transport No          : DEVK906086                                       *
    *****&  Program Description   : This program is to display
    *List all tcodes executed during previous day.
    *& Show the number of users executing tcodes
    *& Modification history
    REPORT  Z_ABAP_TCODE_MONITOR.
    *& List all tcodes executed during previous day.
    *& Show the number of users executing tcodes
    TYPE-POOLS : slis.
    DATA: ind TYPE i,
          fcat TYPE slis_t_fieldcat_alv WITH HEADER LINE,
          layout TYPE slis_layout_alv,
          variant TYPE disvariant,
          events  TYPE slis_t_event WITH HEADER LINE,
          heading TYPE slis_t_listheader WITH HEADER LINE.
    *REPORT  z_report_usage.
    TYPES: BEGIN OF zusertcode,
      date   TYPE swncdatum,
      user   TYPE swncuname,
      mandt     TYPE swncmandt,
      tcode     TYPE swnctcode,
      report TYPE swncreportname,
      count     TYPE swncshcnt,
    END OF zusertcode.
    *data   : date type n.
    DATA: t_usertcode  TYPE swnc_t_aggusertcode,
          wa_usertcode TYPE swncaggusertcode,
          wa           TYPE zusertcode,
          t_ut         TYPE STANDARD TABLE OF zusertcode,
          wa_result    TYPE zusertcode,
          t_result     TYPE STANDARD TABLE OF zusertcode.
    PARAMETER: month TYPE dats DEFAULT sy-datum.
    *PARAMETER: date TYPE dats.
    *select-options : username for wa_usertcode-account.
    START-OF-SELECTION.
    PERFORM get_data.
    PERFORM get_fieldcatalog.
      PERFORM set_layout.
    PERFORM get_event.
    PERFORM get_comment.
      PERFORM display_data.
    FORM get_data .
    *date = sy-datum - 2 .
    After start-of-selection add this line (parameter Month required 01 as day).
      concatenate month+0(6) '01' into month.
      CALL FUNCTION 'SWNC_COLLECTOR_GET_AGGREGATES'
        EXPORTING
          component     = 'TOTAL'
          ASSIGNDSYS    = 'DEV'
          periodtype    = 'M'
          periodstrt    = month
        TABLES
          usertcode     = t_usertcode
        EXCEPTIONS
          no_data_found = 1
          OTHERS        = 2.
      wa-date  = month.
    *wa-date  = date.
      wa-mandt = sy-mandt.
    wa_usertcode-account = username.
      LOOP AT t_usertcode INTO wa_usertcode.
        wa-user = wa_usertcode-account.
        IF wa_usertcode-entry_id+72 = 'T'.
          wa-tcode  = wa_usertcode-entry_id.
          wa-report = space.
        ELSE.
          wa-tcode  = space.
          wa-report = wa_usertcode-entry_id.
        ENDIF.
        COLLECT wa INTO t_ut.
      ENDLOOP.
      SORT t_ut BY report ASCENDING.
      CLEAR: wa, wa_result.
    endform.
    FORM get_fieldcatalog .
    fcat-tabname     = 't_ut'.
    fcat-fieldname   = 'DATE'.
    fcat-seltext_l   = 'Date'.
    fcat-key         = 'X'.
    APPEND fcat.
      CLEAR fcat.
      fcat-tabname     = 't_ut'.
      fcat-fieldname   = 'MANDT'.
      fcat-seltext_l   = 'Client'.
      fcat-key         = 'X'.
      APPEND fcat.
      CLEAR fcat.
      fcat-tabname     = 't_ut'.
      fcat-fieldname   = 'USER'.
      fcat-seltext_l   = 'User Name'.
      fcat-key         = 'X'.
      APPEND fcat.
      CLEAR fcat.
      fcat-tabname     = 't_ut'.
      fcat-fieldname   = 'TCODE'.
      fcat-seltext_l   = 'Transaction Code'.
      fcat-key         = 'X'.
      APPEND fcat.
    ENDFORM.
    *&      Form  SET_LAYOUT
          text
    -->  p1        text
    <--  p2        text
    FORM set_layout .
      layout-colwidth_optimize = 'X'.
    ENDFORM.                    " SET_LAYOUT
    *&      Form  GET_EVENT
          text
    -->  p1        text
    <--  p2        text
    *FORM get_event .
    events-name = slis_ev_top_of_page.
    events-form = 'TOP_OF_PAGE'.
    APPEND events.
    *ENDFORM.                    " GET_EVENT
    **&      Form  GET_COMMENT
          text
    -->  p1        text
    <--  p2        text
    *FORM get_comment .
    DATA: text(30).
    text = 'Billing Report'.
    heading-typ = 'H'.
    heading-info = text.
    APPEND heading.
    *ENDFORM.                    " GET_COMMENT
    **&      Form  top_of_page
          text
    -->  p1        text
    <--  p2        text
    *FORM top_of_page .
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
       EXPORTING
         it_list_commentary       = heading[]
      I_LOGO                   =
      I_END_OF_LIST_GRID       =
    *ENDFORM.                    " top_of_page
    *&      Form  DISPLAY_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM display_data .
      sort t_ut[].
    DELETE ADJACENT DUPLICATES FROM t_ut[] COMPARING ALL FIELDS.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program = sy-cprog
          is_layout          = layout
          it_fieldcat        = fcat[]
          i_save             = 'A'
          is_variant         = variant
          it_events          = events[]
        TABLES
          t_outtab           = t_ut
        EXCEPTIONS
          program_error      = 1
          OTHERS             = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " DISPLAY_DATA

  • How to find out the person who did a transport.

    How to find out the person who did a transport.
    There are 3 basis admins in our Org.
    so is there a way of tracing out , who did what transport.
    Regards,

    - Goto import Overview (STMS)
    - Import Queue
    - Select DEV req (goto Import History)
    - Edit - Display More
    It will show the user who did the transport
    Rgds

  • How to find out the user who has created  a new field in the custom table.

    How to find out the user details who has created  a new field in the custom table.
    Thanks,
    Joan

    Hi Jesudasan ,
    You can know the user details with version management.Please find the
    below procedure to know.
    Go to table->Utilities tab->version->Version management->Compare the previous one .
    Hope this solves the issue,Let me know if you have any issues.
    Thanks,
    Rajani

  • How to find out web-inf path from the physical drive?

    How to find out web-inf path from the physical drive?
    I have some user profiles in web-inf directory.SO I want to know the path from root directory like
    d:/program files/allaire/jrun/appname/web-inf/profiles/username like that.
    Presently I am able to get the path upto the application directory and from that I am concatinationg web-inf/profiles/username .
    But it is giving problems when it is deployed under unix or linux.Because web-inf there it treats as WEB_INF
    SO I want to get the path of web-inf directory with out hard coding.
    Thanku

    String path = application.getRealPath("/WEB-INF/profiles/username");
    Note sure why you need this, but you don't need the real path to read the file - you can get an InputStream using the relative path. See ServletContext getResource() and getResourceAsStream().

  • How to find out appropriate user exit

    Hi,
    I want to know how to find out the user exit that matches to the requirement. Suppose for a material master program, there are so many include programs hence im unable to find call custer-function and even unable to debug an appropriate include. Please help me out how to learn user exits in a rightious way.
    Thanks
    Basu

    Look for program SAPICSS_ in your system and run it. This program can also be found under CMOD menu:  Utilities -> SAP enhancements.
    This will only give you the CMOD user exits.
    There is a program someone made that searches for all sorts of user-exits (including BADI's etc.). I remember that it was posted on sapfans.com
    Edited by: Maen Anachronos on Apr 6, 2009 3:22 PM

  • How to find out FICO user exits that are used by User

    How to find out the FICO user exits that are used by user.

    Go to tcode CMOD. In the project field drop down your list there. Put a Z* there and run the list. These should be all the exits that are activated. Search for the ones that pertain to FI. You can also search by development class. You need a little ABAP knowledge to search easily. You get this by going to the tcode then to status then to the program then to the attributes. There you find the development class. Ie FBAS.
    pls assign points if helpful as a way to say thanks.

Maybe you are looking for