Email Notifications are not Sent without Valid IMAP Connection (Doc ID 1328504.1)

Last updated on NOVEMBER 04, 2016

Applies to:

Oracle WebCenter Portal - Version 11.1.1.4.0 and later
Information in this document applies to any platform.
Checked for relevance on 04-Jun-2015

Symptoms

Sending notification email fails without having a valid IMAP connection in WebCenter.
When setting up the SMTP-only Email connection as per the following note: <Note 1182383.1> - How To Create a SMTP Only Mail Connection?

Then there is no email sent for example when adding or removing a user to/from a Space and the following exception is logged into the WC_Spaces-diagnostic.log:

[2011-06-02T05:01:38.369-04:00] [WC_Spaces] [WARNING] [WCS-50020] [oracle.webcenter.notification.internal.spi.NotificationSenderFactory] [tid: [ACTIVE].ExecuteThread: '14' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: weblogic] [ecid: aa9e45ba14af69d8:7e2cdcab:1304f7f33e1:-8000-0000000000000b75,0] [APP: webcenter#11.1.1.4.0] Error occurred in initializing the notification sender[[ oracle.webcenter.notification.NotificationServiceException: Error occurred in initializing the notification sender at oracle.webcenter.notification.internal.spi.impl.MailNotificationSender.initialize(MailNotificationSender.java:124) at oracle.webcenter.notification.internal.spi.NotificationSenderFactory.getSender(NotificationSenderFactory.java:92) ,,, at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207) at weblogic.work.ExecuteThread.run(ExecuteThread.java:176) Caused by: oracle.webcenter.collab.share.ConnectionFailedException: The service is unavailable. at oracle.webcenter.collab.mail.MailSession.acquireImapStore(MailSession.java:1374) at oracle.webcenter.collab.mail.MailSession.login(MailSession.java:462) at oracle.webcenter.notification.internal.spi.impl.MailNotificationSender.initialize(MailNotificationSender.java:115) ... 118 more Caused by: oracle.webcenter.concurrent.ExecutionException: Invalid protocol: null     service : oracle.webcenter.collab.mail    resource : null      source : oracle.webcenter.collab.mail.MailSession$2@5266b4f (oracle.webcenter.collab.mail.MailSession$2)  submission : 34 at oracle.webcenter.concurrent.Submission.get(Submission.java:220) at  .......

When specifying an invalid IMAP connection then there is no email sent for example when adding or removing a user to/from a Space and either of the following exception is logged into the WC_Spaces-diagnostic.log:


[WC_Spaces] [WARNING] [WCS-50020] [oracle.webcenter.notification.internal.spi.NotificationSenderFactory] [tid: [ACTIVE].ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: weblogic] [ecid: 898db8c387ccb1d5:-39511e8a:1305ab7085c:-8000-0000000000000d2a,0] [APP: webcenter#11.1.1.4.0] Error occurred in initializing the notification sender[[
oracle.webcenter.notification.NotificationServiceException: Error occurred in initializing the notification sender
    at oracle.webcenter.notification.internal.spi.impl.MailNotificationSender.initialize(MailNotificationSender.java:124)
    at oracle.webcenter.notification.internal.spi.NotificationSenderFactory.getSender(NotificationSenderFactory.java:92)
    at oracle.webcenter.notification.internal.model.NotificationServiceImpl.<init>(NotificationServiceImpl.java:109)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
Caused by: oracle.webcenter.collab.share.LoginFailedException: failure to authenticate the user luiza.miniosu@mai.gov.ro, due to: login failed domain does not exist (luiza.miniosu@mai.gov.ro) (mai.gov.ro)
     service : oracle.webcenter.collab.mail
    resource : null
      source : oracle.webcenter.collab.mail.MailSession$2@368587ed (oracle.webcenter.collab.mail.MailSession$2)
  submission : 5
    at oracle.webcenter.collab.mail.MailSession.acquireImapStore(MailSession.java:1359)
    at oracle.webcenter.collab.mail.MailSession.login(MailSession.java:462)
    at oracle.webcenter.notification.internal.spi.impl.MailNotificationSender.initialize(MailNotificationSender.java:115)
    ... 98 more
Caused by: oracle.webcenter.concurrent.ExecutionException: login failed domain does not exist (luiza.miniosu@mai.gov.ro) (mai.gov.ro)
     service : oracle.webcenter.collab.mail
    resource : null
      source : oracle.webcenter.collab.mail.MailSession$2@368587ed (oracle.webcenter.collab.mail.MailSession$2)
  submission : 5
    at oracle.webcenter.concurrent.Submission.get(Submission.java:220)
    at oracle.webcenter.concurrent.SubmissionFuture.get(SubmissionFuture.java:85)
    at oracle.webcenter.collab.mail.MailSession.acquireImapStore(MailSession.java:1330)
    ... 100 more
Caused by: javax.mail.AuthenticationFailedException: login failed domain does not exist (luiza.miniosu@mai.gov.ro) (mai.gov.ro)
    at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:566)
    at javax.mail.Service.connect(Service.java:310)
    at javax.mail.Service.connect(Service.java:169)
    at oracle.webcenter.collab.mail.MailSession$2.call(MailSession.java:1302)
    at oracle.webcenter.concurrent.ModifiedThreadPoolExecutor$Worker.run(ModifiedThreadPoolExecutor.java:682)
    at java.lang.Thread.run(Thread.java:662)

]]


OR

