1 2 3 Previous Next 32 Replies Latest reply on Jul 21, 2006 5:56 AM by mad11max Go to original post
      • 15. Re: Fibo Tutorial on JBoss 4.0.2
        sandbergc9

        I have been chasing the same problem for a few days. I am still amazed at how J2EE apps are brought to their knees by a little typo in a xml file. Never the less, I had the same JNDI problem ejb/Fido ... I backed up to IDE 4.01sp1 same problem then I backed up to IDE 3.2.7. The tutorial worked! I edited the bean and it still worked , so I tried to run it in jboss4.0.2 and it works.

        I am using : jdk1.4.2_06
        eclipse 3.1.0
        jbosside 1.4.1

        Good Luck all

        • 16. Re: Fibo Tutorial on JBoss 4.0.2
          hopperda

          What was your problem...
          cant get mine to work even in 3.2.x and eclipse 3.0
          Shoule I get eclipse 3.1? I have posted my xml files
          in an earlier post

          Thanks

          • 17. Re: Fibo Tutorial on JBoss 4.0.2
            sandbergc9

            To Hopperda

            My xml files, look like yours and were generated by jbosside. I've tried all the suggestions to all the posts and I posted the action that seemed to work for me! I just wanted to learn to write EJB's not configure Eclipse and JBoss! I suppose that's what we're all trying to do!

            My error message was the same one that you posted, about ejb/fido not being recognized.

            Not that this helps, but. A few years ago when working on installing IBM's e-commerce and webshere, whenever we had an error during install, IBM's help desk would tell us to re-image(format) our hard drive. Yikes couln't they tell us which keys in the registry to erase?

            If I think of anything helpfull , I'll post it!

            • 18. Re: Fibo Tutorial on JBoss 4.0.2

              guys,

              This doesn't seem to be a bug. This is apparently related to the change in the classloader for the jboss-4.0.2, which is using servelet spec classloading (as opposed to jboss-4.0.1sp1 which uses a flat class loader) according to Adrian. refer to: http://jira.jboss.com/jira/browse/JBAS-1775.

              The solution is quite simple. there are two actually.

              1) Switch to 4.0.1sp1 (will always work).

              2) Remove the client.jar from the web app. in the packaging configuration.

              rgds,
              -kcs

              • 19. Re: Fibo Tutorial on JBoss 4.0.2

                guys,

                This doesn't seem to be a bug. This is apparently related to the change in the classloader for the jboss-4.0.2, which is using servelet spec classloading (as opposed to jboss-4.0.1sp1 which uses a flat class loader) according to Adrian. refer to: http://jira.jboss.com/jira/browse/JBAS-1775 .

                The solution is quite simple. there are two actually.

                - Remove the client.jar from the web app. in the packaging configuration.

                rgds,
                -kcs

                • 20. Re: Fibo Tutorial on JBoss 4.0.2
                  kampoo

                  Sure, I encounter the same problem on 4.0.2!

                  -Abel

                  • 21. Re: Fibo Tutorial on JBoss 4.0.2
                    darranl

                     

                    "kampoo" wrote:

                    Sure, I encounter the same problem on 4.0.2!

                    -Abel


                    And what happens when you do not package the client interfaces in the war file?

                    • 22. Re: Fibo Tutorial on JBoss 4.0.2
                      leo_de13

                      Hi All,

                      I initially faced the same problem with JBoss 4.0.2, EclipseIDE and java1.5. But the problem can be solved by just removing the FiboEJB-client.jar from FiboWeb.war, and then re-packaging and redeploying the FiboApp again!

                      May be this is happening because of multiple occurrence of the interfaces. But for local clients, we anyway need the client JAR...will nitofy here later if I get any solution about this client problem.

                      RHINO, u told that ur problem was not solved even after doing the same. But beleive me boss, it worked for me! So try it again, may be u forgot to repackage and redeploy the project again! I hope this information will help u people who were also pulling their hair like me to slove it...

                      Regards
                      Bikram

                      • 23. Re: Fibo Tutorial on JBoss 4.0.2
                        steverar

                        environment:
                        - OS X 10.4.2
                        - Eclipse 3.1
                        - JBoss 4.0.1
                        - JBoss IDE 1.5

                        1st problem and possible fix:
                        Could not deploy FiboAPP.ear due to "ejb-ref: no ejb-link in web.xml ... " error from JBoss.
                        Editted web.xml in WEB-INTF folder commenting out <ejb-ref> section.

                        DID NOT run XDoclet, deleted Fibo *.jar, *.war, *.ear files and ran Packaging.

                        Was able to deploy OK. Can see ejb/Fibo jndi name in JMX console.

                        2nd problem:
                        Go to http://localhost:8080/Fibo and get "Fibonacci Form" page, click "Compute" and get "javax.servlet.ServletException: Lookup of java:/comp/env/ failed"

                        I remove the include of FiboEJB-client.jar in the Packaging configuration, delete Fibo *.jar, *.war and *.ear and ran Packaging.

                        Get same error.

                        Any thoughts?

                        • 24. Re: Fibo Tutorial on JBoss 4.0.2
                          sandbergc9

                          To Steverar

                          I just redid the tutorial on a different computer! I ran into the same old problem: ejb/fido lookup error.

                          I followed the removal of the client, ear, war etc and repackaging!

                          However I still needed to stop JBoss, manually erase the deployed ear and the temp fido folders....

                          Then when I started JBoss and then deployed I got the fibo series in my browser!

                          Good Luck!

                          • 25. Re: Fibo Tutorial on JBoss 4.0.2
                            djulson

                            I have run into this problem before. The way I fixed it was to change the context lookup string from "java:comp/env/ejb/Fibo" removing the comp/env/ portion. Thus your lookup string is "java:ejb/Fibo." Also, when repackaging and redeploying in Eclipse, it seems that using the 'redeploy' feature actually just re-deploys the current .war/.ear file that is residing in JBoss already. It does not deploy your recently repackaged file. What I do here is to use the 'deploy-to' option and JBoss does the correct undeploy and redeploy using the correctly repackaged file.

                            Hope this helps.

                            • 26. Re: Fibo Tutorial on JBoss 4.0.2
                              djulson

                              Sorry, I should have mentioned this in my previous post.

                              I am using Eclipse 3.1M6 with Java 1.5 and JBoss AS 4.0.2.

                              • 27. Re: Fibo Tutorial on JBoss 4.0.2

                                just like everybody said.... remove interfaces from classes on your web app archive (war)...

                                • 28. Re: Fibo Tutorial on JBoss 4.0.2
                                  steverar

                                  I was having similar problems. I went over the tutorial in detail and found out the jboss-web.xml wasn't being "packaged" in the war.
                                  The tutorial runs fine, as is. I haven't removed the -client.jar file from packaging as suggested.

                                  One possible problem is the tutorial shows "java:/comp/env/..." in the compute servlet code. This should be "java:comp/env/..." notice no leading slash.

                                  Thanks for the postings.

                                  • 29. Re: Fibo Tutorial on JBoss 4.0.2
                                    josrra

                                    Hi there:

                                    I am having a similar problem. Can somebody helping me?
                                    I am using:
                                    Jdk1.5
                                    Jboss1.40.2
                                    Eclipse
                                    I am working on Windows Xp without problems, I have deployed my webApp here and works allright, but now that I try to run it on Linux Mandriva, i get the next excpetion:

                                    java.lang.ClassCastException
                                    11:56:40,396 ERROR [STDERR] at com.sun.corba.se.impl.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:229)
                                    11:56:40,397 ERROR [STDERR] at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
                                    11:56:40,397 ERROR [STDERR] at co.artona.service.ServiceLocator.getCareerHome(ServiceLocator.java:75)
                                    11:56:40,398 ERROR [STDERR] at co.artona.action.ShowCareersAction.execute(ShowCareersAction.java:31)
                                    11:56:40,398 ERROR [STDERR] at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
                                    11:56:40,398 ERROR [STDERR] at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
                                    11:56:40,398 ERROR [STDERR] at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
                                    11:56:40,399 ERROR [STDERR] at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
                                    11:56:40,399 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
                                    11:56:40,399 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
                                    11:56:40,400 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                                    11:56:40,400 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                                    11:56:40,401 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                                    11:56:40,401 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                                    11:56:40,401 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                                    11:56:40,401 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
                                    11:56:40,402 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
                                    11:56:40,402 ERROR [STDERR] at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:54)
                                    11:56:40,402 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:174)
                                    11:56:40,403 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
                                    11:56:40,403 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
                                    11:56:40,403 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
                                    11:56:40,404 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
                                    11:56:40,404 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
                                    11:56:40,404 ERROR [STDERR] at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
                                    11:56:40,405 ERROR [STDERR] at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
                                    11:56:40,405 ERROR [STDERR] at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:744)
                                    11:56:40,405 ERROR [STDERR] at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:674)
                                    11:56:40,405 ERROR [STDERR] at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:866)
                                    11:56:40,406 ERROR [STDERR] at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
                                    11:56:40,406 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
                                    11:56:40,407 ERROR [STDERR] Caused by: java.lang.ClassCastException: $Proxy68
                                    11:56:40,407 ERROR [STDERR] at com.sun.corba.se.impl.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:212)
                                    11:56:40,407 ERROR [STDERR] ... 30 more
                                    11:56:40,449 ERROR [STDERR] [WARN] RequestProcessor - Unhandled Exception thrown: class java.lang.NullPointerException
                                    11:56:40,451 ERROR [STDERR] [ERROR] [artonaGroup] - Servlet.service() for servlet artonaGroup threw exception <java.lang.NullPointerException>java.lang.NullPointerException
                                    at co.artona.action.ShowCareersAction.execute(ShowCareersAction.java:32)
                                    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
                                    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
                                    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
                                    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
                                    at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
                                    at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
                                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                                    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                                    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
                                    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
                                    at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:54)
                                    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:174)
                                    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
                                    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
                                    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
                                    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
                                    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
                                    at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
                                    at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
                                    at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:744)
                                    at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:674)
                                    at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:866)
                                    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
                                    at java.lang.Thread.run(Thread.java:595)

                                    It catches this here:

                                    Object objRef = ejbCtx.lookup(CodedNames.LASTCALL_HOME);
                                    LastCallHome fabrica = null;

                                    System.out.println( "****el objeto regresado es: " + objRef );
                                    System.out.println( "****y su nombre: " + objRef.getClass().getName() );

                                    try {
                                    fabrica = (LastCallHome)PortableRemoteObject.narrow( objRef, LastCallHome.class );
                                    if( fabrica != null ) System.out.println( "la fabrica se creo exitosamente" );
                                    }catch( ClassCastException cce ) {
                                    System.out.println("Couldn't create the ContactUs fabric");
                                    cce.printStackTrace();
                                    }

                                    Do somebody could help me? It works on Windows but not in linux!
                                    Thank you!