javaeetutorial
  1. javaeetutorial
  2. JAVAEETUTORIAL-30

ejb/async example produces a runtime error related to lookup of Mail resource

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 6.0.6
    • Fix Version/s: 6.0.7
    • Component/s: examples
    • Labels:
      None

      Description

      The async app deploys, but when I try to send an email I get a runtime error.

      The problem is that it can't find the javamail resource:

      Lookup failed for 'java:comp/env/mail/myExampleSession'

      The mail-resource element in glassfish-resources.xml doesn't seem to create the resource at deployment, as it should. This seems to be another issue with 3.1.1 – I'm sure this used to work. I think I edited it correctly (password is Xed out):

      <mail-resource debug="false"
      enabled="true"
      from="username@example.com"
      host="mail.example.com"
      jndi-name="mail/myExampleSession"
      object-type="user" store-protocol="imap"
      store-protocol-class="com.sun.mail.imap.IMAPStore"
      transport-protocol="smtps"
      transport-protocol-class="com.sun.mail.smtp.SMTPSSLTransport"
      user="username@example.com">
      <description/>
      <property name="mail-smtps-auth" value="true"/>
      <property name="mail-smtps-password" value="xxxxxxxxxxxx"/>

        Activity

        Hide
        Ian Evans added a comment -

        Needs this to work in Ant:
        <target name="-pre-deploy" unless="netbeans.home" depends="init">
        <antcall target="add-resources"/>
        </target>

        Show
        Ian Evans added a comment - Needs this to work in Ant: <target name="-pre-deploy" unless="netbeans.home" depends="init"> <antcall target="add-resources"/> </target>
        Hide
        Ian Evans added a comment -

        Revision: 553
        Author: ievans
        Date: 2011-06-03 11:12
        Message: Added -pre-deploy target for Ant that will create the resource.
        Issue #JAVAEETUTORIAL-30 - ejb/async example produces a runtime error related to lookup of Mail resource

        Show
        Ian Evans added a comment - Revision: 553 Author: ievans Date: 2011-06-03 11:12 Message: Added -pre-deploy target for Ant that will create the resource. Issue # JAVAEETUTORIAL-30 - ejb/async example produces a runtime error related to lookup of Mail resource

          People

          • Assignee:
            Ian Evans
            Reporter:
            Ian Evans
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: