AAS9 金蝶天燕9 部署Lams(2023年以后版本)失败:
错误:
2023-10-25 08:32:33 错误 [apusic.application.Lams-main] 启动失败
java.lang.Exception: java.lang.NoSuchMethodError: javax.persistence.EntityManagerFactory.unwrap(Ljava/lang/Class;)Ljava/lang/Object;
at com.apusic.deploy.runtime.J2EEApplication.startService(J2EEApplication.java:1122)
at com.apusic.service.Service.start(Service.java:205)
at com.apusic.deploy.runtime.J2EEDeployer.startUserApplications(J2EEDeployer.java:169)
at com.apusic.deploy.runtime.J2EEDeployer.startService(J2EEDeployer.java:136)
at com.apusic.service.Service.start(Service.java:205)
at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.apusic.jmx.MBeanDescriptor.invoke(MBeanDescriptor.java:551)
解决:
这个问题是由于jar冲突导致的,Lams使用了较新的jar,和金蝶天燕冲突了。解决步骤:
1. 关闭金蝶天燕的情况下,需要将Lams下的jakarta.persistence-api-2.2.3.jar 复制到 ASS9\AAS-V9.0\lib\ext\目录下
2. 重命名 javax.persistence-2.0.5.jar 为 javax.persistence-2.0.5.jar_bak。
done 搞定 重启金蝶天燕试试