weblogic12c - Deploying OSGi bundle on Oracle 12c throws NPE -
on weblogic 12.2.1, trying deploy simple osgi bundle war file using admin console throws npe following logs.
caused by: java.lang.nullpointerexception: @ org.apache.felix.framework.cache.jarrevision.getmainattributes(jarrevision.java:210) @ org.apache.felix.framework.cache.jarrevision.getmanifestheader(jarrevision.java:104) @ org.apache.felix.framework.bundleimpl.createrevision(bundleimpl.java:1235) @ org.apache.felix.framework.bundleimpl.<init>(bundleimpl.java:112) @ org.apache.felix.framework.felix.installbundle(felix.java:2905) @ org.apache.felix.framework.bundlecontextimpl.installbundle(bundlecontextimpl.java:165)
as prerequisite created osgi framework (services->osgi frameworks) based on apache felix. bundle api project few interfaces wrapped in war file. structure of war file below:
myapi-project.war - meta-inf - web-inf - classes - lib - osgi-lib - api-project.jar - weblogic.xml
weblogic.xml contents are:
<wls:osgi-framework-reference> <wls:name>cps-osgi</wls:name> <wls:application-bundle-version>1.0</wls:application-bundle-version> <wls:application-bundle-symbolic-name>cpsservices.approval</wls:application- bundle-symbolic-name> <wls:bundles-directory>osgi-lib</wls:bundles-directory>
api project menifest.mf contents:
manifest-version: 1.0 implementation-vendor: baml implementation-title: cps api implementation-version: 1.0.0 bundle-manifestversion: 2 bundle-symbolicname: cpsservices.api bundle-name: cpsservices api bundle bundle-vendor: baml bundle-version: 1.0.0 export-package: com.bofa.cp.core, com.bofa.cp.services bundle-activator: com.bofa.cp.core.activator
i have tried adding additional menifest attributes didn't resolve issue. stuck on point last 2 days. appreciated. thanks.
update: here screenshot of jarrevision class in org.apache.felix.org.apache.felix.main.jar v4.4 comes app server oracle 12.2.1 -
possible reason felix cant read menifest.mf file reason. confirm understanding, changed bundle symbolic name in file, didn't change exception. guess close ...
resolved issue. guess - typo in manifest.mf file name(created file name menifest.mf). need break :)
Comments
Post a Comment