javahibernatejpaibm-mobilefirstmobilefirst-studio

IBM Mobileplatform foundation 7.0 error in log: Failed starting project


I am using IBM Mobilefirst Platform foundation 7.0 development environment

I am trying to add library hibernate-jpa-2.1-api-1.0.0.Final.jar for one of module in my project is using this library.

when I add it to the build path MF gives me following error:

[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"

Solution

  • Got some good news regarding this issue. APAR PI59031 is now available that will address the issue of using Hibernate as the JPA implementation in an adapter. If you are using MobileFirst 7.0 or above, please upgrade to a fix level later than 2016-03-21 for MobileFirst 7.0 and 2016-04-02 for MobileFirst 7.1

    If you're using the Developer Edition of Studio, fixes can be obtained from the Eclipse MarketPlace. If you're a licensed MobileFirst customer, fixes can be obtained from FixCentral.