[WC_Spaces] [WARNING] [WCS-50020] [oracle.webcenter.notification.internal.spi.NotificationSenderFactory] [tid: [ACTIVE].ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: weblogic] [ecid: aa9e45ba14af69d8:14e7cf63:1305598d62d:-8000-0000000000000b8b,0] [APP: webcenter#11.1.1.4.0] Error occurred in initializing the notification sender[[
oracle.webcenter.notification.NotificationServiceException: Error occurred in initializing the notification sender
    at oracle.webcenter.notification.internal.spi.impl.MailNotificationSender.initialize(MailNotificationSender.java:124)
    at oracle.webcenter.notification.internal.spi.NotificationSenderFactory.getSender(NotificationSenderFactory.java:92)
    at oracle.webcenter.notification.internal.model.NotificationServiceImpl.<init>(NotificationServiceImpl.java:109)
    at oracle.webcenter.notification.NotificationServiceFactory.getNotificationService(NotificationServiceFactory.java:89)
    at oracle.webcenter.activitystreaming.internal.model.jpa.JpaActivityStreamingService.publish(JpaActivityStreamingService.java:241)
    at oracle.webcenter.spaces.internal.model.security.SpacesSecurityManagerImpl.publishRevokeRoleGroupSpaceActivity(SpacesSecurityManagerImpl.java:4178)
    at oracle.webcenter.spaces.internal.model.security.SpacesSecurityManagerImpl.revokeRoleAndPublishActivity(SpacesSecurityManagerImpl.java:2219)
    at oracle.webcenter.spaces.internal.model.security.SpacesSecurityManagerImpl.revokeRole(SpacesSecurityManagerImpl.java:317)
    at oracle.webcenter.webcenterapp.internal.model.security.WebCenterMemberManagementDC.removeMembers(WebCenterMemberManagementDC.java:872)
    ...
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
Caused by: oracle.webcenter.collab.share.ConnectionFailedException: The service is unavailable.
    at oracle.webcenter.collab.mail.MailSession.acquireImapStore(MailSession.java:1374)
    at oracle.webcenter.collab.mail.MailSession.login(MailSession.java:462)
    at oracle.webcenter.notification.internal.spi.impl.MailNotificationSender.initialize(MailNotificationSender.java:115)
    ... 118 more
Caused by: oracle.webcenter.concurrent.ExecutionException: stbeehive13.oracle.com
     service : oracle.webcenter.collab.mail
    resource : null
      source : oracle.webcenter.collab.mail.MailSession$2@24778eb8 (oracle.webcenter.collab.mail.MailSession$2)
  submission : 35
    at oracle.webcenter.concurrent.Submission.get(Submission.java:220)
    at oracle.webcenter.concurrent.SubmissionFuture.get(SubmissionFuture.java:85)
    at oracle.webcenter.collab.mail.MailSession.acquireImapStore(MailSession.java:1330)
    ... 120 more
Caused by: javax.mail.MessagingException: stbeehive13.oracle.com;
  nested exception is:
    java.net.UnknownHostException: stbeehive13.oracle.com
    at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:571)
    at javax.mail.Service.connect(Service.java:288)
    at javax.mail.Service.connect(Service.java:169)
    ...
    at oracle.webcenter.concurrent.ModifiedThreadPoolExecutor$Worker.run(ModifiedThreadPoolExecutor.java:682)
    at java.lang.Thread.run(Thread.java:662)
Caused by: java.net.UnknownHostException: stbeehive13.oracle.com
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:195)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
    at java.net.Socket.connect(Socket.java:529)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:559)
    at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:231)
    at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)
    at com.sun.mail.iap.Protocol.<init>(Protocol.java:107)
    at com.sun.mail.imap.protocol.IMAPProtocol.<init>(IMAPProtocol.java:104)
    at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:538)
    ... 16 more

]]



Steps to reproduce:

  1. Set up an SMTP-only email connection for WebCenter as per the following note:
    <Note 1182383.1> - How To Create a SMTP Only Mail Connection?

    Specifically:

    a. From WLST create the External Application and Mail connection with the following commands:

    createMailExtAppConnection(appName='webcenter', name='xSharedApp_Mail', displayName='SharedMail')
    createMailConnection(appName='webcenter',name='SharedMailConnection',smtpHost='<SMTP_HOST>',smtpPort=<SMTP_PORT>, smtpSecured=<1_if_secured_0_if_not_secured>, appId='xSharedApp_Mail',timeout=-1,default=true)

    b. Restart Spaces.
    c. Add the 2 properties in the Space Custom Attributes as suggested by the note.
    d. Test sending an email from a page, you may have to save the username and password for the first time.
        Make sure that you receive the email correctly, which confirms that sending email works fine from WebCenter.
  2. Set up the Notification setting in Application Configuration in EM to point to the new Mail connection.
  3. Register a new user with an email address that you can verify.
  4. Login with the newly created user.
  5. Click on Preferences.
  6. Click on Subscriptions.
  7. Check all checboxes on the General Subscriptions tab.
  8. As an administrator, add the user to the Space that you used in step 1.
    Notice that you do not receive the email, and the above exception in WC_Spaces-diagnostic.log, shows up.
  9. Change the Email connection in EM to point to an invalid IMAP host and port.
  10. Restart Spaces.
  11. Test notification again by adding or removing the user to/from the Space.
    You will still not receive the email, and you will see an exception complaining about IMAP connection not being valid, see above.
  12. Change the Email connection in EM to point to a valid IMAP host and port.
  13. Restart Spaces.
  14. Test the notification again
    Notice that this time the email gets sent.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms