Bug 218012

Summary: java/javamail needs jaf runtime dependency
Product: Ports & Packages Reporter: Dr. Jochen Raßler <jochen.rassler>
Component: Individual Port(s)Assignee: Alex Dupre <ale>
Status: Closed Unable to Reproduce    
Severity: Affects Some People CC: jochen.rassler
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
a test case for build dependencies none

Description Dr. Jochen Raßler 2017-03-22 17:15:39 UTC
javamail needs runtime dependency to Java Activation Framework (jaf), as some classes in javamail throw exceptions defined in jaf.
Comment 1 Alex Dupre freebsd_committer freebsd_triage 2017-04-10 08:34:18 UTC
The JAF was needed only on Java6, all successive versions already includes the Java Activation Framework by default.
Comment 2 Dr. Jochen Raßler 2017-04-10 16:38:53 UTC
I have OpenJDK 7 + OpenJDK 8 plus openJFX-devel plus JavaMail installed and could not find the activation.jar anywhere on my system. I needed to manually install jaf 1.1 to get JavaMail applications to run.

If startet directly from eclipse (4.6 in my case) everything runs fine, because eclipse has jaf included. But running the application standalone it looks for activation.jar in the classpath, which was nowhere to find.

So I personally don't see this bug as overcome by events. Please re-look into this issue. Maybe the build target may be modified to explicitly install the activation.jar into the classpath, which is /usr/local/share/java/classes on my system per default
Comment 3 Alex Dupre freebsd_committer freebsd_triage 2017-04-10 16:51:06 UTC
if you look into the JRE rt.jar file you'll find the same classes that are in the jaf.jar file, so I'm not sure how it cannot work for you.
Comment 4 Dr. Jochen Raßler 2017-04-10 16:57:53 UTC
JavaMail explicitly looks for activation.jar so it needs activation.jar (which is provided by jaf 1.1 and jaf 1.1 does not provide a jaf.jar on my system, as I expected) or JavaMail needs to be reconfigured to look for the classes in rt.jar.

Maybe they wrote their own classloader, which avoids the default classloader hierarchy mechanism...
Comment 5 Alex Dupre freebsd_committer freebsd_triage 2017-04-10 16:59:56 UTC
Ok, I'll have check and fix how javamail searches for activation.jar, because it shouldn't do it in that way.
Comment 6 Alex Dupre freebsd_committer freebsd_triage 2017-04-10 17:50:57 UTC
Can you provide a test case to reproduce the issue?
Comment 7 Dr. Jochen Raßler 2017-04-17 15:24:56 UTC
Created attachment 181845 [details]
a test case for build dependencies
Comment 8 Dr. Jochen Raßler 2017-04-17 15:40:49 UTC
the test case is obsolete.
Sorry for posting this one to fast, it currently doesn't clearly express the problem.
I'm working on a better test case to clearly show the problem
Comment 9 Alex Dupre freebsd_committer freebsd_triage 2017-08-07 12:27:46 UTC
Any progress on the test case?