-
1. Re: Error on redebloying ejb
juha Oct 21, 2002 11:51 AM (in response to jussi_po)what is the full error stack trace? (from server.log)
-
2. Re: Error on redebloying ejb
jussi_po Oct 24, 2002 3:41 AM (in response to jussi_po)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 Oct 24, 2002 6:51 PM (in response to jussi_po)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_po Oct 27, 2002 7:58 AM (in response to jussi_po)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_po Oct 27, 2002 7:59 AM (in response to jussi_po)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 Oct 27, 2002 3:31 PM (in response to jussi_po)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_po Oct 28, 2002 2:32 AM (in response to jussi_po)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 Oct 28, 2002 3:48 AM (in response to jussi_po)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_po Oct 28, 2002 3:55 AM (in response to jussi_po)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 Oct 28, 2002 5:29 AM (in response to jussi_po)It does give errors, the one's you just posted.
-
11. Re: Error on redebloying ejb
jussi_po Oct 28, 2002 5:46 AM (in response to jussi_po)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 Oct 28, 2002 6:19 AM (in response to jussi_po)doesn't matter
once you fix the problems verifier describes, your bean will work properly -
13. Re: Error on redebloying ejb
jussi_po Oct 29, 2002 8:19 AM (in response to jussi_po)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 Oct 29, 2002 8:43 PM (in response to jussi_po)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).