geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tagma <krtago...@yahoo.com>
Subject Re: Distribution of module failed, Module was not an EJB: SampleEJB.jar
Date Fri, 24 Oct 2008 12:15:34 GMT

Hi Tim,
Thanks a lot. I added those two annotations and it worked out well. Its a
stupid mistake but when I created interface and ejb class, I thought it
would be automatically generated. 
Thanks Again.

Tim McConnell wrote:
> 
> Hi tagma, thanks for providing your workspace. Now I can immediately see
> the 
> problem. I'm curious though why you omitted the @Stateless and the @Remote 
> annotations in the EJB MyStatelessSessionBean and the
> RemoteBusinessInterface 
> java classes ?? If you add them exactly as specified in the tutorial it
> will 
> deploy and execute perfectly. I made those exact changes to the workspace
> you 
> sent and it now works correctly. Can you give this a try and see what
> happens ?? 
> So here is what your EJB classes should look like:
> 
> -----> MyStatelessSessionBean.java:
> 
> package sampleear;
> 
> import javax.ejb.Stateless;
> 
> @Stateless
> public class MyStatelessSessionBean implements RemoteBusinessInterface {
> 
>      public String sayHello(String name) {
>          return getClass().getName() + " says hello to " + name + ".";
>      }
> }
> 
> 
> -----> RemoteBusinessInterface.java:
> 
> package sampleear;
> 
> import javax.ejb.Remote;
> 
> @Remote
> public interface RemoteBusinessInterface {
>      public String sayHello(String name);
> }
> 
> Let me know what happens please. Thanks again.
> 
> 
> tagma wrote:
>> Hello Tim,
>> 
>> I removed my whole project and tried it again but got the same exception.
>> please find the below workspace attachment .
>> 
>> Thanks Again
>> Tagma
>> 
>> 
>> Tim McConnell wrote:
>>> Hi tagma, Nothing obvious is jumping out at me. I just went through the
>>> tutorial 
>>> myself and it worked great for me. Could you export your tutorial
>>> workspace and 
>>> either email it to me or attach it to this thread (it should be a very
>>> small 
>>> zipfile) ?? That way I can see better what is causing your problem.
>>> Thanks
>>> much
>>>
>>> tagma wrote:
>>>> Hi,
>>>>
>>>> I installed J2SE5, Eclipse EE 3.4,Geronimo 2.1.3 and geronimo eclipse
>>>> plug-in 2.1.3. I followed this 5 minute tutorial exactly.
>>>> http://cwiki.apache.org/GMOxDOC21/5-minute-tutorial-on-enterprise-application-development-with-eclipse-and-geronimo.html
>>>>
>>>> When I am trying to start the server ,getting below exception. Can
>>>> someone
>>>> help me out. 
>>>>
>>>> Distribution of module failed.  See log for details.
>>>>   Module was not an EJB: SampleEJB.jar
>>>>   org.apache.geronimo.common.DeploymentException: Module was not an
>>>> EJB:
>>>> SampleEJB.jar
>>>>   	at
>>>> org.apache.geronimo.j2ee.deployment.EARConfigBuilder.addModules(EARConfigBuilder.java:796)
>>>>   	at
>>>> org.apache.geronimo.j2ee.deployment.EARConfigBuilder.getEarPlan(EARConfigBuilder.java:402)
>>>>   	at
>>>> org.apache.geronimo.j2ee.deployment.EARConfigBuilder.getDeploymentPlan(EARConfigBuilder.java:295)
>>>>   	at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:226)
>>>>   	at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:133)
>>>>   	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>   	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>>>>   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>>>>   	at java.lang.reflect.Method.invoke(Unknown Source)
>>>>   	at
>>>> org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
>>>>   	at
>>>> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
>>>>   	at
>>>> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867)
>>>>   	at
>>>> org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
>>>>   	at
>>>> org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:342)
>>>>   	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>   	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>>>>   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>>>>   	at java.lang.reflect.Method.invoke(Unknown Source)
>>>>   	at
>>>> org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
>>>>   	at
>>>> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
>>>>   	at
>>>> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867)
>>>>   	at
>>>> org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
>>>>   	at
>>>> org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke(MBeanGBeanBridge.java:172)
>>>>   	at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(Unknown
>>>> Source)
>>>>   	at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(Unknown Source)
>>>>   	at
>>>> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown
>>>> Source)
>>>>   	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
>>>>   	at javax.management.remote.rmi.RMIConnectionImpl.doOperation(Unknown
>>>> Source)
>>>>   	at javax.management.remote.rmi.RMIConnectionImpl.access$100(Unknown
>>>> Source)
>>>>   	at
>>>> javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(Unknown
>>>> Source)
>>>>   	at java.security.AccessController.doPrivileged(Native Method)
>>>>   	at
>>>> javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(Unknown
>>>> Source)
>>>>   	at javax.management.remote.rmi.RMIConnectionImpl.invoke(Unknown
>>>> Source)
>>>>   	at sun.reflect.GeneratedMethodAccessor100.invoke(Unknown Source)
>>>>   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>>>>   	at java.lang.reflect.Method.invoke(Unknown Source)
>>>>   	at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
>>>>   	at sun.rmi.transport.Transport$1.run(Unknown Source)
>>>>   	at java.security.AccessController.doPrivileged(Native Method)
>>>>   	at sun.rmi.transport.Transport.serviceCall(Unknown Source)
>>>>   	at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
>>>>   	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown
>>>> Source)
>>>>   	at java.lang.Thread.run(Unknown Source)
>>>>
>>>>
>>>>
>>>> Thanks
>>>> tagma
>>> -- 
>>> Thanks,
>>> Tim McConnell
>>>
>>>
>> http://www.nabble.com/file/p20141771/Eclipse%2BEE%2BWorkspace.rar
>> Eclipse+EE+Workspace.rar 
> 
> -- 
> Thanks,
> Tim McConnell
> 
> 

-- 
View this message in context: http://www.nabble.com/Distribution-of-module-failed%2C-Module-was-not-an-EJB%3A-SampleEJB.jar-tp20117279s134p20148990.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Mime
View raw message