javax.activation, which creates DataSource objects for attachments, is deprecated in Java 9+. Without the interim fix of adding the javax.activation module to the JVM start, the JVM silently hangs looking for it. It was hard tracking down the reason why after moving from Java 8 to 11 my app hung when one of my classes was loaded.
The docs should be updated to warn that withAttachment using a javax.activation DataSource will fail on Java ≥ 9, and that either byte arrays should be used exclusively, or Jakarta Activation used instead.
javax.activation, which createsDataSourceobjects for attachments, is deprecated in Java 9+. Without the interim fix of adding thejavax.activationmodule to the JVM start, the JVM silently hangs looking for it. It was hard tracking down the reason why after moving from Java 8 to 11 my app hung when one of my classes was loaded.The docs should be updated to warn that
withAttachmentusing ajavax.activationDataSourcewill fail on Java ≥ 9, and that either byte arrays should be used exclusively, or Jakarta Activation used instead.