Results 1 to 9 of 9
  1. #1
    ducisfirst is offline Member
    Join Date
    May 2014
    Posts
    5
    Rep Power
    0

    Default ERROR EJB Context Unable to find

    Hi all,
    I try remote host ejb from web project
    It exception Unable to find:

    javax.naming.NameNotFoundException: Name [ejb:/FirstJPAProject//ProjectBean!com.ibytecode.businesslogic.ProjectBea nRemote] is not bound in this Context. Unable to find [ejb:].

    HELP me !
    Thanks ALL

  2. #2
    jack12 is offline Member
    Join Date
    Oct 2016
    Posts
    29
    Rep Power
    0

    Default Re: ERROR EJB Context Unable to find

    First, fix your web.xml and add the Remote Interface in it:

    <ejb-ref>
    <description>Sample EJB</description>
    <ejb-ref-name>SampleBean</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>com.SampleHome</home>
    <remote>com.Sample</remote> <!-- the remote interface goes here -->
    </ejb-ref>
    Then, regarding the java.lang.NoSuchMethodError, Sean is right, you have a mismatch between the version of the app server "client library" you are using inside NetBeans and the app server version (server-side). I can't tell you exactly which JARs you need to align though, refer to the Sun Application Server documentation.

    PS: This is not a direct answer to the problem but I don't think you're currently passing any useful properties when creating your initial context with the results of the call to System.getProperties(), there is nothing helpful in these properties to define the environment of a context (e.g. the initial context factory)

  3. #3
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,989
    Rep Power
    8

    Default Re: ERROR EJB Context Unable to find

    Hey Jack,

    We appreciate your effort in trying to help people here. For your next post, please consider the date of the post. This particular one was posted in August 2014, more than 2 (two!) years ago. It's very likely the OP has moved on and won't read this answer. On top of that, the current state of the EJB API will allow you to mark an EJB as @Remote or @Local, so no more XML misery.

    And who is Sean?
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    12,059
    Rep Power
    25

    Default Re: ERROR EJB Context Unable to find

    Quote Originally Posted by SurfMan View Post
    This particular one was posted in August 2014, more than 2 (two!) years ago.
    Not to worry, the answer dates from 2009


    Quote Originally Posted by SurfMan View Post
    And who is Sean?
    java - ejb lookup failing with NamingException - Stack Overflow

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  5. #5
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    13,541
    Rep Power
    26

    Default Re: ERROR EJB Context Unable to find

    Oh wow!
    So he's copy-pasting responses from elsewhere as his own.
    That's fantastic!
    I'm all emotional now...
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  6. #6
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,989
    Rep Power
    8

    Default Re: ERROR EJB Context Unable to find

    Wow. That's... That's... Wow. Really? Why?
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

  7. #7
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    6,226
    Rep Power
    13

    Default Re: ERROR EJB Context Unable to find

    @Tolls, @Surfman

    I agree. Do does Sean.

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  8. #8
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    13,541
    Rep Power
    26

    Default Re: ERROR EJB Context Unable to find

    (Tolls Googles to see where jim copied that post from)
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  9. #9
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,989
    Rep Power
    8

    Default Re: ERROR EJB Context Unable to find

    I talked to Sean, and we both think this forum needs a plagiarism-plugin. If 50% of your reply is found verbatim somewhere on teh interwebz, your post will be sent to /dev/null and you will get a perma ban.
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

Similar Threads

  1. Unable to find JAR Files .
    By Jack_Tauson_Sr in forum Eclipse
    Replies: 10
    Last Post: 03-11-2013, 08:45 PM
  2. Unable to find JAR Files .
    By Jack_Tauson_Sr in forum New To Java
    Replies: 1
    Last Post: 03-10-2013, 05:08 AM
  3. Unable to find symbol: CallBack
    By rbradleyjr in forum New To Java
    Replies: 2
    Last Post: 03-28-2012, 01:56 AM
  4. Unable to find plug-in
    By tommo in forum Eclipse
    Replies: 0
    Last Post: 10-18-2011, 03:47 AM
  5. unable to find RCP Hello Example
    By thano in forum Eclipse
    Replies: 0
    Last Post: 06-02-2011, 01:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •