The API jar files are ONLY intended for compiling against.
You should not expect to be able to include them at runtime. At
runtime you need a complete implementation. A complete
implementation of Jakarta EE is one of the several compatible app
servers. If you're developing a Jakarta EE application, all of the
Jakarta EE APIs should be a "provided" dependency in Maven, since
the APIs and implementation are provided by the app server, not
something that you need to package with your application.
Kevin Sutter wrote on 10/17/19 1:38 PM:
Hmm... I
think
we might be confusing the API with the Implementation. I'm
copying
Bill to get his reading...
If we use the
jakarta.mail:jakarta.mail-api:1.6.4 coordinates as presented on
our website
(https://jakarta.ee/specifications/mail/1.6/),
then this jar file does not contain the PropUtil class you are
looking
for. This looks to be just the API.
https://search.maven.org/artifact/jakarta.mail/jakarta.mail-api/1.6.4/jar
And, that one
looks consistent with the previous javax mail api.
https://search.maven.org/artifact/javax.mail/javax.mail-api/1.6.2/jar
But, if you
use
the com.sun.mail:jakarta.mail:1.6.4 coordinates, then the more
complete
jar file is available and this one contains the PropUtil class.
https://search.maven.org/artifact/com.sun.mail/jakarta.mail/1.6.4/jar
Which is also
more consistent with the previous javax mail artifact.
https://search.maven.org/artifact/com.sun.mail/javax.mail/1.6.2/jar
---------------------------------------------------
Kevin Sutter
STSM, MicroProfile and Jakarta EE architect
e-mail: sutter@xxxxxxxxxx Twitter: @kwsutter
phone: tl-553-3620 (office), 507-253-3620 (office)
LinkedIn: https://www.linkedin.com/in/kevinwsutter
From:
"Guillermo
González de Agüero" <z06.guillermo@xxxxxxxxx>
To:
jakartaee-platform
developer discussions <jakartaee-platform-dev@xxxxxxxxxxx>
Date:
10/17/2019
12:47 PM
Subject:
[EXTERNAL]
Re: [jakartaee-platform-dev] lassNotFoundException:
com.sun.mail.util.PropUtil
when using javax.mail.internet.InternetAddress
Sent
by: jakartaee-platform-dev-bounces@xxxxxxxxxxx
Hi,
Are you getting this error while
building,
or at runtime? I have successfully compiled projects with the
new Jakarta
EE 8 dependency without any hassle. Can you please post the full
log?
Regards,
Guillermo González de Agüero
On Thu, Oct 17, 2019 at 1:00 PM
Patrick
Reinhart <patrick@xxxxxxxxx>
wrote:
Hello
everyone,
I just switched over our build dependency from JavaEE 8 to
JakartaEE 8
and now I get this ClassNotFoundException:
java.lang.NoClassDefFoundError: com/sun/mail/util/PropUtil
at
javax.mail.internet.InternetAddress.<clinit>(InternetAddress.java:62)
at
CH.obj.commons.di.util.InternetAddresses.parseInternetAddress(InternetAddresses.java:56)
at
CH.obj.commons.di.util.InternetAddresses.create(InternetAddresses.java:35)
at
CH.obj.di.process.action.email.SendEmailActionTest$1.createNotification(SendEmailActionTest.java:94)
at
CH.obj.di.process.action.email.SendEmailAction.perform(SendEmailAction.java:40)
at
CH.obj.di.process.action.email.SendEmailActionTest.testPerform(SendEmailActionTest.java:102)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException:
com.sun.mail.util.PropUtil
at
java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at
java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at
java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 7 more
Should it not be possible to use all API classes within the
JakartaEE
API to be self contained?
Best regards,
Patrick
_______________________________________________
jakartaee-platform-dev mailing list
jakartaee-platform-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or
unsubscribe
from this list, visit
https://www.eclipse.org/mailman/listinfo/jakartaee-platform-dev_______________________________________________
jakartaee-platform-dev mailing list
jakartaee-platform-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or
unsubscribe
from this list, visit
https://www.eclipse.org/mailman/listinfo/jakartaee-platform-dev
|