bbottema / simple-java-mail

Simple API, Complex Emails (Jakarta Mail smtp wrapper)
http://www.simplejavamail.org
Apache License 2.0
1.2k stars 261 forks source link

java.lang.NoClassDefFoundError: org/jacoco/agent/rt/internal_c13123e/Offline #505

Closed meeximum closed 2 months ago

meeximum commented 2 months ago

I'm using latest version 8.8.1

and get the following error

Caused by: java.lang.NoClassDefFoundError: org/jacoco/agent/rt/internal_c13123e/Offline at org.bbottema.clusteredobjectpool.core.ClusterConfig.$jacocoInit(ClusterConfig.java) at org.bbottema.clusteredobjectpool.core.ClusterConfig.builder(ClusterConfig.java) at org.simplejavamail.smtpconnectionpool.SmtpClusterConfig.(SmtpClusterConfig.java:50) at org.simplejavamail.internal.batchsupport.ClusterHelper.configureSmtpClusterConfig(ClusterHelper.java:40) at org.simplejavamail.internal.batchsupport.BatchSupport.ensureClusterInitialized(BatchSupport.java:97) at org.simplejavamail.internal.batchsupport.BatchSupport.registerToCluster(BatchSupport.java:87) at org.simplejavamail.mailer.internal.MailerImpl.initCluster(MailerImpl.java:297) at org.simplejavamail.mailer.internal.MailerImpl.(MailerImpl.java:141) at org.simplejavamail.mailer.internal.MailerImpl.(MailerImpl.java:119) at org.simplejavamail.mailer.internal.MailerRegularBuilderImpl.buildMailer(MailerRegularBuilderImpl.java:210) at at.balecon.portal.services.MailerService.(MailerService.java:42) at at.balecon.portal.services.MailerService.getInstance(MailerService.java:32) at at.balecon.portal.ui.UserWPB.sendInfoMail(UserWPB.java:507) at at.balecon.portal.ui.UserWPB.onSave(UserWPB.java:392) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.eclnt.jsfserver.util.StackedMethodExpression.invoke(StackedMethodExpression.java:109) ... 91 more

meeximum commented 2 months ago

so I call in Coding

Mailer mailer = MailerBuilder.withSMTPServerHost(ConfigService.getInstance().getMailHost())
                .withSMTPServerPort(ConfigService.getInstance().getMailPort())
                .withSMTPServerUsername(ConfigService.getInstance().getMailUsername())
                .withSMTPServerPassword(ConfigService.getInstance().getMailPassword())
                .withTransportStrategy(TransportStrategy.SMTP_TLS).buildMailer();

EmailPopulatingBuilder emailPB = EmailBuilder.startingBlank();

Email email = emailPB.buildEmail();

mailer.sendMail(email, false);
bbottema commented 2 months ago

This is a known issue, please update to 8.8.2 (I think, or else 8.8.3).

The problem was a wrongly published release of dependency clustered-object-pool.