[Bug 1588797] [NEW] messageConversations api not sending email per user

Public bug reported:

Hi All,

The messageConversations web-api is still a big issue because we need to
send each user specific information to their e-mails.

1. Using {"subject": subject, "text": message, "users": user} json
object, the mail gets stored on DHIS2 mail and does not send it to the
user e-mail.

LogUtil.java [http-apr-8080-exec-3])
* INFO 2016-05-29 14:14:52,484 Invoking message sender: $Proxy53 (DefaultMessageService.java [http-apr-8080-exec-3])
* INFO 2016-05-29 14:14:52,529 Invoking message sender: SmsMessageSender (DefaultMessageService.java [http-apr-8080-exec-3])
* ERROR 2016-05-29 14:14:52,579 Unexpected error occurred invoking async method 'public java.lang.String org.hisp.dhis.message.EmailMessageSender.sendMessage(java.lang.String,java.lang.String,jav
a.lang.String,org.hisp.dhis.user.User,java.util.Set,boolean)'. (SimpleAsyncUncaughtExceptionHandler.java [taskScheduler-7])
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: org.hisp.dhis.user.User.organisationUnits, could not initialize proxy - no Session
        at org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:569)
        at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:188)
        at org.hibernate.collection.internal.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:139)
        at org.hibernate.collection.internal.PersistentSet.size(PersistentSet.java:156)
        at org.hisp.dhis.common.IdentifiableObjectUtils.join(IdentifiableObjectUtils.java:76)
        at org.hisp.dhis.user.User.getOrganisationUnitsName(User.java:288)
        at org.hisp.dhis.message.EmailMessageSender.renderPlainContent(EmailMessageSender.java:188)
        at org.hisp.dhis.message.EmailMessageSender.sendMessage(EmailMessageSender.java:115)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
        at org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:108)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)

2, Using {"subject": subject, "text": message, "users": users,
"organisationUnits": organisationUnits}, sends email to everyone in the
Orgunit and we want to send to individuals.

Please advice.

Regards,
Mike

** Affects: dhis2
     Importance: Undecided
         Status: New

···

--
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1588797

Title:
  messageConversations api not sending email per user

Status in DHIS:
  New

Bug description:
  Hi All,

  The messageConversations web-api is still a big issue because we need
  to send each user specific information to their e-mails.

  1. Using {"subject": subject, "text": message, "users": user} json
  object, the mail gets stored on DHIS2 mail and does not send it to the
  user e-mail.

  LogUtil.java [http-apr-8080-exec-3])
  * INFO 2016-05-29 14:14:52,484 Invoking message sender: $Proxy53 (DefaultMessageService.java [http-apr-8080-exec-3])
  * INFO 2016-05-29 14:14:52,529 Invoking message sender: SmsMessageSender (DefaultMessageService.java [http-apr-8080-exec-3])
  * ERROR 2016-05-29 14:14:52,579 Unexpected error occurred invoking async method 'public java.lang.String org.hisp.dhis.message.EmailMessageSender.sendMessage(java.lang.String,java.lang.String,jav
  a.lang.String,org.hisp.dhis.user.User,java.util.Set,boolean)'. (SimpleAsyncUncaughtExceptionHandler.java [taskScheduler-7])
  org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: org.hisp.dhis.user.User.organisationUnits, could not initialize proxy - no Session
          at org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:569)
          at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:188)
          at org.hibernate.collection.internal.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:139)
          at org.hibernate.collection.internal.PersistentSet.size(PersistentSet.java:156)
          at org.hisp.dhis.common.IdentifiableObjectUtils.join(IdentifiableObjectUtils.java:76)
          at org.hisp.dhis.user.User.getOrganisationUnitsName(User.java:288)
          at org.hisp.dhis.message.EmailMessageSender.renderPlainContent(EmailMessageSender.java:188)
          at org.hisp.dhis.message.EmailMessageSender.sendMessage(EmailMessageSender.java:115)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:498)
          at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
          at org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:108)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
          at java.lang.Thread.run(Thread.java:745)

  2, Using {"subject": subject, "text": message, "users": users,
  "organisationUnits": organisationUnits}, sends email to everyone in
  the Orgunit and we want to send to individuals.

  Please advice.

  Regards,
  Mike

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1588797/+subscriptions

Which DHIS 2 version is this?

Can you reproduce against the play demo instance?

···

--
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1588797

Title:
  messageConversations api not sending email per user

Status in DHIS:
  New

Bug description:
  Hi All,

  The messageConversations web-api is still a big issue because we need
  to send each user specific information to their e-mails.

  1. Using {"subject": subject, "text": message, "users": user} json
  object, the mail gets stored on DHIS2 mail and does not send it to the
  user e-mail.

  LogUtil.java [http-apr-8080-exec-3])
  * INFO 2016-05-29 14:14:52,484 Invoking message sender: $Proxy53 (DefaultMessageService.java [http-apr-8080-exec-3])
  * INFO 2016-05-29 14:14:52,529 Invoking message sender: SmsMessageSender (DefaultMessageService.java [http-apr-8080-exec-3])
  * ERROR 2016-05-29 14:14:52,579 Unexpected error occurred invoking async method 'public java.lang.String org.hisp.dhis.message.EmailMessageSender.sendMessage(java.lang.String,java.lang.String,jav
  a.lang.String,org.hisp.dhis.user.User,java.util.Set,boolean)'. (SimpleAsyncUncaughtExceptionHandler.java [taskScheduler-7])
  org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: org.hisp.dhis.user.User.organisationUnits, could not initialize proxy - no Session
          at org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:569)
          at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:188)
          at org.hibernate.collection.internal.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:139)
          at org.hibernate.collection.internal.PersistentSet.size(PersistentSet.java:156)
          at org.hisp.dhis.common.IdentifiableObjectUtils.join(IdentifiableObjectUtils.java:76)
          at org.hisp.dhis.user.User.getOrganisationUnitsName(User.java:288)
          at org.hisp.dhis.message.EmailMessageSender.renderPlainContent(EmailMessageSender.java:188)
          at org.hisp.dhis.message.EmailMessageSender.sendMessage(EmailMessageSender.java:115)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:498)
          at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
          at org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:108)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
          at java.lang.Thread.run(Thread.java:745)

  2, Using {"subject": subject, "text": message, "users": users,
  "organisationUnits": organisationUnits}, sends email to everyone in
  the Orgunit and we want to send to individuals.

  Please advice.

  Regards,
  Mike

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1588797/+subscriptions

Lars,

it is the latest (more or less) 2.23 - build version about 10 days old.

Regards
Calle

···

On 5 June 2016 at 18:11, Lars Helge Øverland <lars@dhis2.org> wrote:

Which DHIS 2 version is this?

Can you reproduce against the play demo instance?

--
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1588797

Title:
  messageConversations api not sending email per user

Status in DHIS:
  New

Bug description:
  Hi All,

  The messageConversations web-api is still a big issue because we need
  to send each user specific information to their e-mails.

  1. Using {"subject": subject, "text": message, "users": user} json
  object, the mail gets stored on DHIS2 mail and does not send it to the
  user e-mail.

  LogUtil.java [http-apr-8080-exec-3])
  * INFO 2016-05-29 14:14:52,484 Invoking message sender: $Proxy53
(DefaultMessageService.java [http-apr-8080-exec-3])
  * INFO 2016-05-29 14:14:52,529 Invoking message sender:
SmsMessageSender (DefaultMessageService.java [http-apr-8080-exec-3])
  * ERROR 2016-05-29 14:14:52,579 Unexpected error occurred invoking async
method 'public java.lang.String
org.hisp.dhis.message.EmailMessageSender.sendMessage(java.lang.String,java.lang.String,jav
  a.lang.String,org.hisp.dhis.user.User,java.util.Set,boolean)'.
(SimpleAsyncUncaughtExceptionHandler.java [taskScheduler-7])
  org.hibernate.LazyInitializationException: failed to lazily initialize a
collection of role: org.hisp.dhis.user.User.organisationUnits, could not
initialize proxy - no Session
          at
org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:569)
          at
org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:188)
          at
org.hibernate.collection.internal.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:139)
          at
org.hibernate.collection.internal.PersistentSet.size(PersistentSet.java:156)
          at
org.hisp.dhis.common.IdentifiableObjectUtils.join(IdentifiableObjectUtils.java:76)
          at
org.hisp.dhis.user.User.getOrganisationUnitsName(User.java:288)
          at
org.hisp.dhis.message.EmailMessageSender.renderPlainContent(EmailMessageSender.java:188)
          at
org.hisp.dhis.message.EmailMessageSender.sendMessage(EmailMessageSender.java:115)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
          at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:498)
          at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
          at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
          at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
          at
org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:108)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
          at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
          at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
          at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
          at java.lang.Thread.run(Thread.java:745)

  2, Using {"subject": subject, "text": message, "users": users,
  "organisationUnits": organisationUnits}, sends email to everyone in
  the Orgunit and we want to send to individuals.

  Please advice.

  Regards,
  Mike

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1588797/+subscriptions

_______________________________________________
Mailing list: DHIS 2 developers in Launchpad
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : DHIS 2 developers in Launchpad
More help : ListHelp - Launchpad Help

--

*******************************************

Calle Hedberg

46D Alma Road, 7700 Rosebank, SOUTH AFRICA

Tel/fax (home): +27-21-685-6472

Cell: +27-82-853-5352

Iridium SatPhone: +8816-315-19119

Email: calle.hedberg@gmail.com

Skype: calle_hedberg

*******************************************

--
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1588797

Title:
  messageConversations api not sending email per user

Status in DHIS:
  New

Bug description:
  Hi All,

  The messageConversations web-api is still a big issue because we need
  to send each user specific information to their e-mails.

  1. Using {"subject": subject, "text": message, "users": user} json
  object, the mail gets stored on DHIS2 mail and does not send it to the
  user e-mail.

  LogUtil.java [http-apr-8080-exec-3])
  * INFO 2016-05-29 14:14:52,484 Invoking message sender: $Proxy53 (DefaultMessageService.java [http-apr-8080-exec-3])
  * INFO 2016-05-29 14:14:52,529 Invoking message sender: SmsMessageSender (DefaultMessageService.java [http-apr-8080-exec-3])
  * ERROR 2016-05-29 14:14:52,579 Unexpected error occurred invoking async method 'public java.lang.String org.hisp.dhis.message.EmailMessageSender.sendMessage(java.lang.String,java.lang.String,jav
  a.lang.String,org.hisp.dhis.user.User,java.util.Set,boolean)'. (SimpleAsyncUncaughtExceptionHandler.java [taskScheduler-7])
  org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: org.hisp.dhis.user.User.organisationUnits, could not initialize proxy - no Session
          at org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:569)
          at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:188)
          at org.hibernate.collection.internal.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:139)
          at org.hibernate.collection.internal.PersistentSet.size(PersistentSet.java:156)
          at org.hisp.dhis.common.IdentifiableObjectUtils.join(IdentifiableObjectUtils.java:76)
          at org.hisp.dhis.user.User.getOrganisationUnitsName(User.java:288)
          at org.hisp.dhis.message.EmailMessageSender.renderPlainContent(EmailMessageSender.java:188)
          at org.hisp.dhis.message.EmailMessageSender.sendMessage(EmailMessageSender.java:115)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:498)
          at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
          at org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:108)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
          at java.lang.Thread.run(Thread.java:745)

  2, Using {"subject": subject, "text": message, "users": users,
  "organisationUnits": organisationUnits}, sends email to everyone in
  the Orgunit and we want to send to individuals.

  Please advice.

  Regards,
  Mike

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1588797/+subscriptions

Hi Lars,

We are using 2.23(Build #101 (Jun 2, 2016 5:43:26 PM))

Regards,
Mike

···

On Sun, Jun 5, 2016 at 6:11 PM, Lars Helge Øverland <lars@dhis2.org> wrote:

Which DHIS 2 version is this?

Can you reproduce against the play demo instance?

--
You received this bug notification because you are subscribed to the bug
report.
https://bugs.launchpad.net/bugs/1588797

Title:
  messageConversations api not sending email per user

Status in DHIS:
  New

Bug description:
  Hi All,

  The messageConversations web-api is still a big issue because we need
  to send each user specific information to their e-mails.

  1. Using {"subject": subject, "text": message, "users": user} json
  object, the mail gets stored on DHIS2 mail and does not send it to the
  user e-mail.

  LogUtil.java [http-apr-8080-exec-3])
  * INFO 2016-05-29 14:14:52,484 Invoking message sender: $Proxy53
(DefaultMessageService.java [http-apr-8080-exec-3])
  * INFO 2016-05-29 14:14:52,529 Invoking message sender:
SmsMessageSender (DefaultMessageService.java [http-apr-8080-exec-3])
  * ERROR 2016-05-29 14:14:52,579 Unexpected error occurred invoking async
method 'public java.lang.String
org.hisp.dhis.message.EmailMessageSender.sendMessage(java.lang.String,java.lang.String,jav
  a.lang.String,org.hisp.dhis.user.User,java.util.Set,boolean)'.
(SimpleAsyncUncaughtExceptionHandler.java [taskScheduler-7])
  org.hibernate.LazyInitializationException: failed to lazily initialize a
collection of role: org.hisp.dhis.user.User.organisationUnits, could not
initialize proxy - no Session
          at
org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:569)
          at
org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:188)
          at
org.hibernate.collection.internal.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:139)
          at
org.hibernate.collection.internal.PersistentSet.size(PersistentSet.java:156)
          at
org.hisp.dhis.common.IdentifiableObjectUtils.join(IdentifiableObjectUtils.java:76)
          at
org.hisp.dhis.user.User.getOrganisationUnitsName(User.java:288)
          at
org.hisp.dhis.message.EmailMessageSender.renderPlainContent(EmailMessageSender.java:188)
          at
org.hisp.dhis.message.EmailMessageSender.sendMessage(EmailMessageSender.java:115)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
          at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:498)
          at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
          at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
          at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
          at
org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:108)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
          at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
          at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
          at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
          at java.lang.Thread.run(Thread.java:745)

  2, Using {"subject": subject, "text": message, "users": users,
  "organisationUnits": organisationUnits}, sends email to everyone in
  the Orgunit and we want to send to individuals.

  Please advice.

  Regards,
  Mike

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1588797/+subscriptions

--
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1588797

Title:
  messageConversations api not sending email per user

Status in DHIS:
  New

Bug description:
  Hi All,

  The messageConversations web-api is still a big issue because we need
  to send each user specific information to their e-mails.

  1. Using {"subject": subject, "text": message, "users": user} json
  object, the mail gets stored on DHIS2 mail and does not send it to the
  user e-mail.

  LogUtil.java [http-apr-8080-exec-3])
  * INFO 2016-05-29 14:14:52,484 Invoking message sender: $Proxy53 (DefaultMessageService.java [http-apr-8080-exec-3])
  * INFO 2016-05-29 14:14:52,529 Invoking message sender: SmsMessageSender (DefaultMessageService.java [http-apr-8080-exec-3])
  * ERROR 2016-05-29 14:14:52,579 Unexpected error occurred invoking async method 'public java.lang.String org.hisp.dhis.message.EmailMessageSender.sendMessage(java.lang.String,java.lang.String,jav
  a.lang.String,org.hisp.dhis.user.User,java.util.Set,boolean)'. (SimpleAsyncUncaughtExceptionHandler.java [taskScheduler-7])
  org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: org.hisp.dhis.user.User.organisationUnits, could not initialize proxy - no Session
          at org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:569)
          at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:188)
          at org.hibernate.collection.internal.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:139)
          at org.hibernate.collection.internal.PersistentSet.size(PersistentSet.java:156)
          at org.hisp.dhis.common.IdentifiableObjectUtils.join(IdentifiableObjectUtils.java:76)
          at org.hisp.dhis.user.User.getOrganisationUnitsName(User.java:288)
          at org.hisp.dhis.message.EmailMessageSender.renderPlainContent(EmailMessageSender.java:188)
          at org.hisp.dhis.message.EmailMessageSender.sendMessage(EmailMessageSender.java:115)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:498)
          at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
          at org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:108)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
          at java.lang.Thread.run(Thread.java:745)

  2, Using {"subject": subject, "text": message, "users": users,
  "organisationUnits": organisationUnits}, sends email to everyone in
  the Orgunit and we want to send to individuals.

  Please advice.

  Regards,
  Mike

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1588797/+subscriptions

Okay thanks.

Are you able to reproduce on demo?

Can you post the exact URL and payload you used??

···

On Jun 5, 2016 1:01 PM, “Mike Nelushi” mikeevolution@gmail.com wrote:

Hi Lars,

We are using 2.23(Build #101 (Jun 2, 2016 5:43:26 PM))

Regards,

Mike

On Sun, Jun 5, 2016 at 6:11 PM, Lars Helge Øverland lars@dhis2.org > > wrote:

Which DHIS 2 version is this?

Can you reproduce against the play demo instance?

You received this bug notification because you are subscribed to the bug

report.
https://bugs.launchpad.net/bugs/1588797

Title:

messageConversations api not sending email per user

Status in DHIS:

New

Bug description:

Hi All,

The messageConversations web-api is still a big issue because we need

to send each user specific information to their e-mails.

  1. Using {“subject”: subject, “text”: message, “users”: user} json

object, the mail gets stored on DHIS2 mail and does not send it to the

user e-mail.

LogUtil.java [http-apr-8080-exec-3])

  • INFO 2016-05-29 14:14:52,484 Invoking message sender: $Proxy53

(DefaultMessageService.java [http-apr-8080-exec-3])

  • INFO 2016-05-29 14:14:52,529 Invoking message sender:

SmsMessageSender (DefaultMessageService.java [http-apr-8080-exec-3])

  • ERROR 2016-05-29 14:14:52,579 Unexpected error occurred invoking async

method 'public java.lang.String

org.hisp.dhis.message.EmailMessageSender.sendMessage(java.lang.String,java.lang.String,jav

a.lang.String,org.hisp.dhis.user.User,java.util.Set,boolean)'.

(SimpleAsyncUncaughtExceptionHandler.java [taskScheduler-7])

org.hibernate.LazyInitializationException: failed to lazily initialize a

collection of role: org.hisp.dhis.user.User.organisationUnits, could not

initialize proxy - no Session

      at

org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:569)

      at

org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:188)

      at

org.hibernate.collection.internal.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:139)

      at

org.hibernate.collection.internal.PersistentSet.size(PersistentSet.java:156)

      at

org.hisp.dhis.common.IdentifiableObjectUtils.join(IdentifiableObjectUtils.java:76)

      at

org.hisp.dhis.user.User.getOrganisationUnitsName(User.java:288)

      at

org.hisp.dhis.message.EmailMessageSender.renderPlainContent(EmailMessageSender.java:188)

      at

org.hisp.dhis.message.EmailMessageSender.sendMessage(EmailMessageSender.java:115)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

      at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      at java.lang.reflect.Method.invoke(Method.java:498)
      at

org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)

      at

org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)

      at

org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)

      at

org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:108)

      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at

java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)

      at

java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)

      at

java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

      at

java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

      at java.lang.Thread.run(Thread.java:745)

2, Using {“subject”: subject, “text”: message, “users”: users,

“organisationUnits”: organisationUnits}, sends email to everyone in

the Orgunit and we want to send to individuals.

Please advice.

Regards,

Mike

To manage notifications about this bug go to:

https://bugs.launchpad.net/dhis2/+bug/1588797/+subscriptions

You received this bug notification because you are a member of DHIS 2

developers, which is subscribed to DHIS.

https://bugs.launchpad.net/bugs/1588797

Title:

messageConversations api not sending email per user

Status in DHIS:

New

Bug description:

Hi All,

The messageConversations web-api is still a big issue because we need

to send each user specific information to their e-mails.

  1. Using {“subject”: subject, “text”: message, “users”: user} json

object, the mail gets stored on DHIS2 mail and does not send it to the

user e-mail.

LogUtil.java [http-apr-8080-exec-3])

  • INFO 2016-05-29 14:14:52,484 Invoking message sender: $Proxy53 (DefaultMessageService.java [http-apr-8080-exec-3])

  • INFO 2016-05-29 14:14:52,529 Invoking message sender: SmsMessageSender (DefaultMessageService.java [http-apr-8080-exec-3])

  • ERROR 2016-05-29 14:14:52,579 Unexpected error occurred invoking async method 'public java.lang.String org.hisp.dhis.message.EmailMessageSender.sendMessage(java.lang.String,java.lang.String,jav

a.lang.String,org.hisp.dhis.user.User,java.util.Set,boolean)'. (SimpleAsyncUncaughtExceptionHandler.java [taskScheduler-7])

org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: org.hisp.dhis.user.User.organisationUnits, could not initialize proxy - no Session

      at org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:569)

      at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:188)

      at org.hibernate.collection.internal.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:139)

      at org.hibernate.collection.internal.PersistentSet.size(PersistentSet.java:156)

      at org.hisp.dhis.common.IdentifiableObjectUtils.join(IdentifiableObjectUtils.java:76)

      at org.hisp.dhis.user.User.getOrganisationUnitsName(User.java:288)

      at org.hisp.dhis.message.EmailMessageSender.renderPlainContent(EmailMessageSender.java:188)

      at org.hisp.dhis.message.EmailMessageSender.sendMessage(EmailMessageSender.java:115)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      at java.lang.reflect.Method.invoke(Method.java:498)

      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)

      at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)

      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)

      at org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:108)

      at java.util.concurrent.FutureTask.run(FutureTask.java:266)

      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)

      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)

      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

      at java.lang.Thread.run(Thread.java:745)

2, Using {“subject”: subject, “text”: message, “users”: users,

“organisationUnits”: organisationUnits}, sends email to everyone in

the Orgunit and we want to send to individuals.

Please advice.

Regards,

Mike

To manage notifications about this bug go to:

https://bugs.launchpad.net/dhis2/+bug/1588797/+subscriptions


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Hi Lars,

url: localhost:8080/dhis/api/messageConversations

json: {“subject”: subject, “text”: message, “users”: users}; //POST

Regards,

Mike

···

On Sun, Jun 5, 2016 at 9:02 PM, Lars Helge Øverland lars@dhis2.org wrote:

Okay thanks.

Are you able to reproduce on demo?

Can you post the exact URL and payload you used??

On Jun 5, 2016 1:01 PM, “Mike Nelushi” mikeevolution@gmail.com wrote:

Hi Lars,

We are using 2.23(Build #101 (Jun 2, 2016 5:43:26 PM))

Regards,

Mike

On Sun, Jun 5, 2016 at 6:11 PM, Lars Helge Øverland lars@dhis2.org

wrote:

Which DHIS 2 version is this?

Can you reproduce against the play demo instance?

You received this bug notification because you are subscribed to the bug

report.

https://bugs.launchpad.net/bugs/1588797

Title:

messageConversations api not sending email per user

Status in DHIS:

New

Bug description:

Hi All,

The messageConversations web-api is still a big issue because we need

to send each user specific information to their e-mails.

  1. Using {“subject”: subject, “text”: message, “users”: user} json

object, the mail gets stored on DHIS2 mail and does not send it to the

user e-mail.

LogUtil.java [http-apr-8080-exec-3])

  • INFO 2016-05-29 14:14:52,484 Invoking message sender: $Proxy53

(DefaultMessageService.java [http-apr-8080-exec-3])

  • INFO 2016-05-29 14:14:52,529 Invoking message sender:

SmsMessageSender (DefaultMessageService.java [http-apr-8080-exec-3])

  • ERROR 2016-05-29 14:14:52,579 Unexpected error occurred invoking async

method 'public java.lang.String

org.hisp.dhis.message.EmailMessageSender.sendMessage(java.lang.String,java.lang.String,jav

a.lang.String,org.hisp.dhis.user.User,java.util.Set,boolean)'.

(SimpleAsyncUncaughtExceptionHandler.java [taskScheduler-7])

org.hibernate.LazyInitializationException: failed to lazily initialize a

collection of role: org.hisp.dhis.user.User.organisationUnits, could not

initialize proxy - no Session

      at

org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:569)

      at

org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:188)

      at

org.hibernate.collection.internal.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:139)

      at

org.hibernate.collection.internal.PersistentSet.size(PersistentSet.java:156)

      at

org.hisp.dhis.common.IdentifiableObjectUtils.join(IdentifiableObjectUtils.java:76)

      at

org.hisp.dhis.user.User.getOrganisationUnitsName(User.java:288)

      at

org.hisp.dhis.message.EmailMessageSender.renderPlainContent(EmailMessageSender.java:188)

      at

org.hisp.dhis.message.EmailMessageSender.sendMessage(EmailMessageSender.java:115)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

      at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      at java.lang.reflect.Method.invoke(Method.java:498)
      at

org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)

      at

org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)

      at

org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)

      at

org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:108)

      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at

java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)

      at

java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)

      at

java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

      at

java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

      at java.lang.Thread.run(Thread.java:745)

2, Using {“subject”: subject, “text”: message, “users”: users,

“organisationUnits”: organisationUnits}, sends email to everyone in

the Orgunit and we want to send to individuals.

Please advice.

Regards,

Mike

To manage notifications about this bug go to:

https://bugs.launchpad.net/dhis2/+bug/1588797/+subscriptions

You received this bug notification because you are a member of DHIS 2

developers, which is subscribed to DHIS.

https://bugs.launchpad.net/bugs/1588797

Title:

messageConversations api not sending email per user

Status in DHIS:

New

Bug description:

Hi All,

The messageConversations web-api is still a big issue because we need

to send each user specific information to their e-mails.

  1. Using {“subject”: subject, “text”: message, “users”: user} json

object, the mail gets stored on DHIS2 mail and does not send it to the

user e-mail.

LogUtil.java [http-apr-8080-exec-3])

  • INFO 2016-05-29 14:14:52,484 Invoking message sender: $Proxy53 (DefaultMessageService.java [http-apr-8080-exec-3])

  • INFO 2016-05-29 14:14:52,529 Invoking message sender: SmsMessageSender (DefaultMessageService.java [http-apr-8080-exec-3])

  • ERROR 2016-05-29 14:14:52,579 Unexpected error occurred invoking async method 'public java.lang.String org.hisp.dhis.message.EmailMessageSender.sendMessage(java.lang.String,java.lang.String,jav

a.lang.String,org.hisp.dhis.user.User,java.util.Set,boolean)'. (SimpleAsyncUncaughtExceptionHandler.java [taskScheduler-7])

org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: org.hisp.dhis.user.User.organisationUnits, could not initialize proxy - no Session

      at org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:569)

      at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:188)

      at org.hibernate.collection.internal.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:139)

      at org.hibernate.collection.internal.PersistentSet.size(PersistentSet.java:156)

      at org.hisp.dhis.common.IdentifiableObjectUtils.join(IdentifiableObjectUtils.java:76)

      at org.hisp.dhis.user.User.getOrganisationUnitsName(User.java:288)

      at org.hisp.dhis.message.EmailMessageSender.renderPlainContent(EmailMessageSender.java:188)

      at org.hisp.dhis.message.EmailMessageSender.sendMessage(EmailMessageSender.java:115)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      at java.lang.reflect.Method.invoke(Method.java:498)

      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)

      at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)

      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)

      at org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:108)

      at java.util.concurrent.FutureTask.run(FutureTask.java:266)

      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)

      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)

      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

      at java.lang.Thread.run(Thread.java:745)

2, Using {“subject”: subject, “text”: message, “users”: users,

“organisationUnits”: organisationUnits}, sends email to everyone in

the Orgunit and we want to send to individuals.

Please advice.

Regards,

Mike

To manage notifications about this bug go to:

https://bugs.launchpad.net/dhis2/+bug/1588797/+subscriptions


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Hi Lars,

Where you able to look at this issue? I saw similar bug report**([Dhis2-devs] [Bug 1591697] [NEW] Feedback and Sending Messages via api/messageConversations fails with Null Pointer**

**). **

Please advice,

Regards,

Mike

···

On Wed, Jun 8, 2016 at 10:41 PM, Mike Nelushi mikeevolution@gmail.com wrote:

Hi Lars,

url: localhost:8080/dhis/api/messageConversations

json: {“subject”: subject, “text”: message, “users”: users}; //POST

Regards,

Mike

On Sun, Jun 5, 2016 at 9:02 PM, Lars Helge Øverland lars@dhis2.org wrote:

Okay thanks.

Are you able to reproduce on demo?

Can you post the exact URL and payload you used??

On Jun 5, 2016 1:01 PM, “Mike Nelushi” mikeevolution@gmail.com wrote:

Hi Lars,

We are using 2.23(Build #101 (Jun 2, 2016 5:43:26 PM))

Regards,

Mike

On Sun, Jun 5, 2016 at 6:11 PM, Lars Helge Øverland lars@dhis2.org

wrote:

Which DHIS 2 version is this?

Can you reproduce against the play demo instance?

You received this bug notification because you are subscribed to the bug

report.

https://bugs.launchpad.net/bugs/1588797

Title:

messageConversations api not sending email per user

Status in DHIS:

New

Bug description:

Hi All,

The messageConversations web-api is still a big issue because we need

to send each user specific information to their e-mails.

  1. Using {“subject”: subject, “text”: message, “users”: user} json

object, the mail gets stored on DHIS2 mail and does not send it to the

user e-mail.

LogUtil.java [http-apr-8080-exec-3])

  • INFO 2016-05-29 14:14:52,484 Invoking message sender: $Proxy53

(DefaultMessageService.java [http-apr-8080-exec-3])

  • INFO 2016-05-29 14:14:52,529 Invoking message sender:

SmsMessageSender (DefaultMessageService.java [http-apr-8080-exec-3])

  • ERROR 2016-05-29 14:14:52,579 Unexpected error occurred invoking async

method 'public java.lang.String

org.hisp.dhis.message.EmailMessageSender.sendMessage(java.lang.String,java.lang.String,jav

a.lang.String,org.hisp.dhis.user.User,java.util.Set,boolean)'.

(SimpleAsyncUncaughtExceptionHandler.java [taskScheduler-7])

org.hibernate.LazyInitializationException: failed to lazily initialize a

collection of role: org.hisp.dhis.user.User.organisationUnits, could not

initialize proxy - no Session

      at

org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:569)

      at

org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:188)

      at

org.hibernate.collection.internal.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:139)

      at

org.hibernate.collection.internal.PersistentSet.size(PersistentSet.java:156)

      at

org.hisp.dhis.common.IdentifiableObjectUtils.join(IdentifiableObjectUtils.java:76)

      at

