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!
--
View this message in context:
http://www.nabble.com/Cannot-send-email-using-geronimo-default-email-session-tp18577933s134p18577933.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.