12 Replies Latest reply on May 19, 2003 12:35 AM by ashleycosta

    Jboss hot deploy issues

    vrkyeluru

      I make the changes to the existing ear file then Jboss automatically hot deploys it, after this happened, none of my funtionality is working as it is supposed to be. it keeps throwing ClassCastException whenever I call a method in an EJB until I restart the server. Any ideas?

        • 1. Re: Jboss hot deploy issues
          chrick

          I've just started experiencing this problem, too. If I do a restart it goes away, but any attempt to hot deploy a jar or ear file causes my first attempt to do a context lookup to get a home interface causes a ClassCastException. This started happening out of the blue on one machine I work on, so I switched to another - it took about an hour to start happening on that one as well. A bit mysterious! Anyone else having this, or have any suggestions?

          • 2. Re: Jboss hot deploy issues

            You're using PortableRemoteObject.narrow() in your code?

            • 3. Re: Jboss hot deploy issues
              chrick

              No, we are just casting since we're using local interfaces - but we tried it with the same results - ClassCastException. Only after a hot deploy, however...

              • 4. Re: Jboss hot deploy issues

                What version are you using? I have no problems (other than PRO.narrow()) when hot deploying beans with local interfaces -- however I redeploy the entire EAR file. Are you redeploying individual EJB jars? Are you caching references to home proxies in your code for instance?

                • 5. Re: Jboss hot deploy issues
                  chrick

                  We're using jboss-3.0.4_tomcat-4.0.6. We've tried deploying a jar (for a thick client application) and an ear (for a web app) with the same results. We are caching home references in our code, but the problem isn't on using the cached homes, but on getting the home the first time after a hot deploy - and that only for entity beans, which are local interfaces - the session facade for the entity works fine.

                  One interesting thing is that before attempting the cast or narrowing method we print out both the class and the class' hashCode to make sure we've actually got an instance of that class before trying to cast or narrow - on the initial (non-hot deploy) attempt they both say that the class name is the same, as is it's hashCode - on the second (hot deploy) attempt they have the same name but different hashCodes. Not sure what that means, but it might point to something....

                  • 6. Re: Jboss hot deploy issues
                    betaniik

                    Having a similar problem (which started off here):

                    http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t= luck since?

                    B

                    • 7. Re: Jboss hot deploy issues
                      betaniik

                      (Did post a me-too reply earlier but it seems to have disappeared.)

                      Has anyone come up with a solution?

                      B

                      • 8. Re: Jboss hot deploy issues
                        jaime

                        Hi,

                        I have the same problem when working with a EJB jar file and a WAR file for my webapp, but if I run a webserver outside of JBoss (i.e. JBoss runs only for EJB container and a tomcat/jetty webserver in other process) they work correct, the hot deploy wotk fine.

                        But if run ejb container and web container both inside a one jboss server, the system throws ClassCastException.


                        JaimeZ

                        • 9. Re: Jboss hot deploy issues

                          Redeploy the war when you redeploy the ejb,
                          it is holding a reference to ejb interfaces
                          from the previous deployment.

                          Regards,
                          Adrian

                          • 10. Re: Jboss hot deploy issues
                            regulus

                            I had the exact same problem with
                            jboss-3.0.4_tomcat-4.1.12

                            after upgraded to jboss-3.0.6_tomcat-4.1.18, the problem has gone away.

                            Hope it helps.

                            • 11. Re: Jboss hot deploy issues
                              regulus

                              I had the same problem with jboss-3.0.4_tomcat-4.1.12, but it seems to have gone away after I upgraded jboss to jboss-3.0.6_tomcat-4.1.18.

                              Hope it helps

                              • 12. Re: Jboss hot deploy issues
                                ashleycosta

                                Compile the source code of the JBOSS on your machine and then use it. Do not use the binary version