1 2 3 Previous Next 32 Replies Latest reply on Jul 21, 2006 5:56 AM by mad11max

    Fibo Tutorial on JBoss 4.0.2

    rhino Newbie

      I started out by trying the Fibo Tutorial on JBoss 4.0.2 using the JBoss/Eclipse IDE

      Every thing seemed to work well. The EAR file deployed ok and I was able to get the initial web page in my browser that has the input box and buttons. However, when I click the compute button, things didn't work and I got a message indicating there was a problem with the application "context"

      In the code, I traced this to the following lines in the Servlet:

      Context context = new InitialContext();
      Object ref = context.lookup("java:comp/env/ejb/Fibo");

      Despite much time and hair pulling, I installed JBoss 3.2.7 and then redeployed my EAR file.

      Guess what? Everything worked perfectly as it should have.

      The only thing I can figure out is that either JBoss 4.0.2 still has some issues, or else there is some additional configuration parameters that must be set in the Fibo application to make it work on JBoss 4.0.2

      Does anyone have a clue about this problem?


        • 1. Re: Fibo Tutorial on JBoss 4.0.2
          Michael Dawson Newbie

          Check on this:


          Apparently having the Interface in more than one place confuses it.

          Good Luck,


          • 2. Re: Fibo Tutorial on JBoss 4.0.2
            rhino Newbie

            Thanks Mike.

            If I understand the other poster (you directed me in the link above) his problem was a result of having duplicate copies of the interface(s) class files packaged both in the EJB.jar and Web.war files.

            The Fibo tutorial specifies that the interface class files should be packaged in FiboEJB.jar and the FiboEJB-client.jar. The FiboEJB-client.jar is then packaged in the FiboWeb.war file. As a result, the interface(s) class files are packaged in two places in the final FiboApp.ear file.

            This is how I originally packaged the files.

            However, I do not believe it is the source of the problem.

            I tried not packaging the FiboEJB-client.jar(which has the second copy of the interfaces) in the FiboWeb.war file and found that the Fibo application still worked on JBoss 3.2.7 but not on JBoss 4.0.2.

            Below is the error message displayed in the browser when I click on the "Compute" button which causes the servlet to "try" to get a context with the following lines of code:

            Context context = new InitialContext();
            Object ref = context.lookup("java:comp/env/ejb/Fibo");

            This is the Error Message displayed in the browser:

            javax.servlet.ServletException: Lookup of java:comp/env/ failed

            • 3. Re: Fibo Tutorial on JBoss 4.0.2
              - - Newbie

              I do get the same error, while trying the Fibo Tutorial. My Configuration is Jboss 4.0.2, Java 1.5, latest Jboss-Ide from the online ressource.
              What does the Erorr mean anyway?
              Does it mean, that the JNDI Service can not locate my ComputeServlet???

              Cheers Mathias

              • 4. Re: Fibo Tutorial on JBoss 4.0.2
                - - Newbie

                PS : I deployed the same FiboApp.Ear on a Jboss 4.01 and it worked!
                So the error seems to be Jboss 4.02 related.

                • 5. Re: Fibo Tutorial on JBoss 4.0.2
                  Mik clon Newbie

                  The same for me App working fine on 4.0.1 and not anymore on 4.0.2 It's seems that version 4.0.2 has intruduced some new bugs.... it's a shame.

                  • 6. Re: Fibo Tutorial on JBoss 4.0.2
                    joe yan Newbie

                    I worked on jboss 3.2.7,but i have to change
                    ,who can tell me the reason.
                    Jboss 4.0.2 not work.

                    • 7. Re: Fibo Tutorial on JBoss 4.0.2
                      Andriniaina Rakotomalala Newbie

                      Has somebody found a solution for 4.0.2 ?

                      • 8. Re: Fibo Tutorial on JBoss 4.0.2
                        Frédéric EECKHOUT Newbie


                        I'm using JBoss 4.0.2 and the last JBoss-IDE for Eclipse.
                        And this Fibo Tutorial doesn't work :
                        The EJB and Webapps deploy, but when I post to Fibo servlet, it gives me this exception :

                        root cause

                        What can I do ?


                        • 9. Re: Fibo Tutorial on JBoss 4.0.2
                          Frédéric EECKHOUT Newbie

                          This happen only with 4.0.2 !
                          Is there a BUG ? or what do we have to change ?


                          • 10. Re: Fibo Tutorial on JBoss 4.0.2
                            Stephane Some Newbie

                            I have the same problem here with 4.0.2.


                            • 11. Re: Fibo Tutorial on JBoss 4.0.2
                              Frédéric EECKHOUT Newbie

                              The solution I know, and what I have done, is to use the version 4.0.1 !

                              Good luck ;-)


                              • 12. Re: Fibo Tutorial on JBoss 4.0.2
                                a a Newbie

                                Very strange. I'm running jboss 4.0.2.
                                First I have tried to implement the tutorial by myself.. and guess what! i stuck at he same look up problem.

                                Then after hours of debugging, I just downloaded the tutorial example and imported it in the workspace. It worked!

                                I just dont know what to do, I have checked everything, it is almoast exatly the same project, but it doesnt work =(((

                                May be jboss-people can give us some tips.

                                • 13. Re: Fibo Tutorial on JBoss 3.7
                                  werewr wewrer Newbie

                                  cannot get it to work even in 3.2.x

                                  • 14. Re: Fibo Tutorial on JBoss 4.0.2
                                    werewr wewrer Newbie

                                    error: javax.servlet.ServletException: Lookup of java:/comp/env/ failed
                                    open source: jboss 3.2.x eclipse
                                    j2ee1.4 and eclipse 3.0

                                    jboss web.xml


                                    <display-name>Computation servlet</display-name>
                                    <![CDATA[Servlet that compute fibonacci suite]]>

                                    <ejb-ref >
                                    <![CDATA[Reference to the Fibo EJB]]>

                                    1 2 3 Previous Next