Mirth/Java10 - 缺少 Class 发送电子邮件

Mirth/Java10 - Missing Class to Send Email

欢乐 3.6.0,Java10

Caused by: java.lang.NoClassDefFoundError: javax/activation/DataSource

您好,

我在尝试通过 Mirth 发送电子邮件时收到上述错误。我读到 Java 10 中缺少 class,但我找不到成功解决此问题的明确说明。任何帮助将不胜感激。

In JDK 9 and JDK 10, the modules that contain CORBA or the APIs shared between Java SE and Java EE are not resolved by default when you compile or run code on the class path. These modules are deprecated for removal. The policy of not resolving these modules is a first step toward removing these APIs from Java SE and the JDK in a future release. The deprecated modules are:

  • java.corba — CORBA
  • java.transaction — The subset of the Java Transaction API defined by Java SE to support CORBA Object Transaction Services
  • java.activation — JavaBeans Activation Framework
  • java.xml.bind — Java Architecture for XML Binding (JAXB)
  • java.xml.ws — Java API for XML Web Services (JAX-WS), Web Services Metadata for the Java Platform, and SOAP with Attachments for Java (SAAJ)
  • java.xml.ws.annotation — The subset of the JSR-250 Common Annotations defined by Java SE to support web services

Existing code with references to classes in these APIs will not compile without changes to the build. Similarly, code on the class path with references to classes in these APIs will fail with NoDefClassFoundError or ClassNotFoundException unless changes are made in how the application is deployed.

See JEP 320: Remove the Java EE and CORBA Modules to get more information about migration options, possible replacements for the modules, and to track the progress of the removal of the Java EE and CORBA modules from the JDK.

source

你有两个选择:

  • 因为 Oracle 迁移指南建议在 JVM 启动期间使用 --add-modules java.activation 选项。您可以在 mirth.properties 中为 Mirth Connect
  • 设置此项

  • 添加到您的依赖项中。在 Mirth Connect 中,您可以将此 JAR 添加到资源目录并使您的频道依赖于该资源