Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 46631 invoked from network); 1 Apr 2009 00:47:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 Apr 2009 00:47:19 -0000 Received: (qmail 96402 invoked by uid 500); 1 Apr 2009 00:47:18 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 96326 invoked by uid 500); 1 Apr 2009 00:47:18 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 96318 invoked by uid 99); 1 Apr 2009 00:47:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Apr 2009 00:47:18 +0000 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Apr 2009 00:47:09 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1LoobP-000851-KL for user@geronimo.apache.org; Tue, 31 Mar 2009 17:46:47 -0700 Message-ID: <22817752.post@talk.nabble.com> Date: Tue, 31 Mar 2009 17:46:47 -0700 (PDT) From: =?UTF-8?Q?Antonio_Forni=C3=A9?= To: user@geronimo.apache.org Subject: Basic EJB app structure MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: sitaronocturnal@gmail.com X-Virus-Checked: Checked by ClamAV on apache.org Hello! First of all, I've been looking for a similar post but surprisingly I didn't find anything, so I hope I'm not asking something that it's been answered before. I'm creating a basic JEE5 app with Eclipse plugin. It all works well until I try to use an EJB. I've created a Dynamic Web Project, then a EJB Project and finally an Enterprise Application Project in which I've included the other two. It compiles without problems. But when I start Geronimo, and it seems everything is gone ok and the server is running it says: Geronimo startup complete 00:10:32,500 INFO [config] Configuring Service(id=Default Stateless Container, type=Container, provider-id=Default Stateless Container) 00:10:32,500 INFO [config] Configuring Service(id=Default Stateful Container, type=Container, provider-id=Default Stateful Container) 00:10:32,500 INFO [config] Configuring Service(id=Default BMP Container, type=Container, provider-id=Default BMP Container) 00:10:32,500 INFO [config] Configuring Service(id=Default CMP Container, type=Container, provider-id=Default CMP Container) 00:10:32,500 INFO [config] Configuring app: default/GeronimoEA/1.0/car 00:10:32,703 INFO [OpenEJB] Auto-deploying ejb Calculator: EjbDeployment(deployment-id=GeronimoEJB.jar/Calculator) 00:10:32,718 INFO [config] Loaded Module: default/GeronimoEA/1.0/car 00:10:33,609 WARN [startup] Unresolved ejb reference "com.redondel.servlet.CalcServlet/calculator" in bean "GeronimoEnc". Will attempt resolution again at runtime. 00:10:33,703 WARN [startup] Unresolved ejb reference "com.redondel.servlet.CalcServlet/calculator" in bean "GeronimoEnc". Will attempt resolution again at runtime. 00:10:33,921 ERROR [Deployer] Deployment failed due to java.io.IOException: Unable to serialize GBeanData for default/GeronimoEA/1.0/car?J2EEApplication=default/GeronimoEA/1.0/car,j2eeType=WebModule,name=GeronimoWEB.war at org.apache.geronimo.kernel.config.SerializedGBeanState.storeGBeans(SerializedGBeanState.java:145) at org.apache.geronimo.kernel.config.SerializedGBeanState.writeObject(SerializedGBeanState.java:92) 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 java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) at java.util.HashMap.writeObject(Unknown Source) at sun.reflect.GeneratedMethodAccessor114.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) at org.apache.geronimo.kernel.config.SerializedConfigurationMarshaler.writeConfigurationData(SerializedConfigurationMarshaler.java:66) at org.apache.geronimo.kernel.config.ConfigurationUtil.writeConfigurationData(ConfigurationUtil.java:216) at org.apache.geronimo.system.configuration.ExecutableConfigurationUtil.writeConfiguration(ExecutableConfigurationUtil.java:155) at org.apache.geronimo.system.configuration.RepositoryConfigurationStore.install(RepositoryConfigurationStore.java:338) at org.apache.geronimo.deployment.Deployer.install(Deployer.java:348) at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:256) 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.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$200(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.GeneratedMethodAccessor111.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.run0(Unknown Source) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.io.IOException: Unable to write attribute: componentContext in gbean: default/GeronimoEA/1.0/car?J2EEApplication=default/GeronimoEA/1.0/car,j2eeType=WebModule,name=GeronimoWEB.war at org.apache.geronimo.gbean.GBeanData.writeExternal(GBeanData.java:214) at org.apache.geronimo.kernel.config.SerializedGBeanState.storeGBeans(SerializedGBeanState.java:143) ... 73 more Caused by: java.io.NotSerializableException: org.apache.openejb.assembler.classic.JndiEncBuilder$Ref at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) at java.util.HashMap.writeObject(Unknown Source) at sun.reflect.GeneratedMethodAccessor114.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) at org.apache.geronimo.gbean.GBeanData.writeExternal(GBeanData.java:212) ... 74 more My code is very simple: public class CalcServlet extends HttpServlet{ @EJB Calculator calculator; @Override public void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { doGet(req, resp); } @Override public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { int res = this.calculator.sum(10, 6); req.setAttribute("RES", res); this.getServletContext().getRequestDispatcher("/res.jsp").forward(req, resp); } } ... @Stateless public class Calculator implements CalculatorLocal, CalculatorRemote{ public int sum(int a, int b){ return a + b; } } ... @Local public interface CalculatorLocal { public int sum(int a, int b); } ... @Remote public interface CalculatorRemote { public int sum(int a, int b); } Thank you very much!! -- View this message in context: http://www.nabble.com/Basic-EJB-app-structure-tp22817752s134p22817752.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.