Mirth/Java10 - Missing Class to Send Email

久未见 提交于 2020-02-06 06:23:27

问题


Mirth 3.6.0, Java 10

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

Hello,

I am getting the error above when trying to send an email through Mirth. I have read that a class is missing from Java 10 but I cannot find clear instructions to successfully resolve this issue. Any help would be greatly appreciated.


回答1:


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

You have two option:

  • As Oracle migration guide proposes to use --add-modules java.activation option during JVM start. You can set this in mirth.properties for Mirth Connect

or

  • add JavaBeans Activation Framework (JAF) to your dependencies. In Mirth Connect you would add this JAR to a Resource Directory and make your Channel depend on that resource


来源:https://stackoverflow.com/questions/52166659/mirth-java10-missing-class-to-send-email

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!