Project

General

Profile

Actions

Defect #655

closed

Unable to send email notification trough idm

Added by Ondřej Kopr over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
High
Assignee:
Ondřej Kopr
Category:
Notification
Target version:
Start date:
08/16/2017
Due date:
% Done:

100%

Estimated time:
Affected versions:
Owner:

Description

After configure emailer (see https://wiki.czechidm.com/7.3/dev/configuration/backend?s[]=smtp#emailer) im not able to send email notification. Exception:

org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[ID-***-44515-1502872711413-0-10]
    at org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1706)
    at org.apache.camel.impl.DefaultExchange.setException(DefaultExchange.java:348)
    at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:64)
    at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190)
    at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:109)
    at org.apache.camel.processor.UnitOfWorkProducer.process(UnitOfWorkProducer.java:68)
    at org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:412)
    at org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:380)
    at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:270)
    at org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:380)
    at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:205)
    at org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:119)
    at org.apache.camel.impl.DefaultProducerTemplate$16.call(DefaultProducerTemplate.java:664)
    at org.apache.camel.impl.DefaultProducerTemplate$16.call(DefaultProducerTemplate.java:661)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    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:748)
Caused by: java.lang.NoSuchMethodError: com.sun.mail.util.TraceInputStream.<init>(Ljava/io/InputStream;Lcom/sun/mail/util/MailLogger;)V
    at com.sun.mail.smtp.SMTPTransport.initStreams(SMTPTransport.java:2174)
    at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2093)
    at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:712)
    at javax.mail.Service.connect(Service.java:291)
    at org.apache.camel.component.mail.DefaultJavaMailSender.send(DefaultJavaMailSender.java:112)
    at org.apache.camel.component.mail.MailProducer.process(MailProducer.java:63)
    at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
    ... 15 common frames omitted
Actions #2

Updated by Ondřej Kopr over 7 years ago

  • Status changed from New to In Progress
Actions #3

Updated by Ondřej Kopr over 7 years ago

Found problem with java version 1.8.0_131. On version 1.8.0_77 emailer works.

Actions #4

Updated by Ondřej Kopr over 7 years ago

  • Status changed from In Progress to Needs feedback
  • Assignee changed from Ondřej Kopr to Vít Švanda
  • % Done changed from 0 to 90

Resolve! Problem was with dependency hell - javax.mail-api. Exclude java.mail-api from swagger2markup.
Add into hotfix 7.3.2 and develop.

commit: https://github.com/bcvsolutions/CzechIdMng/commit/90392f3f6073e3d46bb959a589334ee911b6d1a4

Actions #5

Updated by Filip Měšťánek over 7 years ago

Is it possible to write automatic test for sending an email?

Actions #6

Updated by Ondřej Kopr over 7 years ago

Filip Měšťánek wrote:

Is it possible to write automatic test for sending an email?

Im not sure if this is possible, Emailer need setup smtp server with username and password. Im not able to add this information now to tests. Test server with smtp is missing :( this problem i will consult with Zdenek.

https://github.com/bcvsolutions/CzechIdMng/blob/develop/Realization/backend/core/core-impl/src/main/java/eu/bcvsolutions/idm/core/notification/service/impl/DefaultEmailer.java#L94-L100

Actions #7

Updated by Filip Měšťánek over 7 years ago

Ok, thank you, please try to consult it. It think this is a very important functionality and it would be good if it was automatically tested.

Actions #8

Updated by Vít Švanda over 7 years ago

  • Status changed from Needs feedback to Resolved
  • Assignee changed from Vít Švanda to Ondřej Kopr
  • Target version set to Diamond (7.4.0)
  • % Done changed from 90 to 100

Tested (on develop) and works fine.

Actions #9

Updated by Ondřej Kopr over 7 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF