日志中的 IBM Mobileplatform foundation 7.0 错误:启动项目失败
IBM Mobileplatform foundation 7.0 error in log: Failed starting project
我正在使用 IBM Mobilefirst Platform foundation 7.0 开发环境
我正在尝试添加库 hibernate-jpa-2.1-api-1.0.0.Final.jar 我项目中的一个模块正在使用这个图书馆。
当我将它添加到构建路径时,MF 出现以下错误:
[WARNING ] Exception encountered during context initialization - cancelling refresh attempt
Error creating bean with name 'ssoExpiredLoginContextsCleanupTask' defined in URL [wsjar:file:/Users/admin/Documents/Development7.0/MYAPP/MobileFirstServerConfig/shared/resources/worklight-jee-library-7.0.0.jar!/conf/core.xml]: Invocation of init method failed; nested exception is java.lang.LinkageError: loader constraint violation: loader (instance of com/ibm/ws/classloading/internal/ThreadContextClassLoader) previously initiated loading for a different type with name "javax/persistence/FlushModeType"
[ERROR ] FWLST0003E: ========= Failed starting project /MYAPP_Mobile [project MYAPP_Mobile]
Error creating bean with name 'ssoExpiredLoginContextsCleanupTask' defined in URL [wsjar:file:/Users/admin/Documents/Development7.0/MYAPP/MobileFirstServerConfig/shared/resources/worklight-jee-library-7.0.0.jar!/conf/core.xml]: Invocation of init method failed; nested exception is java.lang.LinkageError: loader constraint violation: loader (instance of com/ibm/ws/classloading/internal/ThreadContextClassLoader) previously initiated loading for a different type with name "javax/persistence/FlushModeType"
[ERROR ] Error creating bean with name 'ssoExpiredLoginContextsCleanupTask' defined in URL [wsjar:file:/Users/admin/Documents/Development7.0/MYAPP/MobileFirstServerConfig/shared/resources/worklight-jee-library-7.0.0.jar!/conf/core.xml]: Invocation of init method failed; nested exception is java.lang.LinkageError: loader constraint violation: loader (instance of com/ibm/ws/classloading/internal/ThreadContextClassLoader) previously initiated loading for a different type with name "javax/persistence/FlushModeType"
Error creating bean with name 'ssoExpiredLoginContextsCleanupTask' defined in URL [wsjar:file:/Users/admin/Documents/Development7.0/MYAPP/MobileFirstServerConfig/shared/resources/worklight-jee-library-7.0.0.jar!/conf/core.xml]: Invocation of init method failed; nested exception is java.lang.LinkageError: loader constraint violation: loader (instance of com/ibm/ws/classloading/internal/ThreadContextClassLoader) previously initiated loading for a different type with name "javax/persistence/FlushModeType"
[ERROR ] MYAPP_Mobile: worklight///172.25.16.55: 2015-04-29T09:08:21.260Z: Error creating bean with name 'ssoExpiredLoginContextsCleanupTask' defined in URL [wsjar:file:/Users/admin/Documents/Development7.0/MYAPP/MobileFirstServerConfig/shared/resources/worklight-jee-library-7.0.0.jar!/conf/core.xml]: Invocation of init method failed; nested exception is java.lang.LinkageError: loader constraint violation: loader (instance of com/ibm/ws/classloading/internal/ThreadContextClassLoader) previously initiated loading for a different type with name "javax/persistence/FlushModeType"
您没有在问题中指定您将此 .jar 文件放在哪里。也就是说,您可能已将其添加到运行时 .war 文件。
这肯定会造成冲突,因为 MFP 使用 openJPA,而您正在尝试添加 JPA...
由于 OpenJPA 已经在使用和可用,因此建议您改用 OpenJPA,因为它与 Hibernate JPA 具有相同的用途。
你要把罐子放在哪里?
如果您有多个 java 适配器,引用同一个 jar 文件。您应该在 'server' 的 'lib' 文件夹中添加 jar 文件。
如果您需要单个适配器的特定 jar,您应该将 jar 放入 java 适配器的 'lib' 文件夹中。
有一点应该注意,如果适配器和服务器的 lib 文件夹中存在相同的 jar。来自适配器的 jar 将用于构建。
关于这个问题有一些好消息。 APAR PI59031 现在可用,它将解决在适配器中使用 Hibernate 作为 JPA 实现的问题。如果您使用的是 MobileFirst 7.0 或更高版本,请升级到 MobileFirst 7.0 晚于 2016-03-21 和 MobileFirst 7.1 晚于 2016-04-02 的修复级别
如果您使用的是 Studio 开发人员版,可以从 Eclipse MarketPlace. If you're a licensed MobileFirst customer, fixes can be obtained from FixCentral.
获得修复
我正在使用 IBM Mobilefirst Platform foundation 7.0 开发环境
我正在尝试添加库 hibernate-jpa-2.1-api-1.0.0.Final.jar 我项目中的一个模块正在使用这个图书馆。
当我将它添加到构建路径时,MF 出现以下错误:
[WARNING ] Exception encountered during context initialization - cancelling refresh attempt
Error creating bean with name 'ssoExpiredLoginContextsCleanupTask' defined in URL [wsjar:file:/Users/admin/Documents/Development7.0/MYAPP/MobileFirstServerConfig/shared/resources/worklight-jee-library-7.0.0.jar!/conf/core.xml]: Invocation of init method failed; nested exception is java.lang.LinkageError: loader constraint violation: loader (instance of com/ibm/ws/classloading/internal/ThreadContextClassLoader) previously initiated loading for a different type with name "javax/persistence/FlushModeType"
[ERROR ] FWLST0003E: ========= Failed starting project /MYAPP_Mobile [project MYAPP_Mobile]
Error creating bean with name 'ssoExpiredLoginContextsCleanupTask' defined in URL [wsjar:file:/Users/admin/Documents/Development7.0/MYAPP/MobileFirstServerConfig/shared/resources/worklight-jee-library-7.0.0.jar!/conf/core.xml]: Invocation of init method failed; nested exception is java.lang.LinkageError: loader constraint violation: loader (instance of com/ibm/ws/classloading/internal/ThreadContextClassLoader) previously initiated loading for a different type with name "javax/persistence/FlushModeType"
[ERROR ] Error creating bean with name 'ssoExpiredLoginContextsCleanupTask' defined in URL [wsjar:file:/Users/admin/Documents/Development7.0/MYAPP/MobileFirstServerConfig/shared/resources/worklight-jee-library-7.0.0.jar!/conf/core.xml]: Invocation of init method failed; nested exception is java.lang.LinkageError: loader constraint violation: loader (instance of com/ibm/ws/classloading/internal/ThreadContextClassLoader) previously initiated loading for a different type with name "javax/persistence/FlushModeType"
Error creating bean with name 'ssoExpiredLoginContextsCleanupTask' defined in URL [wsjar:file:/Users/admin/Documents/Development7.0/MYAPP/MobileFirstServerConfig/shared/resources/worklight-jee-library-7.0.0.jar!/conf/core.xml]: Invocation of init method failed; nested exception is java.lang.LinkageError: loader constraint violation: loader (instance of com/ibm/ws/classloading/internal/ThreadContextClassLoader) previously initiated loading for a different type with name "javax/persistence/FlushModeType"
[ERROR ] MYAPP_Mobile: worklight///172.25.16.55: 2015-04-29T09:08:21.260Z: Error creating bean with name 'ssoExpiredLoginContextsCleanupTask' defined in URL [wsjar:file:/Users/admin/Documents/Development7.0/MYAPP/MobileFirstServerConfig/shared/resources/worklight-jee-library-7.0.0.jar!/conf/core.xml]: Invocation of init method failed; nested exception is java.lang.LinkageError: loader constraint violation: loader (instance of com/ibm/ws/classloading/internal/ThreadContextClassLoader) previously initiated loading for a different type with name "javax/persistence/FlushModeType"
您没有在问题中指定您将此 .jar 文件放在哪里。也就是说,您可能已将其添加到运行时 .war 文件。
这肯定会造成冲突,因为 MFP 使用 openJPA,而您正在尝试添加 JPA...
由于 OpenJPA 已经在使用和可用,因此建议您改用 OpenJPA,因为它与 Hibernate JPA 具有相同的用途。
你要把罐子放在哪里?
如果您有多个 java 适配器,引用同一个 jar 文件。您应该在 'server' 的 'lib' 文件夹中添加 jar 文件。 如果您需要单个适配器的特定 jar,您应该将 jar 放入 java 适配器的 'lib' 文件夹中。 有一点应该注意,如果适配器和服务器的 lib 文件夹中存在相同的 jar。来自适配器的 jar 将用于构建。
关于这个问题有一些好消息。 APAR PI59031 现在可用,它将解决在适配器中使用 Hibernate 作为 JPA 实现的问题。如果您使用的是 MobileFirst 7.0 或更高版本,请升级到 MobileFirst 7.0 晚于 2016-03-21 和 MobileFirst 7.1 晚于 2016-04-02 的修复级别
如果您使用的是 Studio 开发人员版,可以从 Eclipse MarketPlace. If you're a licensed MobileFirst customer, fixes can be obtained from FixCentral.
获得修复