Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 89563 invoked from network); 25 Jan 2007 19:32:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Jan 2007 19:32:27 -0000 Received: (qmail 53430 invoked by uid 500); 25 Jan 2007 19:32:26 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 53405 invoked by uid 500); 25 Jan 2007 19:32:26 -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 53394 invoked by uid 99); 25 Jan 2007 19:32:26 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Jan 2007 11:32:26 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of rickmcg@gmail.com designates 66.249.82.229 as permitted sender) Received: from [66.249.82.229] (HELO wx-out-0506.google.com) (66.249.82.229) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Jan 2007 11:32:16 -0800 Received: by wx-out-0506.google.com with SMTP id s18so566133wxc for ; Thu, 25 Jan 2007 11:31:55 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:reply-to:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=gzy8j+2773GbcebKzRBawflJA3hKIruWCtjlgZnqZ4w7kT/9aKAeYAXPwfWh5qKfpfNyXkxe+PPAu499MlgB/qPY043CmR72H12MmyM46BZ+QeTbzenoUvqA6hwKyLQaTN7ZY2cChukBOHkUCIRmHusfU3jr/N1EYm+DjCXxEpg= Received: by 10.70.29.7 with SMTP id c7mr4349987wxc.1169753515329; Thu, 25 Jan 2007 11:31:55 -0800 (PST) Received: from ?192.168.1.101? ( [68.191.49.248]) by mx.google.com with ESMTP id h10sm2971247wxd.2007.01.25.11.31.53; Thu, 25 Jan 2007 11:31:53 -0800 (PST) Message-ID: <45B905AE.5030600@gmail.com> Date: Thu, 25 Jan 2007 14:31:58 -0500 From: Rick McGuire Reply-To: rickmcg@gmail.com User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: user@geronimo.apache.org Subject: Re: geronimo mail 1.1.1 References: <8563115.post@talk.nabble.com> <5F2F6B01-72B1-42AB-BF8A-E1F8D732A3FA@yahoo.com> <8624375.post@talk.nabble.com> <45B8CB0D.9030901@gmail.com> <8639304.post@talk.nabble.com> In-Reply-To: <8639304.post@talk.nabble.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Michael C. wrote: > Thank you for your replies, they are greatly appreciated. I would like to > step back for a moment and be sure i understand the big picture. > > When our team first changed over from WSAD to MyEclipse and decided to use > Geronimo 1.0 as our local app server, we ran into this same email problem. > I found that there were some email bugs in the Geronimo 1.0 version, and > that you had to use the geronimo-mail.jar and the > geronimo-javamail-transport.jar files, and configure geronimo thru a GBEAN > to use these jars to fix the email issue. Maybe already, my understanding > was incorrect but this did fix the issue. > > We just upgraded to geronimo 1.1.1 and re-introduced the same email issue. > I have read where this email issue was fixed with 1.1.1. But without any > changes, we still throw errors. When i deployed the new email plan(in my > earlier threads), we still throw errors. So i have a couple questions... > > Since our application code uses the javax.mail.* packages, it would be best > to configure geronimo to use these packages for email. To be honest, if > this is fixed with 1.1.1, then why are there still geronimo version email > packages in the new install? > > Our intent would certainly be to use the mail packages from Sun since this > is the .jar file used in our app and our WebSphere production server. Is it > an option to configure Geronimo to use this mail.jar file and if so, how do > we go about doing it? > Geronimo comes with its own implementation of the javax.mail.* apis and it's own transport implementation. The javax.mail APIs are used by other components (e.g., Axis) so they are pretty fundamental to Geronimo operations and show up in a lot of dependencies. Unfortunately, part of javamail processing is locating and loading all transport implementations contained in jars on the classpath. If both the sun jar and the geronimo jars are present, then both sets of transports get loaded and depending on the search order, the default transports can end up being the Sun versions. This appears to be what's happening in this case. My recommendation is to just use the geronimo jar files, and remove the Sun versions. The setup is very similar to the previous release. You only actually need to configure a GBean if you're using a mail resource. If you're just directly using the mail apis, you only need to add the jar files to your dependency list. Rick > Rick McGuire wrote: > >> The message about unable to relay for that address is sent back from the >> SMTP server. I'm not sure what it didn't like, but it appears it >> couldn't figure out where to relay the message. >> >> The part I find interesting is the stack trace. You're using the Sun >> javamail transport implementation, not the Geronimo one. The API code >> (javax.mail.* appears to be the Geronimo version). Is that what you >> intended? I know we've never tested that combo, so it's unclear how >> well that would work. You might want to check around for a spurious >> mail.jar file. Having that in your classpath can potentially cause the >> other transports to get registered and override the Geronimo ones. >> >> Rick >> >> >> Michael C. wrote: >> >>> I tried your approach and that particular error went away but now i >>> believe i >>> am back to the root cause of all this effort; our email logic is throwing >>> an >>> error on this line in our application: >>> >>> javax.mail.Transport.send(message); >>> >>> Message=Could not send eMail to address someaddress@somewhere.com <;> >>> Thread=Thread[AmicaWebApp--TP-Processor3,5,main] <;> Original >>> Exception=javax.mail.SendFailedException: Invalid Addresses >>> (javax.mail.SendFailedException: 550 5.7.1 Unable to relay for >>> someaddress@somewhere.com >>> >>> ):Invalid Addresses (javax.mail.SendFailedException: 550 5.7.1 Unable to >>> relay for someaddress@somewhere.com >>> >>> Thu Jan 25 09:28:14 EST 2007 <;> Message=Could not send eMail to address >>> someaddress@somewhere.com<;> >>> Thread=Thread[AmicaWebApp--TP-Processor3,5,main] <;> Original >>> Exception=javax.mail.SendFailedException: Invalid Addresses >>> (javax.mail.SendFailedException: 550 5.7.1 Unable to relay for >>> someaddress@somewhere.com >>> >>> ):Invalid Addresses (javax.mail.SendFailedException: 550 5.7.1 Unable to >>> relay for someaddress@somewhere.com >>> >>> ) :Could not send eMail to address someaddress@somewhere.com >>> javax.mail.SendFailedException: Invalid Addresses >>> (javax.mail.SendFailedException: 550 5.7.1 Unable to relay for >>> someaddress@somewhere.com >>> >>> ) >>> at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:804) >>> at >>> com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:320) >>> at javax.mail.Transport.send(Transport.java:93) >>> at javax.mail.Transport.send(Transport.java:46) >>> >>> Caused by: javax.mail.SendFailedException: 550 5.7.1 Unable to relay for >>> someaddress@somewhere.com >>> at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:672) >>> >>> I supplemented the real address but we are using a good address. This >>> error >>> only occurs in our local testing using Geronimo but once we move our code >>> to >>> the next tier where WebSphere is running, everything works fine. There >>> is a >>> configuration issue that i do not understand. >>> >>> >>> djencks wrote: >>> >>> >>>> It looks to me as if the error message is fairly clear about the >>>> first think that is wrong with your xml.... >>>> >>>> >>>> MailSession >>>> javax.mail.Session >>>> Container >>>> Shareable >>>> >>>> mail/MailSession >>>> >>>> >>>> >>>> >>>> >>>>> Caused by: org.apache.xmlbeans.XmlException: Invalid deployment >>>>> descriptor: >>>>> [error: cvc-complex-type.2.4a: Expected element >>>>> 'ref-name@http://geronimo.apache.org/xml/ns/naming-1.1' instead of >>>>> 'property@http://geronimo.apache.org/xml/ns/naming-1.1' here in >>>>> element >>>>> resource-ref@http://geronimo.apache.org/xml/ns/naming-1.1, >>>>> >>>>> >>>> I think this will work: >>>> >>>> MailSession >>>> mail/MailSession >>>> >>>> >>>> and I also think that if you name the mail session the same in your >>>> app and your mail-server plan you won't need any entry in the >>>> geronimo-web.xml at all. >>>> >>>> thanks >>>> david jencks >>>> >>>> >>>> On Jan 24, 2007, at 7:57 AM, Michael C. wrote: >>>> >>>> >>>> >>>>> Our team has just upgraded from geronimo 1.0 to 1.1.1 >>>>> Previously, to surpress javamail errors, we had to create a gbean >>>>> and deploy >>>>> it, then add a resource-ref entry to our geronimo-web.xml file and >>>>> this >>>>> worked. >>>>> >>>>> Since our upgrade, we are back to our original javamail errors. I >>>>> found >>>>> entries on other postings here and successfully deployed the >>>>> following plan: >>>>> >>>>> >>>>> >>>>> >>>>> >>>> xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1"> >>>>> >>>>> geronimo >>>>> javamail-server >>>>> >>>>> >>>>> >>>>> >>>>> geronimo >>>>> geronimo-mail >>>>> 1.1.1 >>>>> jar >>>>> classes >>>>> >>>>> >>>>> geronimo >>>>> geronimo-javamail-transport >>>>> 1.1.1 >>>>> jar >>>>> classes >>>>> >>>>> >>>>> geronimo >>>>> rmi-naming >>>>> car >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>> class="org.apache.geronimo.mail.SMTPTransportGBean"> >>>>> our smtp remote host >>>>> 25 >>>>> >>>>> >>>> class="org.apache.geronimo.mail.MailGBean"> >>>>> smtp >>>>> true >>>>> >>>>> SMTPTransport >>>>> >>>>> >>>>> >>>>> >>>>> at this point, we need an entry in our geronimo-web.xml and so i >>>>> have added >>>>> this: >>>>> >>>>> >>>>> MailSession >>>>> javax.mail.Session >>>>> Container >>>>> Shareable >>>>> >>>>> mail/MailSession >>>>> >>>>> >>>>> >>>>> This entry throws the following error: >>>>> >>>>> 10:16:48,922 ERROR [Hot Deployer] Unable to deploy: xml problem for >>>>> web app >>>>> . >>>>> >>>>> org.apache.geronimo.common.DeploymentException: xml problem for web >>>>> app . >>>>> >>>>> at >>>>> org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.getTomcatWeb >>>>> App(TomcatModuleBuilder.java:234) >>>>> >>>>> at >>>>> org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.createModule >>>>> (TomcatModuleBuilder.java:158) >>>>> >>>>> at >>>>> org.apache.geronimo.web.deployment.AbstractWebModuleBuilder.createModu >>>>> le(AbstractWebModuleBuilder.java:121) >>>>> >>>>> at >>>>> org.apache.geronimo.web.deployment.AbstractWebModuleBuilder$ >>>>> $FastClassByCGLIB$$459e0cc.invoke() >>>>> >>>>> at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53) >>>>> >>>>> at >>>>> org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke >>>>> (FastMethodInvoker.java:38) >>>>> >>>>> at >>>>> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke >>>>> (GBeanOperation.java:122) >>>>> >>>>> at >>>>> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke >>>>> (GBeanInstance.java:817) >>>>> >>>>> at >>>>> org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java: >>>>> 57) >>>>> >>>>> at >>>>> org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke >>>>> (RawOperationInvoker.java:35) >>>>> >>>>> at >>>>> org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept >>>>> (ProxyMethodInterceptor.java:96) >>>>> >>>>> at >>>>> org.apache.geronimo.j2ee.deployment.ModuleBuilder$$EnhancerByCGLIB$ >>>>> $1f792348.createModule() >>>>> >>>>> at >>>>> org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.createModul >>>>> e(SwitchingModuleBuilder.java:94) >>>>> >>>>> at >>>>> org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder$ >>>>> $FastClassByCGLIB$$d0c31844.invoke() >>>>> >>>>> at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53) >>>>> >>>>> at >>>>> org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke >>>>> (FastMethodInvoker.java:38) >>>>> >>>>> at >>>>> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke >>>>> (GBeanOperation.java:122) >>>>> >>>>> at >>>>> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke >>>>> (GBeanInstance.java:817) >>>>> >>>>> at >>>>> org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java: >>>>> 57) >>>>> >>>>> at >>>>> org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke >>>>> (RawOperationInvoker.java:35) >>>>> >>>>> at >>>>> org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept >>>>> (ProxyMethodInterceptor.java:96) >>>>> >>>>> at >>>>> org.apache.geronimo.j2ee.deployment.ModuleBuilder$$EnhancerByCGLIB$ >>>>> $1f792348.createModule() >>>>> >>>>> at >>>>> org.apache.geronimo.j2ee.deployment.EARConfigBuilder.getDeploymentPlan >>>>> (EARConfigBuilder.java:275) >>>>> >>>>> 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 >>>>> (FastMethodInvoker.java:38) >>>>> >>>>> at >>>>> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke >>>>> (GBeanOperation.java:122) >>>>> >>>>> at >>>>> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke >>>>> (GBeanInstance.java:817) >>>>> >>>>> at >>>>> org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java: >>>>> 57) >>>>> >>>>> at >>>>> org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke >>>>> (RawOperationInvoker.java:35) >>>>> >>>>> at >>>>> org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept >>>>> (ProxyMethodInterceptor.java:96) >>>>> >>>>> at >>>>> org.apache.geronimo.deployment.ConfigurationBuilder$$EnhancerByCGLIB >>>>> $$2b662bba.getDeploymentPlan() >>>>> >>>>> at org.apache.geronimo.deployment.Deployer.deploy >>>>> (Deployer.java:232) >>>>> >>>>> at org.apache.geronimo.deployment.Deployer.deploy >>>>> (Deployer.java:124) >>>>> >>>>> at >>>>> org.apache.geronimo.deployment.Deployer$$FastClassByCGLIB$ >>>>> $734a235d.invoke() >>>>> >>>>> at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53) >>>>> >>>>> at >>>>> org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke >>>>> (FastMethodInvoker.java:38) >>>>> >>>>> at >>>>> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke >>>>> (GBeanOperation.java:122) >>>>> >>>>> at >>>>> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke >>>>> (GBeanInstance.java:852) >>>>> >>>>> at >>>>> org.apache.geronimo.kernel.basic.BasicKernel.invoke >>>>> (BasicKernel.java:239) >>>>> >>>>> at >>>>> org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDe >>>>> ploy(AbstractDeployCommand.java:106) >>>>> >>>>> at >>>>> org.apache.geronimo.deployment.plugin.local.DistributeCommand.run >>>>> (DistributeCommand.java:60) >>>>> >>>>> at java.lang.Thread.run(Thread.java:534) >>>>> >>>>> Caused by: org.apache.xmlbeans.XmlException: Invalid deployment >>>>> descriptor: >>>>> [error: cvc-complex-type.2.4a: Expected element >>>>> 'ref-name@http://geronimo.apache.org/xml/ns/naming-1.1' instead of >>>>> 'property@http://geronimo.apache.org/xml/ns/naming-1.1' here in >>>>> element >>>>> resource-ref@http://geronimo.apache.org/xml/ns/naming-1.1, error: >>>>> cvc-complex-type.2.4a: Expected element >>>>> 'ref-name@http://geronimo.apache.org/xml/ns/naming-1.1' instead of >>>>> 'res-type@http://geronimo.apache.org/xml/ns/naming-1.1' here in >>>>> element >>>>> resource-ref@http://geronimo.apache.org/xml/ns/naming-1.1, error: >>>>> cvc-complex-type.2.4a: Expected element >>>>> 'ref-name@http://geronimo.apache.org/xml/ns/naming-1.1' instead of >>>>> 'res-auth@http://geronimo.apache.org/xml/ns/naming-1.1' here in >>>>> element >>>>> resource-ref@http://geronimo.apache.org/xml/ns/naming-1.1, error: >>>>> cvc-complex-type.2.4a: Expected element >>>>> 'ref-name@http://geronimo.apache.org/xml/ns/naming-1.1' instead of >>>>> 'res-sharing-scope@http://geronimo.apache.org/xml/ns/naming-1.1' >>>>> here in >>>>> element resource-ref@http://geronimo.apache.org/xml/ns/naming-1.1, >>>>> error: >>>>> cvc-complex-type.2.4a: Expected element >>>>> 'ref-name@http://geronimo.apache.org/xml/ns/naming-1.1' instead of >>>>> 'pattern@http://geronimo.apache.org/xml/ns/naming-1.1' here in element >>>>> resource-ref@http://geronimo.apache.org/xml/ns/naming-1.1, error: >>>>> cvc-complex-type.2.4c: Expected element >>>>> 'ref-name@http://geronimo.apache.org/xml/ns/naming-1.1' before the >>>>> end of >>>>> the content in element >>>>> resource-ref@http://geronimo.apache.org/xml/ns/naming-1.1] >>>>> >>>>> Descriptor: >>>> xsi:schemaLocation="http://geronimo.apache.org/xml/ns/j2ee/web-1.1 >>>>> ../../../schemas/geronimo-web-1.1.xsd >>>>> http://geronimo.apache.org/xml/ns/naming-1.1 geronimo- >>>>> naming-1.1.xsd >>>>> http://geronimo..apache.org/xml/ns/security-1.1 >>>>> geronimo-security-1.1.xsd http://geronimo.apache.org/xml/ns/ >>>>> deployment-1.1 >>>>> geronimo-module-1.1.xsd " >>>>> xmlns:geronimo="http://geronimo.apache.org/xml/ns/security-1.1" >>>>> xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.1" >>>>> xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.1" >>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >>>>> xmlns:tom="http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-1.1"> >>>>> >>>>> Can anyone provide assistance? Thanks in advance. >>>>> -- >>>>> View this message in context: http://www.nabble.com/geronimo- >>>>> mail-1.1.1-tf3081989.html#a8563115 >>>>> Sent from the Apache Geronimo - Users mailing list archive at >>>>> Nabble.com. >>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > >