1 2 Previous Next 16 Replies Latest reply on Oct 30, 2002 9:46 AM by Jussi Pöri

    Error on redebloying ejb

    Jussi Pöri Newbie

      Hi!

      I use jboss 3.0.3 with apache. Every time I try to redeploy ejb jar file, it fails. Error message is "nosuchMethod" as there is no "removeHome()" method.
      Where I should implement it?
      I didn't find anything about this from documents.

      -jussi

        • 1. Re: Error on redebloying ejb
          Juha Lindfors Master

          what is the full error stack trace? (from server.log)

          • 2. Re: Error on redebloying ejb
            Jussi Pöri Newbie

            2002-10-24 09:52:39,812 WARN [org.jboss.system.ServiceController] (Logger.java:warn:176) Problem creating service jboss.j2ee:jndiName=Moderator,service=EJB
            java.lang.NoSuchMethodException: removeHome
            at java.lang.Class.getMethod0(Class.java:1742)
            at java.lang.Class.getMethod(Class.java:951)
            at org.jboss.ejb.StatelessSessionContainer.setupHomeMapping(StatelessSessionContainer.java:457)
            at org.jboss.ejb.StatelessSessionContainer.create(StatelessSessionContainer.java:165)
            at org.jboss.ejb.Container.invoke(Container.java:752)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
            at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
            at $Proxy5.create(Unknown Source)
            at org.jboss.system.ServiceController.create(ServiceController.java:315)
            at sun.reflect.GeneratedMethodAccessor45.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
            at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
            at $Proxy61.create(Unknown Source)
            at org.jboss.ejb.EjbModule.createService(EjbModule.java:386)
            at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:136)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
            at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
            at $Proxy5.create(Unknown Source)
            at org.jboss.system.ServiceController.create(ServiceController.java:315)
            at org.jboss.system.ServiceController.create(ServiceController.java:243)
            at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
            at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
            at $Proxy9.create(Unknown Source)
            at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:376)
            at org.jboss.deployment.MainDeployer.create(MainDeployer.java:755)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:615)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:580)
            at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
            at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
            at $Proxy4.deploy(Unknown Source)
            at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:427)
            at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:553)
            at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:212)
            at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:225)
            at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:202)

            • 3. Re: Error on redebloying ejb
              Juha Lindfors Master

              Are you declaring that method (removeHome) in your bean's home interface? if so, why is it there?

              • 4. Re: Error on redebloying ejb
                Jussi Pöri Newbie

                I don't declare it. That why I'm thinking, if I should. I think that container try's to use this method but it doesn't find it from bean.

                • 5. Re: Error on redebloying ejb
                  Jussi Pöri Newbie

                  I don't declare it. That why I'm thinking, if I should. I think that container try's to use this method but it doesn't find it from bean.

                  • 6. Re: Error on redebloying ejb
                    Juha Lindfors Master

                    No you shouldn't need to. The remove() methods are already part of the EJBObject and EJBHome interfaces, and SessionBean declares the ejbRemove() method.

                    There's something else going wrong with that deployment. Is the server log showing any other errors?

                    • 7. Re: Error on redebloying ejb
                      Jussi Pöri Newbie

                      I found these from the log file. (I replaced the package name with *).

                      2002-10-15 13:37:39,937 INFO [org.jboss.ejb.EJBDeployer] (Logger.java:149)
                      Bean : *.*.ejb.mods.Moderator
                      Section: 6.5.1
                      Warning: Session bean does not implement the required SessionBean interface.

                      2002-10-15 13:37:39,968 INFO [org.jboss.ejb.EJBDeployer] (Logger.java:149)
                      Bean : *.*.ejb.mods.Moderator
                      Section: 6.10.6
                      Warning: A session bean's home interface must extend the javax.ejb.EJBHome interface.

                      2002-10-15 13:37:39,984 INFO [org.jboss.ejb.EJBDeployer] (Logger.java:149)
                      Bean : *.*.ejb.mods.Moderator
                      Method : public abstract Moderator create() throws CreateException, RemoteException
                      Section: 6.10.6
                      Warning: The throws clause of a create(...) method must include the javax.ejb.CreateException.

                      2002-10-15 13:37:40,015 INFO [org.jboss.ejb.EJBDeployer] (Logger.java:149)
                      Bean : *.*.ejb.mods.Moderator
                      Section: 6.10.5
                      Warning: The remote interface must extend the javax.ejb.EJBObject interface.

                      But these are from the ejb files.
                      Remote:
                      public interface Moderator extends EJBObject

                      Home:
                      public interface ModeratorHome extends EJBHome {
                      public Moderator create() throws RemoteException, CreateException;
                      }

                      Bean:
                      public class ModeratorBean implements SessionBean

                      I think that these should be ok.

                      -jussi

                      • 8. Re: Error on redebloying ejb
                        Juha Lindfors Master

                        You definitely need to fix those verifier warnings before your deployment will work. Check your sources again and make sure you're deploying the correct package with modified classes.

                        • 9. Re: Error on redebloying ejb
                          Jussi Pöri Newbie

                          But why it works after restart? If the packages are wrong it should give some errors when starting the server.

                          • 10. Re: Error on redebloying ejb
                            Juha Lindfors Master

                            It does give errors, the one's you just posted.

                            • 11. Re: Error on redebloying ejb
                              Jussi Pöri Newbie

                              not in restart. those error comes only when I'm debloying the ejb file(copy the ejb file to debloy folder).

                              • 12. Re: Error on redebloying ejb
                                Juha Lindfors Master

                                doesn't matter

                                once you fix the problems verifier describes, your bean will work properly

                                • 13. Re: Error on redebloying ejb
                                  Jussi Pöri Newbie

                                  What is the difference in javax.ejb.EJBLocalHome and
                                  javax.ejb.EJBHome? Could this be the problem, that I'm using EJBHome?

                                  -jussi

                                  • 14. Re: Error on redebloying ejb
                                    Juha Lindfors Master

                                    Local interfaces are used for beans that are only accessible within the container, in form of bean to bean calls. They cannot be invoked remotely. For instance, an invocation from a client running on a separate process will not work if the bean only exposes a local interface of itself.

                                    EJBLocalHome is an interface for the home proxy that is only available for other beans in that same container. If you need to lookup the home proxy from outside the container you need to declare an EJBHome interface (which itself extends java.rmi.Remote interface).


                                    1 2 Previous Next