org.hisp.dhis.user.User.getOrganisationUnitsName(User.java:288)

      at

org.hisp.dhis.message.EmailMessageSender.renderPlainContent(EmailMessageSender.java:188)

      at

org.hisp.dhis.message.EmailMessageSender.sendMessage(EmailMessageSender.java:115)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

      at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      at java.lang.reflect.Method.invoke(Method.java:498)
      at

org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)

      at

org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)

      at

org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)

      at

org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:108)

      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at

java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)

      at

java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)

      at

java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

      at

java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

      at java.lang.Thread.run(Thread.java:745)

2, Using {“subject”: subject, “text”: message, “users”: users,

“organisationUnits”: organisationUnits}, sends email to everyone in

the Orgunit and we want to send to individuals.

Please advice.

Regards,

Mike

To manage notifications about this bug go to:

https://bugs.launchpad.net/dhis2/+bug/1588797/+subscriptions

You received this bug notification because you are a member of DHIS 2

developers, which is subscribed to DHIS.

https://bugs.launchpad.net/bugs/1588797

Title:

messageConversations api not sending email per user

Status in DHIS:

New

Bug description:

Hi All,

The messageConversations web-api is still a big issue because we need

to send each user specific information to their e-mails.

  1. Using {“subject”: subject, “text”: message, “users”: user} json

object, the mail gets stored on DHIS2 mail and does not send it to the

user e-mail.

LogUtil.java [http-apr-8080-exec-3])

  • INFO 2016-05-29 14:14:52,484 Invoking message sender: $Proxy53 (DefaultMessageService.java [http-apr-8080-exec-3])

  • INFO 2016-05-29 14:14:52,529 Invoking message sender: SmsMessageSender (DefaultMessageService.java [http-apr-8080-exec-3])

  • ERROR 2016-05-29 14:14:52,579 Unexpected error occurred invoking async method 'public java.lang.String org.hisp.dhis.message.EmailMessageSender.sendMessage(java.lang.String,java.lang.String,jav

a.lang.String,org.hisp.dhis.user.User,java.util.Set,boolean)'. (SimpleAsyncUncaughtExceptionHandler.java [taskScheduler-7])

org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: org.hisp.dhis.user.User.organisationUnits, could not initialize proxy - no Session

      at org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:569)

      at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:188)

      at org.hibernate.collection.internal.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:139)

      at org.hibernate.collection.internal.PersistentSet.size(PersistentSet.java:156)

      at org.hisp.dhis.common.IdentifiableObjectUtils.join(IdentifiableObjectUtils.java:76)

      at org.hisp.dhis.user.User.getOrganisationUnitsName(User.java:288)

      at org.hisp.dhis.message.EmailMessageSender.renderPlainContent(EmailMessageSender.java:188)

      at org.hisp.dhis.message.EmailMessageSender.sendMessage(EmailMessageSender.java:115)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      at java.lang.reflect.Method.invoke(Method.java:498)

      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)

      at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)

      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)

      at org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:108)

      at java.util.concurrent.FutureTask.run(FutureTask.java:266)

      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)

      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)

      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

      at java.lang.Thread.run(Thread.java:745)

2, Using {“subject”: subject, “text”: message, “users”: users,

“organisationUnits”: organisationUnits}, sends email to everyone in

the Orgunit and we want to send to individuals.

Please advice.

Regards,

Mike

To manage notifications about this bug go to:

https://bugs.launchpad.net/dhis2/+bug/1588797/+subscriptions


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Hi Lars,

Thanks. I reported it. See https://bugs.launchpad.net/dhis2/+bug/1591697

Thanks and looking forward to the fix as the IDSR notifications can not be tested.

Alex

···

On Mon, Jun 13, 2016 at 2:39 PM, Mike Nelushi mikeevolution@gmail.com wrote:

Hi Lars,

Where you able to look at this issue? I saw similar bug report**([Dhis2-devs] [Bug 1591697] [NEW] Feedback and Sending Messages via api/messageConversations fails with Null Pointer**

**). **

Please advice,

Regards,

Mike


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

On Wed, Jun 8, 2016 at 10:41 PM, Mike Nelushi mikeevolution@gmail.com wrote:

Hi Lars,

url: localhost:8080/dhis/api/messageConversations

json: {“subject”: subject, “text”: message, “users”: users}; //POST

Regards,

Mike

On Sun, Jun 5, 2016 at 9:02 PM, Lars Helge Øverland lars@dhis2.org wrote:

Okay thanks.

Are you able to reproduce on demo?

Can you post the exact URL and payload you used??

On Jun 5, 2016 1:01 PM, “Mike Nelushi” mikeevolution@gmail.com wrote:

Hi Lars,

We are using 2.23(Build #101 (Jun 2, 2016 5:43:26 PM))

Regards,

Mike

On Sun, Jun 5, 2016 at 6:11 PM, Lars Helge Øverland lars@dhis2.org

wrote:

Which DHIS 2 version is this?

Can you reproduce against the play demo instance?

You received this bug notification because you are subscribed to the bug

report.

https://bugs.launchpad.net/bugs/1588797

Title:

messageConversations api not sending email per user

Status in DHIS:

New

Bug description:

Hi All,

The messageConversations web-api is still a big issue because we need

to send each user specific information to their e-mails.

  1. Using {“subject”: subject, “text”: message, “users”: user} json

object, the mail gets stored on DHIS2 mail and does not send it to the

user e-mail.

LogUtil.java [http-apr-8080-exec-3])

  • INFO 2016-05-29 14:14:52,484 Invoking message sender: $Proxy53

(DefaultMessageService.java [http-apr-8080-exec-3])

  • INFO 2016-05-29 14:14:52,529 Invoking message sender:

SmsMessageSender (DefaultMessageService.java [http-apr-8080-exec-3])

  • ERROR 2016-05-29 14:14:52,579 Unexpected error occurred invoking async

method 'public java.lang.String

org.hisp.dhis.message.EmailMessageSender.sendMessage(java.lang.String,java.lang.String,jav

a.lang.String,org.hisp.dhis.user.User,java.util.Set,boolean)'.

(SimpleAsyncUncaughtExceptionHandler.java [taskScheduler-7])

