MQSeries CSIException: JMSCS0002 but classpath looks ok for commonservices - ibm-mq

In trying to connect from an MQSeries 7.5 client to a 7.5 local server I'm getting a CSIException: JMSCS0002 which when I look up the error in the IBM codes says:
JMSCS0002
The call could not be completed because CommonServices has not been initialized.
CommonServices is an internal component and needs to be initialized at startup but has failed.
Check that the installation and classpath setup is correct.
But both my compile and run classpaths include com.ibm.mq.commonservices.jar, com.ibm.msg.client.commonservices.jar, and com.ibm.msg.client.commonservices.j2se.jar
I'm was using Oracle JDK 1.6. I tried using the WS MQ java but it made no difference.
Any help appreciated. Thanks.
Caused by: com.ibm.msg.client.commonservices.CSIException: JMSCS0002
at com.ibm.msg.client.commonservices.workqueue.PIWorkQueueManager.enqueueItem(PIWorkQueueManager.java:67)
at com.ibm.msg.client.commonservices.workqueue.WorkQueueManager.enqueue(WorkQueueManager.java:225)
at com.ibm.msg.client.commonservices.workqueue.WorkQueueManager.enqueue(WorkQueueManager.java:194)
at com.ibm.msg.client.wmq.common.internal.WMQThreadPool.enqueue(WMQThreadPool.java:91)

I had been using jar files from an uninstalled MQSeries 7.5 Client because I wanted to make sure that the functionality I was using would work just with the jars provided by the free client license. According to IBM documentation taking uninstalled jars is problematic.
When I switched to the jars from the installed server trial then things works ok.

Related

Error connecting CICS from websphere liberty profile

I´m trying to deploy a war that connects to CISC into a Websphere Liberty Profile app server 8.5.5. It works perfectly in WAS, however there is a feature missing but I don´t know which.
java.lang.ClassNotFoundException: com.ibm.etools.marshall.util.ConversionUtils
at com.ibm.ws.classloading.internal.AppClassLoader.findClassCommonLibraryClassLoaders(AppClassLoader.java:504)
at com.ibm.ws.classloading.internal.AppClassLoader.findClass(AppClassLoader.java:276)
at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:941)
at java.lang.ClassLoader.loadClass(ClassLoader.java:876)
at com.ibm.ws.classloading.internal.AppClassLoader.findOrDelegateLoadClass(AppClassLoader.java:482)
at com.ibm.ws.classloading.internal.AppClassLoader.loadClass(AppClassLoader.java:443)
at java.lang.ClassLoader.loadClass(ClassLoader.java:846)
It looks like you are missing the "Record" class from the development tools (such as Rational Application Developer). In Liberty these classes are not bundled with the runtime and need to be imported. The instructions are here:
https://www.ibm.com/support/knowledgecenter/en/SS7K4U_liberty/com.ibm.websphere.wlp.zseries.doc/ae/twlp_dat_radrecdata.html
This includes the conversion utils that your stack trace is showing.

Liberty Profile and MQ version conflict

I currently have an environment where I am trying to get a Liberty Profile v8.5.5.9(using Java 7) to utilize a WebSphere MQ v9.0.3(using Java 8). These two are on the same box, the server.xml is configured correctly, but I'm getting a namespace error when I'm trying to do a direct client connection.
I'm just trying to rule out if there's a problem using these two versions together that would cause a JNDI problem.
There apparently is a conflict between the two environments. Once I removed 9.0.3 and installed 7.5(MQ) it now works.

Caused by: java.lang.NoClassDefFoundError: com/ibm/CORBA/iiop/ORB in WAS Liberty

