Mirth/Java10-缺少发送电子邮件的课程 [英] Mirth/Java10 - Missing Class to Send Email

查看:135
本文介绍了Mirth/Java10-缺少发送电子邮件的课程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

3.6.0版Java 10

原因:java.lang.NoClassDefFoundError:javax/activation/DataSource

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

你好,

尝试通过Mirth发送电子邮件时,出现上述错误.我已经阅读到Java 10中缺少一个类,但是我找不到明确的说明来成功解决此问题.任何帮助将不胜感激.

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.

推荐答案

在JDK 9和JDK 10中,包含CORBA或API的模块 默认情况下,默认情况下不解决Java SE和Java EE之间共享的问题 您在类路径上编译或运行代码.这些模块是 不建议移除.不解决这些模块的政策是 从Java SE和JDK中删除这些API的第一步 将来的版本.不推荐使用的模块是:

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 — Java的子集 Java SE定义的事务API,以支持CORBA对象事务服务
  • java.activation — JavaBeans激活框架
  • java.xml.bind — XML绑定的Java体系结构(JAXB)
  • java.xml.ws — XML Web服务的Java API(JAX-WS),Java平台的Web服务元数据和Java附件的SOAP(SAAJ)
  • java.xml.ws.annotation-Java SE定义的JSR-250通用注释的子集,以支持Web服务
  • 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

引用这些API中的类的现有代码不会 无需更改构建即可进行编译.同样,在类上的代码 引用这些API中的类的路径将失败 除非进行更改,否则NoDefClassFoundError或ClassNotFoundException 有关如何部署应用程序的信息.

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.

请参见 JEP 320:删除Java EE和CORBA模块以获得有关迁移的更多信息选项,模块的可能替代品以及跟踪 从JDK中删除Java EE和CORBA模块的进展.

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.

您有两种选择:

  • 因为Oracle迁移指南建议在JVM启动期间使用--add-modules java.activation选项.您可以在mirth.properties中为Mirth Connect设置此功能
  • 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

  • 添加 JavaBeans激活框架(JAF) 到您的依赖项.在Mirth Connect中,您可以将此JAR添加到资源目录中,并使您的频道依赖于该资源
  • 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

这篇关于Mirth/Java10-缺少发送电子邮件的课程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