我想分享使用 Spring Boot Starter Mail 时上述问题的解决方案,并尝试创建 MimeMessageHelper 实例导致异常:无法从类 javax.activation.MimetypesFileTypeMap 访问类 com.sun.activation.registries.LogSupport
问题出在 4.0.0 版本中的 jaxb-core 依赖性背后,它带来了 angus-activation 库依赖性。如果首先加载的库没有 LogSupport 的公共类。LogSupport 的正确来源来自 com.sun.activation:jakarta.activation 库。
解决方案是在 jaxb-core 依赖项中排除以下内容:
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<version>4.0.0</version>
<exclusions>
<exclusion>
<groupId>org.eclipse.angus</groupId>
<artifactId>angus-activation</artifactId>
</exclusion>
</exclusions>
</dependency>
Run Code Online (Sandbox Code Playgroud)
同时以下依赖项应该可用:
<dependency>
<groupId>com.sun.activation</groupId>
<artifactId>jakarta.activation</artifactId>
<version>2.0.1</version>
</dependency>
Run Code Online (Sandbox Code Playgroud) 我最近将我的项目从Spring Framework 4.3.10升级到了5.0.1。升级后,namedParameterJdbcTemplate.batchUpdate开始因此错误而失败
ORA-01000:超出了最大打开游标。
批次更新250记录的时间没有改变,并且在Spring 4.3.x上运行良好。
有没有人遇到过与Spring 5.0.1类似的问题?
我没有在Spring文档中看到任何与batchUpdate使用有关的更改。
有任何线索或是否是关于吉尔的候选人。
我已经将spring-jdbc单独回滚到版本4.3.10,该版本解决了该问题。我也提出了Jira回归缺陷https://jira.spring.io/browse/SPR-16139