glassfish
  1. glassfish
  2. GLASSFISH-20771

Properties not copied from @MailSessionDefinition to the injected session

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0_b89_RC5
    • Fix Version/s: 4.0
    • Component/s: mail
    • Labels:
      None

      Description

      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)

        Activity

        Hide
        Bill Shannon added a comment -

        Checked in revision 62653 with fixes for this.

        Show
        Bill Shannon added a comment - Checked in revision 62653 with fixes for this.

          People

          • Assignee:
            Bill Shannon
            Reporter:
            arungupta
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: