IBM Support

OSGi application bundle using JPA 2.1 might fail to resolve

Troubleshooting


Problem

An OSGi application EBA might contain bundles that use JPA. If an EBA bundle imports the javax.persistence packages with a minimum required version of 2.1 then the following error occurs: Cannot resolve EBA file. Exception: org.apache.aries.application.management.ResolverException: The system cannot provision the EBA [application name] because the following problems in the dependency chain were detected: The package dependency javax.persistence with the version greater than or equal to 2.1.0 required by bundle [bundle name] cannot be resolved.

Symptom

An error will occur when trying to import an OSGi application asset EBA to a WebSphere Application Server.

Cause

The OSGi application support is not properly detecting the version of the javax.persistence packages available by the WebSphere Application Server.

Resolving The Problem

Modify the EBA bundle by dropping the version range specified by the bundle's manifest header Import-Package for the javax.persistence packages.

[{"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"--","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF012","label":"IBM i"},{"code":"PF016","label":"Linux"},{"code":"PF014","label":"iOS"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"},{"code":"PF035","label":"z\/OS"},{"code":"PF013","label":"Inspur K-UX"},{"code":"PF022","label":"OS X"}],"Version":"9.0.0.0","Edition":"Feature Pack for OSGi Applications and Java Persistence API 2.0","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
15 June 2018

UID

swg21989816