Issue Details (XML | Word | Printable)

Key: GLASSFISH-20771
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Bill Shannon
Reporter: arungupta
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
glassfish

Properties not copied from @MailSessionDefinition to the injected session

Created: 20/Aug/13 05:01 PM   Updated: 26/Aug/13 09:38 PM   Resolved: 26/Aug/13 09:38 PM
Component/s: mail
Affects Version/s: 4.0_b89_RC5
Fix Version/s: 4.0

Time Tracking:
Not Specified

Tags:
Participants: arungupta and Bill Shannon


 Description  « Hide

None of the properties from:

@MailSessionDefinition(name = "java:comp/myMailSession",
        properties = {
            "mail.smtp.host=smtp.gmail.com",
            "mail.smtp.ssl.enable=true",
            "mail.smtp.auth=true",
            "mail.transport.protocol=smtp",
            "mail.debug=true"
        })

are copied over to the injected session as:

@Resource(lookup = "java:comp/myMailSession")
    Session session;

Runtime throws the following exception:

INFO: enterprise.deployment_mail_cfgexcp
java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:542)
at com.sun.enterprise.deployment.MailConfiguration.loadMailResources(MailConfiguration.java:207)
at com.sun.enterprise.deployment.MailConfiguration.<init>(MailConfiguration.java:168)
at org.glassfish.resources.javamail.deployer.MailResourceDeployer.installMailResource(MailResourceDeployer.java:243)
at org.glassfish.resources.javamail.deployer.MailResourceDeployer.installResource(MailResourceDeployer.java:148)
at org.glassfish.resources.javamail.deployer.MailResourceDeployer.deployResource(MailResourceDeployer.java:119)
at org.glassfish.resources.javamail.deployer.MailResourceDeployer.deployResource(MailResourceDeployer.java:131)
at com.sun.enterprise.resource.deployer.MailSessionDeployer.deployResource(MailSessionDeployer.java:111)
at org.glassfish.javaee.services.CommonResourceProxy.create(CommonResourceProxy.java:88)



Bill Shannon added a comment - 26/Aug/13 09:38 PM

Checked in revision 62653 with fixes for this.