org.hibernate.LazyInitializationException: failed to lazily initialize a

collection of role: org.hisp.dhis.user.User.organisationUnits, could not

initialize proxy - no Session

      at

org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:569)

      at

org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:188)

      at

org.hibernate.collection.internal.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:139)

      at

org.hibernate.collection.internal.PersistentSet.size(PersistentSet.java:156)

      at

org.hisp.dhis.common.IdentifiableObjectUtils.join(IdentifiableObjectUtils.java:76)

      at

org.hisp.dhis.user.User.getOrganisationUnitsName(User.java:288)

      at

org.hisp.dhis.message.EmailMessageSender.renderPlainContent(EmailMessageSender.java:188)

      at

org.hisp.dhis.message.EmailMessageSender.sendMessage(EmailMessageSender.java:115)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

      at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      at java.lang.reflect.Method.invoke(Method.java:498)
      at

org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)

      at

org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)

      at

org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)

      at

org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:108)

      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at

java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)

      at

java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)

      at

java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

      at

java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

      at java.lang.Thread.run(Thread.java:745)

2, Using {“subject”: subject, “text”: message, “users”: users,

“organisationUnits”: organisationUnits}, sends email to everyone in

the Orgunit and we want to send to individuals.

Please advice.

Regards,

Mike

To manage notifications about this bug go to:

https://bugs.launchpad.net/dhis2/+bug/1588797/+subscriptions

You received this bug notification because you are a member of DHIS 2

developers, which is subscribed to DHIS.

https://bugs.launchpad.net/bugs/1588797

Title:

messageConversations api not sending email per user

Status in DHIS:

New

Bug description:

Hi All,

The messageConversations web-api is still a big issue because we need

to send each user specific information to their e-mails.

  1. Using {“subject”: subject, “text”: message, “users”: user} json

object, the mail gets stored on DHIS2 mail and does not send it to the

user e-mail.

LogUtil.java [http-apr-8080-exec-3])

  • INFO 2016-05-29 14:14:52,484 Invoking message sender: $Proxy53 (DefaultMessageService.java [http-apr-8080-exec-3])

  • INFO 2016-05-29 14:14:52,529 Invoking message sender: SmsMessageSender (DefaultMessageService.java [http-apr-8080-exec-3])

  • ERROR 2016-05-29 14:14:52,579 Unexpected error occurred invoking async method 'public java.lang.String org.hisp.dhis.message.EmailMessageSender.sendMessage(java.lang.String,java.lang.String,jav

a.lang.String,org.hisp.dhis.user.User,java.util.Set,boolean)'. (SimpleAsyncUncaughtExceptionHandler.java [taskScheduler-7])

org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: org.hisp.dhis.user.User.organisationUnits, could not initialize proxy - no Session

      at org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:569)

      at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:188)

      at org.hibernate.collection.internal.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:139)

      at org.hibernate.collection.internal.PersistentSet.size(PersistentSet.java:156)

      at org.hisp.dhis.common.IdentifiableObjectUtils.join(IdentifiableObjectUtils.java:76)

      at org.hisp.dhis.user.User.getOrganisationUnitsName(User.java:288)

      at org.hisp.dhis.message.EmailMessageSender.renderPlainContent(EmailMessageSender.java:188)

      at org.hisp.dhis.message.EmailMessageSender.sendMessage(EmailMessageSender.java:115)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      at java.lang.reflect.Method.invoke(Method.java:498)

      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)

      at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)

      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)

      at org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:108)

      at java.util.concurrent.FutureTask.run(FutureTask.java:266)

      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)

      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)

      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

      at java.lang.Thread.run(Thread.java:745)

2, Using {“subject”: subject, “text”: message, “users”: users,

“organisationUnits”: organisationUnits}, sends email to everyone in

the Orgunit and we want to send to individuals.

Please advice.

Regards,

Mike

To manage notifications about this bug go to:

https://bugs.launchpad.net/dhis2/+bug/1588797/+subscriptions


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Alex Tumwesigye

Technical Advisor - DHIS2 (Consultant),
Ministry of Health/AFENET | HISP Uganda

Kampala

Uganda
+256 774149 775, + 256 759 800161

Skype ID: talexie

IT Consultant (Servers, Networks and Security, Health Information Systems - DHIS2, Disease Outbreak & Surveillance Systems) & Solar Consultant

"I don’t want to be anything other than what I have been - one tree hill "

Dear Lars/ Mike,

I have found a quick fix. There is need for an SMS gateway to be set for all the conditions for sending messages/SMS to be true.

Just go to Mobile Configuration and add a fake generic http gateway (does not need to be real).

See line 47 of this file:

http://bazaar.launchpad.net/~dhis2-devs-core/dhis2/2.23/view/head:/dhis-2/dhis-api/src/main/java/org/hisp/dhis/sms/MessageSender.java

That is it.

Alex

···

On Mon, Jun 13, 2016 at 2:45 PM, Alex Tumwesigye atumwesigye@gmail.com wrote:

Hi Lars,

Thanks. I reported it. See https://bugs.launchpad.net/dhis2/+bug/1591697

Thanks and looking forward to the fix as the IDSR notifications can not be tested.

Alex

On Mon, Jun 13, 2016 at 2:39 PM, Mike Nelushi mikeevolution@gmail.com wrote:

Hi Lars,

Where you able to look at this issue? I saw similar bug report**([Dhis2-devs] [Bug 1591697] [NEW] Feedback and Sending Messages via api/messageConversations fails with Null Pointer**

**). **

Please advice,

Regards,

Mike


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


Alex Tumwesigye

Technical Advisor - DHIS2 (Consultant),
Ministry of Health/AFENET | HISP Uganda

Kampala

Uganda
+256 774149 775, + 256 759 800161

Skype ID: talexie

IT Consultant (Servers, Networks and Security, Health Information Systems - DHIS2, Disease Outbreak & Surveillance Systems) & Solar Consultant

"I don’t want to be anything other than what I have been - one tree hill "

On Wed, Jun 8, 2016 at 10:41 PM, Mike Nelushi mikeevolution@gmail.com wrote:

Hi Lars,

url: localhost:8080/dhis/api/messageConversations

json: {“subject”: subject, “text”: message, “users”: users}; //POST

Regards,

