Troubleshooting
Problem
How to integrate WebSphere MQ with WebSphere Application Server, so as to post a message via the HTTP API tester?
Symptom
One sees the error described
below when posting a message to the JMS queues on WebSphere MQ (WMQ) via the
HTTP API tester. This occurs when using "fscontext" jndi or file bindings as
commonly known.
<Errors>
<Error
ErrorCode="javax.naming.NoInitialContextException" ErrorDescription="Error
description not available" ErrorRelatedMoreInfo=""
ErrorUniqueExceptionId="127.0.0.112795501681490000000000002">
<Attribute Name="ErrorCode"
Value="javax.naming.NoInitialContextException" />
<Attribute Name="ErrorDescription" Value="Error description not
available" />
<Error
ErrorCode="javax.naming.NoInitialContextException" ErrorDescription=""
</font></div> <div>
java.naming.security.principal=mqm,
java.naming.security.credentials=mqm,
java.naming.referral=throw}">
<Stack>
javax.naming.NoInitialContextException: Failed to create
InitialContext using factory specified in hashtable
{java.naming.provider.url=file:/home,
java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory,
java.naming.factory.url.pkgs=com.ibm.ws.naming:com.ibm.ws.runtime:com.ibm.ws.nam
ing:com.ibm.ws.naming, java.naming.security.principal=mqm,
java.naming.security.credentials=mqm, java.naming.referral=throw} [Root
exception is java.lang.NullPointerException]
at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:243)
at
javax.naming.InitialContext.initializeDefaultInitCtx(InitialContext.java:327)
at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:357)
at
javax.naming.InitialContext.internalInit(InitialContext.java:295) at
javax.naming.InitialContext.<init>(InitialContext.java:212)
Resolving The Problem
In order to resolve this error, one needs to configure
shared library references for the deployed MCF application on the WebSphere
Console.
To do this:
- Open the WebSphere Administrative Console.
- Select Applications -> Enterprise Applications -> <application_name> -> References -> Shared library references
- Select <application_name> -> Reference shared libraries
- Click New
- Select the appropriate scope (Node=<node_name>,server=<server_name>)
-
Specify a suitable name and add all the WMQ jar files to the Classpath variable. Press Enter to separate each jar file. (Refer to the MCF Installation Guide for a list of Jar files).
-
Click Apply, then OK
- Save the configuration changes to the master repository
- Select <application_name> -> Reference Shared Libraries
- Move the created shared library reference from "Available" to "Selected" using >>
- Restart the Application Server.
If there are still errors while posting a message via the
HTTP API tester, contact Sterling Commerce Customer Support for
assistance.
[{"Product":{"code":"SS6PEW","label":"IBM Sterling Order Management"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Not Applicable","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]
Historical Number
NFX9536
Product Synonym
[<p><b>]Function Area[</b><p>];HTTP API tester;[<p><b>]Escalation ID[</b><p>];201198
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21552830