Question & Answer
Question
Why do I receive an org.osgi.framework.BundleException when installing an OSGi Bundle in my CICS Transaction Sever for z/OS (CICS TS) V5.3 region? I used CICS Explorer to create the OSGi Bundle.
The bundle install failed with the following messages:
2016/08/22 13:53:24.752000 EDT E [ENABLE_OSGIBUNDLE_Thread-6][com.ibm.cics.osgi.impl] @Error: Controller.enableBundle() - ID = 14
org.osgi.framework.BundleException: Could not resolve module: UWSQA532 [14]
Unresolved requirement: Import-Package: com.ibm.cics.server; version="1.603.0"
at org.eclipse.osgi.container.Module.start(Module.java:434)
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:393)
at com.ibm.cics.osgi.impl.Controller.enableBundle(Controller.java:759)
at com.ibm.cics.osgi.impl.Controller.acceptRequest(Controller.java:317)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
at java.lang.reflect.Method.invoke(Method.java:620)
at com.ibm.cics.router.Router.route(Router.java:1106)
Exception in thread "ENABLE_OSGIBUNDLE_Thread-6" org.osgi.framework.BundleException: Could not resolve module: UWSQA532 [14]
Unresolved requirement: Import-Package: com.ibm.cics.server; version="1.603.0"
at org.eclipse.osgi.container.Module.start(Module.java:434)
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:393)
at com.ibm.cics.osgi.impl.Controller.enableBundle(Controller.java:759)
at com.ibm.cics.osgi.impl.Controller.acceptRequest(Controller.java:317)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
at java.lang.reflect.Method.invoke(Method.java:620)
at com.ibm.cics.router.Router.route(Router.java:1106)
Answer
In order to debug this problem you will need to recreate the problem with the correct CICS and JVMServer tracing turned if not already done. You should do the following:
Activate CICS internal trace
Set all CICS internal trace components to level 1 except AP=1-2 and SJ=ALL
Ensure the internal trace table size is 1-2M
Recreate the problem
Enter CEMT PER SNAP to take a dump of the CICS region
Once you have the documentation, start by reviewing the JVMServer trace file DFHJVMTRC. I could see the following "Bundle status" in the entries in this file:
2016/08/22 13:53:24.737000 EDT D [INSTALL_OSGIBUNDLE_Thread-5][com.ibm.cics.osgi.impl] @Event: Controller.printBundles() - Bundle status
id State Bundle
0 ACTIVE org.eclipse.osgi_3.10.2.v20150203-1939
1 ACTIVE org.eclipse.osgi.services_3.4.0.v20140312-2051
2 ACTIVE com.ibm.ws.org.apache.felix.scr.2.0.3_1.0.11.cl50820151201-1942
3 ACTIVE com.ibm.cics.osgi.log_1.0.0
4 ACTIVE com.ibm.cics.ras_1.300.0
5 ACTIVE com.ibm.ras_1.300.0
6 ACTIVE com.ibm.record_1.100.0
7 ACTIVE com.ibm.cics.osgi_1.200.0
8 ACTIVE com.ibm.cics.domains_1.300.0
9 ACTIVE **com.ibm.cics.server_1.601.0**
10 ACTIVE com.ibm.cics.osgi.impl_1.200.0
11 ACTIVE com.ibm.db2.jcc_1.4.0
12 ACTIVE com.ibm.db2.jcc.licenses_1.0.0
13 ACTIVE com.ibm.mq.osgi.java_7.1.0.6
14 INSTALLED UWSQA532_1.0.0
This shows that UWSQA532_1.0.0 is not active as reported. Looking at the active bundles I can see that version 1.601.0 of com.ibm.cics.server is active.
Further down in the DFHJVMTRC trace I see the following exception:
2016/08/22 13:53:24.752000 EDT E [ENABLE_OSGIBUNDLE_Thread-6][com.ibm.cics.osgi.impl] @Error: Controller.enableBundle() - ID = 14
org.osgi.framework.BundleException: Could not resolve module: UWSQA532 [14]
Unresolved requirement: Import-Package: com.ibm.cics.server; version="1.603.0"
at org.eclipse.osgi.container.Module.start(Module.java:434)
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:393)
at com.ibm.cics.osgi.impl.Controller.enableBundle(Controller.java:759)
at com.ibm.cics.osgi.impl.Controller.acceptRequest(Controller.java:317)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
at java.lang.reflect.Method.invoke(Method.java:620)
at com.ibm.cics.router.Router.route(Router.java:1106)
2016/08/22 13:53:24.753000 EDT D [ENABLE_OSGIBUNDLE_Thread-6][com.ibm.cics.osgi.impl] @Exit: Controller.enableBundle(), 14
2016/08/22 13:53:24.832336 EDT D [LE-Thread-18] [DFHSJSC:9535] *Exc*: call_java_router(), Exception thrown = Could not resolve module: UWSQA532 [14]
Unresolved requirement: Import-Package: com.ibm.cics.server; version="1.603.0"
This tells me that your UWSQA532 bundle is looking for com.ibm.cics.server; version="1.603.0" but com.ibm.cics.server_1.601.0 is active.
Early in the DFHJVMTRC trace I see the following entry:
2016/08/22 13:53:24.150000 EDT I Installing CICS System bundle:
/SHARE/TGRP/nonsp/cicsts/cicshome_r530/lib/com.ibm.cics.server.jar
This is the zFS directory where your com.ibm.cics.server.jar file resides. So you need to check your /SHARE/TGRP/nonsp/cicsts/cicshome_r530/lib/ directory and update the version of com.ibm.cics.server to the version your bundle is requesting.
You can use command /USSHOME/lib:>jar -tvf com.ibm.cics.server.jar | grep com.ibm.cics.server to check the PTF level of your com.ibm.cics.server.jar. This will return look something like this:
0 Fri Jul 22 09:13:02 BST 2016 com.ibm.cics.server-cics.ts.r700-PI53990
In this case, you need to be at APAR level: com.ibm.cics.server-cics.ts.r700-PI58375
As a workaround, you can edit your bundle manifest file and update the version as follows:
Import-Package: com.ibm.cics.server;version="1.601.0"
I hope you find this helpful.
Product Synonym
CICS/TS CICSTS CICS TS CICS Transaction Server
Was this topic helpful?
Document Information
Modified date:
07 September 2016
UID
dwa1300549