Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 57139 invoked from network); 1 Mar 2005 20:11:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 1 Mar 2005 20:11:29 -0000 Received: (qmail 24739 invoked by uid 500); 1 Mar 2005 20:11:25 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 24702 invoked by uid 500); 1 Mar 2005 20:11:25 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 24689 invoked by uid 99); 1 Mar 2005 20:11:25 -0000 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from smtp105.mail.sc5.yahoo.com (HELO smtp105.mail.sc5.yahoo.com) (66.163.169.225) by apache.org (qpsmtpd/0.28) with SMTP; Tue, 01 Mar 2005 12:11:24 -0800 Received: from unknown (HELO ?192.168.1.5?) (david?jencks@66.93.38.137 with plain) by smtp105.mail.sc5.yahoo.com with SMTP; 1 Mar 2005 20:11:22 -0000 Mime-Version: 1.0 (Apple Message framework v619.2) In-Reply-To: References: Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: David Jencks Subject: Re: Deployment EJB with Mail Resource References Date: Tue, 1 Mar 2005 12:11:20 -0800 To: dev@geronimo.apache.org X-Mailer: Apple Mail (2.619.2) X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N It looks like despite all the work on mail lately no one remembered to put a mail gbean in the j2ee-server-plan.xml or anywhere else. Adding something like this to your app plan or j2ee-server-plan.xml should help: mail.smtp.host=mail.apache.com thanks david jencks On Mar 1, 2005, at 11:39 AM, Mark wrote: > Hello, > > I tried to deploy a simple ejb with a javax.mail.Session Resource-ref, > but it fails with the error message below. (Also see deployment > descriptor below) > > Are there any documents that describe how to configure (pre > deployment, post deployment) a mail session so it can be wired to a > resource ref? > > Thanks. > Mark > > JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd"> > > > Mail > > > Mail > examples.MailHome > examples.Mail > examples.MailLocalHome > examples.MailLocal > examples.MailBean > Stateless > Container > > A description for ResourceRefName > mail/mymailserver > javax.mail.Session > Container > Shareable > > > > > > > Deployment failed > Server reports: org.apache.geronimo.common.DeploymentException: > Unknown > or ambiguous resource name query: geronimo.ser > ver: > j2eeType=JavaMailResource,J2EEServer=geronimo,J2EEApplication=null,name > =mail/mymailserver,* > match count: 0 > org.apache.geronimo.kernel.InternalKernelException: > org.apache.geronimo.common.DeploymentException: Unknown or ambiguous > resource name query: > geronimo.server: > j2eeType=JavaMailResource,J2EEServer=geronimo,J2EEApplication=null,name > =mail/mymai > lserver,* match count: 0 > at > org.apache.geronimo.kernel.jmx.KernelDelegate.invoke(KernelDelegate.jav > a:232) > at > org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDep > loy(AbstractDeployCommand.java:92) > at > org.apache.geronimo.deployment.plugin.local.DistributeCommand.run(Distr > ibuteCommand.java:71) > at java.lang.Thread.run(Thread.java:534) > Caused by: org.apache.geronimo.common.DeploymentException: Unknown or > ambiguous resource name query: geronimo.server:j2e > eType=JavaMailResource,J2EEServer=geronimo,J2EEApplication=null,name=ma > il/mymailserver,* > match count: 0 > at > org.apache.geronimo.j2ee.deployment.RefContext.locateUniqueName(RefCont > ext.java:444) > at > org.apache.geronimo.j2ee.deployment.RefContext.getConnectionFactoryCont > ainerId(RefContext.java:280) > at > org.apache.geronimo.naming.deployment.ENCConfigBuilder.getResourceConta > inerId(ENCConfigBuilder.java:219) > at > org.apache.geronimo.naming.deployment.ENCConfigBuilder.addResourceRefs( > ENCConfigBuilder.java:201) > at > org.apache.geronimo.naming.deployment.ENCConfigBuilder.buildComponentCo > ntext(ENCConfigBuilder.java:677) > at > org.openejb.deployment.SessionBuilder.processEnvironmentRefs(SessionBui > lder.java:143) > at > org.openejb.deployment.SessionBuilder.addEJBContainerGBean(SessionBuild > er.java:227) > at > org.openejb.deployment.SessionBuilder.buildBeans(SessionBuilder.java: > 158) > at > org.openejb.deployment.OpenEJBModuleBuilder.addGBeans(OpenEJBModuleBuil > der.java:489) > at > org.openejb.deployment.OpenEJBModuleBuilder$$FastClassByCGLIB$$11bd7b20 > .invoke() > at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53) > at > org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodIn > voker.java:38) > at > org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation. > java:118) > at > org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.ja > va:710) > at > org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57) > at > org.apache.geronimo.kernel.proxy.RawOperationInvoker.invoke(RawOperatio > nInvoker.java:36) > at > org.apache.geronimo.kernel.proxy.ProxyMethodInterceptor.intercept(Proxy > MethodInterceptor.java:92) > at > org.apache.geronimo.j2ee.deployment.ModuleBuilder$$EnhancerByCGLIB$$380 > f6faf.addGBeans() > at > org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration > (EARConfigBuilder.java:351) > at > org.apache.geronimo.j2ee.deployment.EARConfigBuilder$$FastClassByCGLIB$ > $38e56ec6.invoke() > at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53) > at > org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodIn > voker.java:38) > at > org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation. > java:118) > at > org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.ja > va:710) > at > org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57) > at > org.apache.geronimo.kernel.proxy.RawOperationInvoker.invoke(RawOperatio > nInvoker.java:36) > at > org.apache.geronimo.kernel.proxy.ProxyMethodInterceptor.intercept(Proxy > MethodInterceptor.java:92) > at > org.apache.geronimo.deployment.ConfigurationBuilder$$EnhancerByCGLIB$$6 > 61d6fa5.buildConfiguration( > ) > at > org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:172) > at > org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:85) > at > org.apache.geronimo.deployment.Deployer$$FastClassByCGLIB$$734a235d.inv > oke() > at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53) > at > org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodIn > voker.java:38) > at > org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation. > java:118) > at > org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.ja > va:745) > at org.apache.geronimo.kernel.Kernel.invoke(Kernel.java:299) > at > org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:121) > at > org.apache.geronimo.kernel.KernelGBean$$FastClassByCGLIB$$1cccefc9.invo > ke() > at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53) > at > org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodIn > voker.java:38) > at > org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation. > java:118) > at > org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.ja > va:745) > at org.apache.geronimo.kernel.Kernel.invoke(Kernel.java:299) > at > org.apache.geronimo.kernel.jmx.MBeanServerDelegate.invoke(MBeanServerDe > legate.java:117) > at > mx4j.remote.rmi.RMIConnectionInvoker.invoke(RMIConnectionInvoker.java: > 219) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja > va:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso > rImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at > mx4j.remote.rmi.RMIConnectionProxy.invoke(RMIConnectionProxy.java:34) > at > mx4j.remote.rmi.RMIConnectionSubjectInvoker.chain(RMIConnectionSubjectI > nvoker.java:99) > at > mx4j.remote.rmi.RMIConnectionSubjectInvoker.access$000(RMIConnectionSub > jectInvoker.java:31) > at > mx4j.remote.rmi.RMIConnectionSubjectInvoker$1.run(RMIConnectionSubjectI > nvoker.java:90) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAsPrivileged(Subject.java:500) > at > mx4j.remote.MX4JRemoteUtils.subjectInvoke(MX4JRemoteUtils.java:163) > at > mx4j.remote.rmi.RMIConnectionSubjectInvoker.subjectInvoke(RMIConnection > SubjectInvoker.java:86) > at > mx4j.remote.rmi.RMIConnectionSubjectInvoker.invoke(RMIConnectionSubject > Invoker.java:80) > at $Proxy0.invoke(Unknown Source) > at > javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl. > java:221) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja > va:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso > rImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at > sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261) > at sun.rmi.transport.Transport$1.run(Transport.java:148) > at java.security.AccessController.doPrivileged(Native Method) > at sun.rmi.transport.Transport.serviceCall(Transport.java:144) > at > sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java: > 460) > at > sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.j > ava:701) > ... 1 more > > Here's the deployment descriptor for the bean. > >