7 Replies Latest reply on Sep 20, 2004 10:51 AM by darranl

    javax.naming.InitialContext

      I can't find the class InitialContext when trying to develop a EJB on JBoss.

      If you use the book "JBoss (TM) 3.2 Workbook for Enterprise JavaBeans (TM), 3rd Edition" you should in example 4.1 be able to run a simple EJB.

      When starting the example, I couldn't find the javax.ejb package either, but after a while this was found in the jboss-j2ee.jar. I still can't find the InitialContext-class and would appreciate some information regarding this issue...

      Thanx in advance...

        • 1. Re: javax.naming.InitialContext
          anil.saldhana

          InitialContext should be part of your JDK. Are you using JDK1.4.2? Try using that.

          Also look at the following Wiki page for more info:
          http://www.jboss.org/wiki/Wiki.jsp?page=JBossNS

          • 2. Re: javax.naming.InitialContext

            I am using the java version "1.4.2_04" but I still can't find it.

            I also have downloaded Java[TM] 2 Platform, Enterprise Edition 1.4 SDK Update 1 and thought it was among this somewhere. But I can't find it...

            I thought I was supposed to find it in j2ee.jar...

            Do anyone have a clue where it is? An archive where i could search or something...

            • 3. Re: javax.naming.InitialContext
              darranl

              Is is part of your JDK, how are you referencing it in code and what error are you getting?

              Also delete the J2EE 1.4 SDK, that is just going to confuse things, stick to the jars in {jboss.dir}/client

              • 4. Re: javax.naming.InitialContext

                Thanx!

                But does anyone know which file it is located in in? I can't find the correct one.

                I am currently using the NetBeans IDE 3.6 which comes with the 1.4 JSK. I have recently discovered how to add archives which I am dependend on, but I can't find what is already there and how I can modify this. Anyone?

                The standard error that comes when I am trying to write the example code is "Cannot resolve symbol...". It can't locate the InitialContext...

                • 5. Re: javax.naming.InitialContext

                  I am still in need for this...

                  Anyone who knows in which jar-file it should be?

                  • 6. Re: javax.naming.InitialContext

                    Hmmm.... I thought i posted some new issues here... well anyway... it was:

                    I am still in need for a solution... Does anyone know which jar-file i could take a look in?

                    • 7. Re: javax.naming.InitialContext
                      darranl

                      The class InitialContext is located in the jar file rt.jar which is part of the JDK installation extract the contents of the jar file and you will see it in there.