Fixes are available
APAR status
Closed as program error.
Error description
When JPA persistence units are defined in a persistence.xml contained in a jar file within the /lib directory of a WAR file, the persistence units cannot be found by the application. The symptom is that dependency injection of the EntityManager or EntityManagerFactory will fail similar to the following: [6/11/12 14:38:21:565 CDT] 0000003b com.ibm.ws.jpa.management.JPAApplInfo E CWWJP0029E: The server cannot find the ImageFileUpload persistence unit in the WebCustomSalesQuoteLite module and the ERWW_Lite application. [6/11/12 14:38:21:596 CDT] 0000003b com.ibm.wsspi.injectionengine.InjectionBinding E CWNEN0035E: The ImageFileUploadServlet/emf reference of type javax.persistence.EntityManagerFactory for the null component in the WebCustomSalesQuoteLite module of the ERWW_Lite application cannot be resolved.
Local fix
Problem summary
**************************************************************** * USERS AFFECTED: All users of IBM WebSphere Application * * Server Liberty Profile with Java * * Persistence API (JPA) applications that * * contain persistence.xml files in JAR files * * within the lib directory of a WAR file. * **************************************************************** * PROBLEM DESCRIPTION: JPA persistence units defined in web * * fragments cannot be found. * **************************************************************** * RECOMMENDATION: * **************************************************************** When JPA persistence units are defined in a persistence.xml contained in a jar file within the /lib directory of a WAR file, the persistence units cannot be found by the application. The symptom is that dependency injection of the EntityManager or EntityManagerFactory will fail similar to the following: [6/11/12 14:38:21:565 CDT] 0000003b com.ibm.ws.jpa.management.JPAApplInfo E CWWJP0029E: The server cannot find the MyPU persistence unit in the MyAppModule module and the MY_APP application. [6/11/12 14:38:21:596 CDT] 0000003b com.ibm.wsspi.injectionengine.InjectionBinding E CWNEN0035E: The MyServlet/emf reference of type javax.persistence.EntityManagerFactory for the null component in the MyAppModule module of the MY_APP application cannot be resolved.
Problem conclusion
The product code was incorrectly setting the persistence unit archive name to that of the fragment jar rather than the name of the WAR that contains it. This has been corrected. The fix for this APAR is currently targeted for inclusion in fix pack 8.5.0.1. Please refer to the Recommended Updates page for delivery information: http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
Temporary fix
Comments
APAR Information
APAR number
PM69489
Reported component name
LIBERTY PROFILE
Reported component ID
5724J0814
Reported release
850
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2012-07-24
Closed date
2012-09-24
Last modified date
2012-09-24
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
LIBERTY PROFILE
Fixed component ID
5724J0814
Applicable component levels
R850 PSY
UP
[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"850","Line of Business":{"code":"LOB45","label":"Automation"}}]
Document Information
Modified date:
29 October 2021