I started using WAS Liberty 8.5 in my eclipse,when i try to deploy an application I am getting this error.
Caused by: java.lang.NoClassDefFoundError: com/ibm/CORBA/iiop/ORB
I found that its due to the WAS runtime jar ibmorb.jar provided with WAS server install.
I dont know how to configure in WAS Liberty profile.Any clues.
Even i mentioned in the library path,but still error getting.
<variable name="DRIVER_PATH" value="C:\NovemberR2\DMS\deploy\lib"/>
<library id="db2Lib">
<fileset dir="${DRIVER_PATH}" includes="com.ibm.ws.orb_8.5.0.jar classes12.jar oracleJDBC.jar ojdbc6.jar ojdbc14.jar ibmorbapi.jar ibmorb.jar"/>
</library>
The stacktrace is --->
here is the stack trace. ...` 61 more
Caused by: java.lang.NoClassDefFoundError: com/ibm/CORBA/iiop/ORB
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2442)
at java.lang.Class.getMethod0(Class.java:2685)
at java.lang.Class.getMethod(Class.java:1620)
at com.ibm.ws.naming.util.Helpers.getInitORBMethodForNonApplet(Helpers.java:411)
at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:390)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:462)
at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:128)
orSourcesPropertyResolver.java:84)
at org.springframework.core.env.PropertySourcesPropertyResolver.getProperty(PropertySourcesPropertyResolver.java:60)
at org.springframework.core.env.AbstractEnvironment.getProperty(AbstractEnvironment.java:511)
at org.springframework.context.support.PropertySourcesPlaceholderConfigurer$1.getProperty(PropertySourcesPlaceholderConfigurer.java:135)
at org.springframework.context.support.PropertySourcesPlaceholderConfigurer$1.getProperty(PropertySourcesPlaceholderConfigurer.java:132)
at org.springframework.core.env.PropertySourcesPropertyResolver.getProperty(PropertySourcesPropertyResolver.java:84)
at org.springframework.core.env.PropertySourcesPropertyResolver.getPropertyAsRawString(PropertySourcesPropertyResolver.java:70)
at org.springframework.core.env.AbstractPropertyResolver$1.resolvePlaceholder(AbstractPropertyResolver.java:207)
at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:147)
at org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:126)
at org.springframework.core.env.AbstractPropertyResolver.doResolvePlaceholders(AbstractPropertyResolver.java:204)
at org.springframework.core.env.AbstractPropertyResolver.resolveRequiredPlaceholders(AbstractPropertyResolver.java:178)
at org.springframework.context.support.PropertySourcesPlaceholderConfigurer$2.resolveStringValue(PropertySourcesPlaceholderConfigurer.java:175)
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveEmbeddedValue(AbstractBeanFactory.java:801)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:962)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:949)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:533)
... 63 more
Thanks for the hints,but i used to run this application well in WAS 8.0 server and IBM WAS JDK provide in built and i started migration to WAS 8.5 using liberty profile thought of experimenting it.
Hope this answer would be helpful to others as it may be too late!
Try adding com.ibm.ws.orb_8.5.0.jar in the class path. This jar will be available under <WAS_HOME>\AppServer\runtimes . This will resolve the issue.
The issue here looks like you are using the JDK provided with WAS traditional to run a Liberty server.
The JDK that comes with WAS traditional is going to have extra stuff in it that is specifically for running with WAS traditional (it does not not support pluggable JDKs).
Instead:
Use a standard JDK to run your Liberty server. You can get a standard JDK from IBM (not the one that comes with WAS traditional), Oracle, or OpenJDK.
The question states that the application worked correctly on WAS 8.0. With WAS 8.5, you are now trying to run the same application on the Liberty Profile. The Liberty profile supports a subset of the functionality of the traditional WAS profile (now termed 'full profile').
As user #aguibert mentioned in their answer, you have to provide the Java runtime environment for the Liberty profile. This can be any compliant Java SE 6/7/8 JRE/JDK*. For the full profile, a different JDK is required; this is bundled with the installation package. This WebSphere JDK should contain the ibmorb.jar file.
Therefore, try running your application using the WAS 8.5 full profile. This should resolve the problem. You can also consider migrating to the latest version of WAS, which is v9.0.
Additional resource at IBM Knowledge Center: Liberty profile overview.
*Subject to minimum supported Java levels.

java.lang.NoSuchMethodError: org/apache/http/conn/ssl/SSLSocketFactory

I have installed my application and restarted in WAS 8.5, I see below exception in SystemOut.log,where as it works fine in WAS 7.
java.lang.NoSuchMethodError: org/apache/http/conn/ssl/SSLSocketFactory.<init>(Ljava/lang/String;Ljava/security/KeyStore;Ljava/lang/String;Ljava/security/KeyStore;Ljava/security/SecureRandom;Lorg/apache/http/conn/ssl/X509HostnameVerifier;)V
Can any one help me how to resolve this issue?
I'd guess you're deploying and trying to use one version of Apache HttpClient, but that WebSphere has a different version included in its libraries. If you could use the WebSphere-included version, that would be simplest, but if you need to use the specific version, you could change the WebSphere classloader policy to PARENT_LAST.
websphere8 /WebSphere/AppServer/plugins/com.ibm.ws.prereq.jaxrs.jar has packages org.http.*
com.ibm.ws.prereq.jaxrs.jar and HttpClient.jar conflict!
Change classloaders order invalid because com.ibm.ws.prereq.jaxrs.jar has been loaded when websphere start!
you can change HttpClient packages from org.http.* to net.test.* to avoid conflict
ps:
http://www.ibm.com/developerworks/cn/websphere/library/techarticles/1108_jiangwk_classloader/1108_jiangwk_classloader.html

IBM WebSphere MQ JMS Jar Files

I am using SAP PI to connect with IBM MQseries (v 5.3).
Whenever there is a n/w problem or any outage on WebSphere MQs, the SAP interfaces error out with the message "Completion Code 2, Reason 2161, MQJMS2002". To fix this, we are being asked to deploy new client files. Can anyone help us find these jar files. I have downloaded the v7 client from http://www-01.ibm.com/support/docview.wss?rs=171&uid=swg24019253&loc=en_US&cs=utf-8&lang=en, but it doesn't contain jar files. It has rte files.
For anyone locating this question and wanting an answer it is now (quite recently) possible to obtain the MQ JMS jar files for direct use rather than having to go through an install.
Read more about it here: Obtaining the WebSphere MQ classes for JMS
The .jar files are in MQC7 (the WebSphere MQ V7.0 Clients supportpac), which is where your link goes. The install location varies with platform, but will be a java/lib directory under the main install path e.g. on Linux it would be /opt/mqm/java/lib

Resources