8 Replies Latest reply on Apr 10, 2002 12:54 PM by kstoll

    JNDI Lookup

    kstoll

      Howdy,

      I'm trying to get a reference to a simple Session EJB from a servlet but
      my lookup fails. I hoping that someone might be able to give me some
      insight as to where I might look to debug my error.

      Here is the error message that I get in the browser:

      Just got jndiContext
      Couldn't build an initial context :

      javax.naming.CommunicationException [Root exception is
      java.lang.ClassNotFoundException: com.kboone.interest.InterestHome (no
      security manager: RMI class loader disabled)]


      and here is the source to my file

      http://kevinstoll.org/ejb/JndiServlet.html

      TIA

        • 1. Re: JNDI Lookup
          jaime

          You can see an example of using an session been at

          http://www.osmosislatina.com/jboss/session.htm

          JaimeS

          • 2. Re: JNDI Lookup
            kstoll

            Looks like a wonderful tutorial but....

            I can't read it because it's not in english :(

            • 3. Re: JNDI Lookup
              kstoll

              Ok, I made some progress this time. I actually got the lookup to work but now I can't duplicate it.

              Here is the source code that I was able to get a response on.

              http://kevinstoll.org/ejb/InterestServlet.html

              and here is the error page that I get in response.

              http://kevinstoll.org/ejb/InterestServletError.html

              This is really frustrating because I thought I had finally been successful but when I tried to refresh the browser to get anouther request it failed.

              :(

              • 4. Re: JNDI Lookup
                farmboy

                KStol,

                I can't see the source you provide a link for, however the first question is do you supply a jndi.properties file in your /WEB-INF/classes directory.

                After that we would need to see your ejb-jar.xml and your jboss.xml file to get all the info for the problem.

                Ken

                • 5. Re: JNDI Lookup
                  kstoll

                  Farmboy,

                  I didn't supply a jndi.properties in the Web-inf folder. The one time that I succeeded with the remote request I did not have that information in the source code or in a properties file. I will give it a try though.

                  As for the .xml's, it is here http://kevinstoll.org/ejb/j2h/com/kboone/interest/ejb-jar.xml ,

                  I did not use a jboss.xml on this one.

                  kstoll

                  • 6. Re: JNDI Lookup
                    puneet

                    Kevin, can u please tell me how you got rid of the first exception which is

                    javax.naming.CommunicationException [Root exception is
                    java.lang.ClassNotFoundException: com.kboone.interest.InterestHome (no
                    security manager: RMI class loader disabled)]

                    i desparately need a solution to this

                    thanks


                    • 7. Re: JNDI Lookup

                      ok, i was having the same problem when running the interest example (which worked fine as is on jboss2.4.4).

                      [java] javax.naming.CommunicationException [Root exception is java.lang.ClassNotFoundException: org.jboss.proxy.ejb.HomeProxy (no security manager: RMI class loader disabled)]

                      to fix it i just put $JBOSS_DIST/client/jboss-client.jar in the classpath of the interest client. If you were using an older jboss version make sure that you either remove the old jboss-client.jar or put the new one before the old one in the classpath

                      Hope this helps,

                      E

                      • 8. Re: JNDI Lookup
                        kstoll

                        Yayyyyyyyyyyyyyyyyyyyyyy !!! meeeeeeeeeeeeee !


                        I finally got my Session EJB working with JBoss and deployed as an ear file and built with ANT

                        I can now, Calculate Compound Interest :p

                        You would think that I won the lotto but NO!, I'm just an excited JBoss newbie!

                        Thanks to all who answered my questions on this forum. I got almost all of the answers to my questions here :)