Mike

On Sun, Jun 5, 2016 at 9:02 PM, Lars Helge Øverland lars@dhis2.org wrote:

Okay thanks.

Are you able to reproduce on demo?

Can you post the exact URL and payload you used??

On Jun 5, 2016 1:01 PM, “Mike Nelushi” mikeevolution@gmail.com wrote:

Hi Lars,

We are using 2.23(Build #101 (Jun 2, 2016 5:43:26 PM))

Regards,

Mike

On Sun, Jun 5, 2016 at 6:11 PM, Lars Helge Øverland lars@dhis2.org

wrote:

Which DHIS 2 version is this?

Can you reproduce against the play demo instance?

You received this bug notification because you are subscribed to the bug

report.

https://bugs.launchpad.net/bugs/1588797

Title:

messageConversations api not sending email per user

Status in DHIS:

New

Bug description:

Hi All,

The messageConversations web-api is still a big issue because we need

to send each user specific information to their e-mails.

  1. Using {“subject”: subject, “text”: message, “users”: user} json

object, the mail gets stored on DHIS2 mail and does not send it to the

user e-mail.

LogUtil.java [http-apr-8080-exec-3])

  • INFO 2016-05-29 14:14:52,484 Invoking message sender: $Proxy53

(DefaultMessageService.java [http-apr-8080-exec-3])

  • INFO 2016-05-29 14:14:52,529 Invoking message sender:

SmsMessageSender (DefaultMessageService.java [http-apr-8080-exec-3])

  • ERROR 2016-05-29 14:14:52,579 Unexpected error occurred invoking async

method 'public java.lang.String

org.hisp.dhis.message.EmailMessageSender.sendMessage(java.lang.String,java.lang.String,jav

a.lang.String,org.hisp.dhis.user.User,java.util.Set,boolean)'.

(SimpleAsyncUncaughtExceptionHandler.java [taskScheduler-7])

org.hibernate.LazyInitializationException: failed to lazily initialize a

collection of role: org.hisp.dhis.user.User.organisationUnits, could not

initialize proxy - no Session

      at

org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:569)

      at

org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:188)

      at

org.hibernate.collection.internal.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:139)

      at

org.hibernate.collection.internal.PersistentSet.size(PersistentSet.java:156)

      at

org.hisp.dhis.common.IdentifiableObjectUtils.join(IdentifiableObjectUtils.java:76)

      at

org.hisp.dhis.user.User.getOrganisationUnitsName(User.java:288)

      at

org.hisp.dhis.message.EmailMessageSender.renderPlainContent(EmailMessageSender.java:188)

      at

org.hisp.dhis.message.EmailMessageSender.sendMessage(EmailMessageSender.java:115)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

      at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      at java.lang.reflect.Method.invoke(Method.java:498)
      at

org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)

      at

org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)

      at

org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)

      at

org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:108)

      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at

java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)

      at

java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)

      at

java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

      at

java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

      at java.lang.Thread.run(Thread.java:745)

2, Using {“subject”: subject, “text”: message, “users”: users,

“organisationUnits”: organisationUnits}, sends email to everyone in

the Orgunit and we want to send to individuals.

Please advice.

Regards,

Mike

To manage notifications about this bug go to:

https://bugs.launchpad.net/dhis2/+bug/1588797/+subscriptions

You received this bug notification because you are a member of DHIS 2

developers, which is subscribed to DHIS.

https://bugs.launchpad.net/bugs/1588797

Title:

messageConversations api not sending email per user

Status in DHIS:

New

Bug description:

Hi All,

The messageConversations web-api is still a big issue because we need

to send each user specific information to their e-mails.

  1. Using {“subject”: subject, “text”: message, “users”: user} json

object, the mail gets stored on DHIS2 mail and does not send it to the

user e-mail.

LogUtil.java [http-apr-8080-exec-3])

  • INFO 2016-05-29 14:14:52,484 Invoking message sender: $Proxy53 (DefaultMessageService.java [http-apr-8080-exec-3])

  • INFO 2016-05-29 14:14:52,529 Invoking message sender: SmsMessageSender (DefaultMessageService.java [http-apr-8080-exec-3])

  • ERROR 2016-05-29 14:14:52,579 Unexpected error occurred invoking async method 'public java.lang.String org.hisp.dhis.message.EmailMessageSender.sendMessage(java.lang.String,java.lang.String,jav

a.lang.String,org.hisp.dhis.user.User,java.util.Set,boolean)'. (SimpleAsyncUncaughtExceptionHandler.java [taskScheduler-7])

org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: org.hisp.dhis.user.User.organisationUnits, could not initialize proxy - no Session

      at org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:569)

      at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:188)

      at org.hibernate.collection.internal.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:139)

      at org.hibernate.collection.internal.PersistentSet.size(PersistentSet.java:156)

      at org.hisp.dhis.common.IdentifiableObjectUtils.join(IdentifiableObjectUtils.java:76)

      at org.hisp.dhis.user.User.getOrganisationUnitsName(User.java:288)

      at org.hisp.dhis.message.EmailMessageSender.renderPlainContent(EmailMessageSender.java:188)

      at org.hisp.dhis.message.EmailMessageSender.sendMessage(EmailMessageSender.java:115)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      at java.lang.reflect.Method.invoke(Method.java:498)

      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)

      at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)

      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)

      at org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:108)

      at java.util.concurrent.FutureTask.run(FutureTask.java:266)

      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)

      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)

      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

      at java.lang.Thread.run(Thread.java:745)

2, Using {“subject”: subject, “text”: message, “users”: users,

“organisationUnits”: organisationUnits}, sends email to everyone in

the Orgunit and we want to send to individuals.

Please advice.

Regards,

Mike

To manage notifications about this bug go to:

https://bugs.launchpad.net/dhis2/+bug/1588797/+subscriptions


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Alex Tumwesigye

Technical Advisor - DHIS2 (Consultant),
Ministry of Health/AFENET | HISP Uganda

Kampala

Uganda
+256 774149 775, + 256 759 800161

Skype ID: talexie

IT Consultant (Servers, Networks and Security, Health Information Systems - DHIS2, Disease Outbreak & Surveillance Systems) & Solar Consultant

"I don’t want to be anything other than what I have been - one tree hill "