Upgrad to java 8 causes orika mapper in unittest java.io.IOException: invalid constant type: 15 at 142

人走茶凉 提交于 2019-12-01 21:20:37

Your idea goes into the right direction.

the java.lang.RuntimeException: java.io.IOException: invalid constant type: 15 at 142 shows that the the application has problems with java 8 - as explained inn your link.

The ma.glasnost.orika mapper depends on javassist as you can see in the Stack Trace. This is a transitive dependency of orika.

You could use mvn dependency:tree -verbose to build a dependency tree. There you can look up the what library is depending eg on javassist and the exact version.

To use a javassist version that is Java 8 compatible use that dependency to overwrite the implicit dependency of orika:

  <dependency>
    <groupId>org.javassist</groupId>
    <artifactId>javassist</artifactId>
    <version>3.18.2-GA</version>
  </dependency>

But for this example it might by better to upgrade the orika version to 1.4.6 as this one is Java 8 ready.

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