ERROR org.springframework.scheduling.support.TaskUtils$LoggingErrorHandler 96 handleError - Unexpected error occurred in scheduled task. java.lang.ExceptionInInitializerError: JCo initialization failed with java.lang.ExceptionInInitializerError: Illegal JCo archive "sapjco3-3.0.jar". It is not allowed to rename or repackage the original archive "sapjco3.jar".
以上是完整错误信息,目前为止我还是不知道这个是什么问题导致的,很神奇的是其他同事没有这个问题,只有我这边有。
看错误日志,可以看出是是sapjco3-3.0.jar不允许重命名sapjco3.jar,然后我又尝试用maven打成jar包,然后使用压缩文件,将sapjco3-3.0.jar重命名为sapjco3.jar再次运行,发现可以启动成功。
但是在编辑器idea中这么改名呢?后面我想到一个好办法用maven引入本地jar
<dependency>
<groupId>org.hibersap</groupId>
<artifactId>sapjco3</artifactId>
<version>3.0.0</version>
<scope>system</scope>
<systemPath>E:/sapjco3/sapjco3.jar</systemPath>
</dependency>