geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From YunFeng Ma <yunfeng...@yahoo.com>
Subject Re: Cannot send email using geronimo default email session
Date Tue, 22 Jul 2008 01:09:00 GMT
You are missing a dependency in your geronimo-web.xml:
-------------------------
        <dependencies>
            <dependency>
                <groupId>org.apache.geronimo.configs</groupId>
                <artifactId>javamail</artifactId>
                <type>car</type>
            </dependency>
        </dependencies>
-------------------------

You can download the send mail sample from: https://svn.apache.org/repos/asf/geronimo/samples/trunk/samples/sendmail/

Hope it helps.

-- Yun Feng

metamor wrote:
> I am following the instructions in the article: Using Geronimo's Default
> JavaMail Session
> the snipet for web.xml is as follows:
> 
>      <resource-ref>
>         <!-- Used in index.jsp -->
>         <res-ref-name>mail/fooMailSession</res-ref-name>
>         <res-type>javax.mail.Session</res-type>
>         <res-auth>Container</res-auth>
>         <res-sharing-scope>Shareable</res-sharing-scope>
>     </resource-ref>
> 
> geronimo-web.xml is:
> 
> <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1"
>          xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2"
>          xmlns:gernaming="http://geronimo.apache.org/xml/ns/naming-1.2"
>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>         
> xsi:schemaLocation="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1 ">
> 
>     <sys:environment>
> 
>         <sys:moduleId>
>             <sys:groupId>fooCorp</sys:groupId>
>             <sys:artifactId>testApp</sys:artifactId>
>             <sys:version>1.0</sys:version>
>             <sys:type>car</sys:type>
>         </sys:moduleId>
> 
>         <sys:hidden-classes>
>                <filter>org.apache.commons.lang</filter>
>                <filter>org.apache.commons.lang.builder</filter>
>                <filter>org.apache.commons.lang.enum</filter>
>                <filter>org.apache.commons.lang.exception</filter>
>                <filter>org.apache.commons.lang.math</filter>
>                <filter>org.apache.commons.lang.time</filter>
>                <filter>org.jaxen</filter>
>         </sys:hidden-classes>
>     </sys:environment>
>     <context-root>/foo</context-root>
>     <gernaming:resource-ref>
>          <!-- Used is web.xml -->
>          <gernaming:ref-name>mail/fooMailSession</gernaming:ref-name>
>           <!-- Default Geronimo mail session -->
>          <gernaming:resource-link>mail/MailSession</gernaming:resource-link>
>     </gernaming:resource-ref>
> 
> When I run the application I get the following error: 
> 
> org.apache.geronimo.common.DeploymentException: Unable to resolve resource
> reference 'mail/fooMailSession' (Could not find resource 'mail/MailSession'. 
> Perhaps it has not yet been configured, or your application does not have a
> dependency declared for that resource module?
> 
> </web-app>
> 
> Any help will be greatly appreciated!
> Thanks!


      
Mime
View raw message