Sitemap

Amicuk Programming Answers

JMS Receiver Adapter - com.ibm.websphere.naming.WsnInitialContextFactory

2015-10-11   Views:12

Advertisement

Hello experts, I am trying to configure JMS Adapter to Access Websphere Application Server via JNDI. The configuration is as follow: Initial Context Factory: com.ibm.websphere.naming.WsnInitialContextFactory Connection Factory: jms/messageQueueCF Ser

Hello experts,
I am trying to configure JMS Adapter to Access Websphere Application Server via JNDI. The configuration is as follow:
Initial Context Factory: com.ibm.websphere.naming.WsnInitialContextFactory
Connection Factory: jms/messageQueueCF
Server URL: iiop://ammtnode.iubs.intra:2809/
Queue Name: jms/EXT_INPUT_QUEUE
I deployed all required jar files but Iu2019m still unable to connect to WAS because adapter cannot initialize ORB:
javax.naming.NamingException: Failed to initialize the ORB
I wrote a small java class to check where the problem was:
============================================================================
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnInitialContextFactory");
env.put(Context.PROVIDER_URL, "iiop://ammtnode.iubs.intra:2809/");
env.put("java.naming.corba.orb",org.omg.CORBA.ORB.init((String[])null,null));
Context jndiContext = null;
try {
jndiContext = new InitialContext(env);
ConnectionFactory connectionFactory = (ConnectionFactory) jndiContext.lookup("jms/messageQueueCF");
Connection qConn = connectionFactory.createConnection();
Session qSession = qConn.createSession(false,Session.AUTO_ACKNOWLEDGE);
Queue q = (Queue) jndiContext.lookup("jms/EXT_INPUT_QUEUE");
MessageProducer producer = qSession.createProducer(q);
TextMessage message = qSession.createTextMessage();
message.setText(text);
producer.send(message);
producer.close();
qSession.close();
qConn.close();
} catch (Exception e) {
     e.printStackTrace();
============================================================================
I got the same error until I wrote this line:
env.put("java.naming.corba.orb",org.omg.CORBA.ORB.init((String[])null,null));
And everything worked fine. Now I want to do the same in my JMS Receiver adapter but I donu2019t know how to introduce this line in the Initial Context Environment. I tried as JMS additional parameters and additional properties as well. However, nothing worked. Does anybody know what Iu2019m doing wrong?
Thank you in advance!

The replay answer
Advertisement
Here I post the entire error:
0#0#Warning##Java###Catching #1#com.sap.aii.adapter.jms.api.connector.ConnectorException: Error looking up connection fact
oryjms/messageQueueCF, for profile: ConnectionProfile of channel: CC_I002_AMM_JmsReceiveron node: 5949650 having object id: 0
360697bc61b3666aba07a2708ca095a: javax.naming.NamingException: Failed to initialize the ORB
        at com.sap.aii.adapter.jms.core.connector.JndiConnectorImpl.createConnectionFactory(JndiConnectorImpl.java:134)
        at com.sap.aii.adapter.jms.core.connector.ConnectorImpl.doConnect(ConnectorImpl.java:247)
        at com.sap.aii.adapter.jms.core.connector.JndiConnectorImpl.doConnect(JndiConnectorImpl.java:185)
        at com.sap.aii.adapter.jms.core.connector.ConnectorImpl.connectIfDisconnected(ConnectorImpl.java:170)
        at com.sap.aii.adapter.jms.core.connector.ConnectorImpl.connect(ConnectorImpl.java:153)
        at com.sap.aii.adapter.jms.core.channel.ChannelImpl.doStart(ChannelImpl.java:279)
        at com.sap.aii.adapter.jms.core.channel.ChannelImpl.start(ChannelImpl.java:166)
        at com.sap.aii.adapter.jms.core.channel.AdapterImpl$1.run(AdapterImpl.java:411)
        at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:152)
        at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:247)
Caused by: javax.naming.NamingException: Failed to initialize the ORB [Root exception is java.lang.ClassCastException: class
com.sap.engine.system.ORBProxy:sun.misc.Launcher$AppClassLoaderAT5d0385c1 incompatible with class com.ibm.CORBA.iiop.ORB:libra
ry:com.sap.aii.adapter.libATcom.sap.engine.boot.loader.ResourceMultiParentClassLoaderAT131b92e6ATalive]
        at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:364)
        at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:421)
        at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:123)
        at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:798)
        at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:164)
        at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:179)
        at javax.naming.InitialContext.lookup(InitialContext.java:351)
        at javax.naming.InitialContext.lookup(InitialContext.java:351)
        at com.sap.aii.adapter.jms.core.connector.JndiConnectorImpl.createConnectionFactory(JndiConnectorImpl.java:130)
        ... 11 more
Caused by: java.lang.ClassCastException: class com.sap.engine.system.ORBProxy:sun.misc.Launcher$AppClassLoaderAT5d0385c1 incom
patible with class com.ibm.CORBA.iiop.ORB:library:com.sap.aii.adapter.libATcom.sap.engine.boot.loader.ResourceMultiParentClass
LoaderAT131b92e6ATalive
        at com.ibm.ws.orb.GlobalORBFactory.init(GlobalORBFactory.java:92)
        at com.ibm.ejs.oa.EJSORBImpl.initializeORB(EJSORBImpl.java:179)
        at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:83)
        at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:59)
        at com.ibm.ejs.oa.EJSORB.init(EJSORB.java:102)
        at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:356)
        ... 19 more
Caused by:
javax.naming.NamingException: Failed to initialize the ORB [Root exception is java.lang.ClassCastException: class com.sap.eng
ine.system.ORBProxy:sun.misc.Launcher$AppClassLoaderAT5d0385c1 incompatible with class com.ibm.CORBA.iiop.ORB:library:com.sap.
aii.adapter.libATcom.sap.engine.boot.loader.ResourceMultiParentClassLoaderAT131b92e6ATalive]
        at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:364)
        at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:421)
        at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:123)
        at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:798)
        at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:164)
        at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:179)
        at javax.naming.InitialContext.lookup(InitialContext.java:351)
        at javax.naming.InitialContext.lookup(InitialContext.java:351)
        at com.sap.aii.adapter.jms.core.connector.JndiConnectorImpl.createConnectionFactory(JndiConnectorImpl.java:130)
        ... 11 more
Caused by: java.lang.ClassCastException: class com.sap.engine.system.ORBProxy:sun.misc.Launcher$AppClassLoaderAT5d0385c1 incom
patible with class com.ibm.CORBA.iiop.ORB:library:com.sap.aii.adapter.libATcom.sap.engine.boot.loader.ResourceMultiParentClass
LoaderAT131b92e6ATalive
        at com.ibm.ws.orb.GlobalORBFactory.init(GlobalORBFactory.java:92)
        at com.ibm.ejs.oa.EJSORBImpl.initializeORB(EJSORBImpl.java:179)
        at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:83)
        at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:59)
        at com.ibm.ejs.oa.EJSORB.init(EJSORB.java:102)
        at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:356)
        ... 19 more
Caused by:
javax.naming.NamingException: Failed to initialize the ORB [Root exception is java.lang.ClassCastException: class com.sap.eng
ine.system.ORBProxy:sun.misc.Launcher$AppClassLoaderAT5d0385c1 incompatible with class com.ibm.CORBA.iiop.ORB:library:com.sap.
aii.adapter.libATcom.sap.engine.boot.loader.ResourceMultiParentClassLoaderAT131b92e6ATalive]
        at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:364)
        at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:421)
        at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:123)
        at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:798)
        at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:164)
        at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:179)
        at javax.naming.InitialContext.lookup(InitialContext.java:351)
        at javax.naming.InitialContext.lookup(InitialContext.java:351)
        at com.sap.aii.adapter.jms.core.connector.JndiConnectorImpl.createConnectionFactory(JndiConnectorImpl.java:130)
        at com.sap.aii.adapter.jms.core.connector.ConnectorImpl.doConnect(ConnectorImpl.java:247)
        at com.sap.aii.adapter.jms.core.connector.JndiConnectorImpl.doConnect(JndiConnectorImpl.java:185)
        at com.sap.aii.adapter.jms.core.connector.ConnectorImpl.connectIfDisconnected(ConnectorImpl.java:170)
        at com.sap.aii.adapter.jms.core.connector.ConnectorImpl.connect(ConnectorImpl.java:153)
        at com.sap.aii.adapter.jms.core.channel.ChannelImpl.doStart(ChannelImpl.java:279)
        at com.sap.aii.adapter.jms.core.channel.ChannelImpl.start(ChannelImpl.java:166)
        at com.sap.aii.adapter.jms.core.channel.AdapterImpl$1.run(AdapterImpl.java:411)
        at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:152)
        at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:247)
Caused by: java.lang.ClassCastException: class com.sap.engine.system.ORBProxy:sun.misc.Launcher$AppClassLoaderAT5d0385c1 incom
patible with class com.ibm.CORBA.iiop.ORB:library:com.sap.aii.adapter.libATcom.sap.engine.boot.loader.ResourceMultiParentClass
LoaderAT131b92e6ATalive
        at com.ibm.ws.orb.GlobalORBFactory.init(GlobalORBFactory.java:92)
        at com.ibm.ejs.oa.EJSORBImpl.initializeORB(EJSORBImpl.java:179)
        at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:83)
        at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:59)
        at com.ibm.ejs.oa.EJSORB.init(EJSORB.java:102)
        at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:356)
        ... 19 more

Go to See the other 10 answers

JMS Receiver Adapter - com.ibm.websphere.naming.WsnInitialContextFactory

Category:DefaultRelease time:2015-10-11Views:130

Hello experts, I am trying to configure JMS Adapter to Access Websphere Application Server via JNDI. The configuration is as follow: Initial Context Factory: com.ibm.websphere.naming.WsnInitialContextFactory Connection Factory: jms/messageQueueCF Ser[More]

Error in JMS receiver adapter: "Error creating initial context with environment"

Category:DefaultRelease time:2015-10-11Views:130

Hello, I have some trouble with a JMS receiver adapter (access to JMS-provider with JNDI). The message in adapter monitoring is: A channel error occurred. Detailed error (if any) : com.sap.aii.adapter.jms.api.connector.ConnectorException: Fatal Error[More]

Adapter-specific message attributes for the JMS Receiver adapter

Category:DefaultRelease time:2015-10-11Views:130

Dear SAP Community, We are trying to activate some parameters at message level when SAP XI sent an interface (XML data) to IBM Websphere MQ. Programmaticaly, this is done the following way:        TextMessage outMessage = session.createTextMessage();[More]

JMS receiver adapter Error

Category:DefaultRelease time:2015-10-11Views:130

Hi Experts, Any idea about this error. We are getting following in JMS receiver adapter in PI 7.1. Delivering the message to the application using connection JMS_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exce[More]

JMS Receiver Adapter Catching MQ Exceptions

Category:DefaultRelease time:2015-10-11Views:130

Hi Experts, We are running into an issue with our JMS receiver adapter failing PI.  We are trying to send transactions via the adapter to a MQ Series' queue but it is failing after no transactions have been sent after a period of 3 hours or more.  Th[More]

JMS Receiver Adapter Conversion.......

Category:DefaultRelease time:2015-10-11Views:130

Hi All, I am using JMS Receever Adapter for sending data to Mainframe MQ. The message converted to Fixed length format. At the end of every record I am getting "." Output of JMS Receiver Adapter abcde  ghijk  lmn      . hhffh    jhjghj jgjjggj  [More]

JMS receiver adapter configuration error

Category:DefaultRelease time:2015-10-11Views:130

Hi All, I am facing an issue with JMS receiver adapter. My Configuration parameters for receiver adapter are as follows. 1.Transport protocol:WebspherMQ (MQSeries) JMS provied 2.Message porotocol:JMS 1.x 3.Adapter Enigen: Integration Server 4.QueueCo[More]

JMS Receiver Adapter Conversion problem

Category:DefaultRelease time:2015-10-11Views:130

Hi All, My Scenario. Websphere MQ(JMS Adapter)--->SAP XI--->Webspher MQ(Receiver Adapter)----->Mainframe MQ I am using Module parameters in JMS Receiver Adapter. Module Sequence in the Receiver Channel No. Module Name T Module Key 1 localejbs/AF_[More]

JMS Receiver Adapter to MQ - additional message property error

Category:DefaultRelease time:2015-10-11Views:130

Hi, I'm trying to add addional message properties to a Receiver JMS message for MQ Server queue. Creating the message in the MQ queue only works when I don't try to add additional message properties. As soon as I try to add additional message propert[More]

JMS Receiver Adapter configuration help

Category:DefaultRelease time:2015-10-11Views:130

Hi Experts, In our scenario, we need to integrate MQ series with SAP PI, where in we are using JMS Sender and Receiver adapters to put and get the mssg from correponding IBM MQ queues. Using Sender JMS Adapter we are consuming a txt mssg by specifyin[More]

JMS receiver adapter is red / error?

Category:DefaultRelease time:2015-10-11Views:130

hi experts, i have a JMS receiver adapter and the connection to WebSphere MQseries is ok. If i sent message to Receiver JMS adapter i will get following error (red light): The XI message: 14a8be90-e8fc-11df-9103-0016353eb4a3 was already sucessfully p[More]

Hot
I am writing a Crystal Reports .NET SDK in C# code to upload a crystal report files from its destination to CMC folder on BO XI R2 Platform. On "Upload Button" click_event, validate the two check boxes controls named "Keep History", an [More]
I have just updated my iPhone with the iOS  6 software and now my App Store is not working it will let me view apps but won't let me download anything? Please helpHmmmm... would appear that you need to be actually logged in to enable the additional m [More]
Hi all, Is there someone who can explain me the process of Pcard purchases in combination with catalogs? I heard that there will be no request and purchase order in SRM for each purchase. There will be a periodic load from the catalog into SAP that c [More]
Don't want to do a restore if I don't have to.  I have another iPod Shuffle, also 2nd generation that sychs with a different Macbook running iTunes 11.0.  No problems there.  Is there an issue with this software update?Reboot your computer.  Temporar [More]
Hello, i've a class named LoadImages with the code: package     import flash.display.MovieClip;     import flash.events.MouseEvent;     import flash.events.Event;     import flash.display.Loader;     public class LoadImages extends MovieClip         [More]
My lightroom has updated to 5.5 and I now get the message "Develop module is disabled -please renew your membershipto reactivate the Develop module". My membership is ongoing so how do I resolve?Adobe made a help page for this problem because so [More]
I received the "official" OTA update last night for my Droid and installed it this morning.  My corporate exchange account worked wonderfully before the installation and has been since I got the phone on it's release date.  After the installatio [More]
Hi all Sorry this may have been answered somewhere before recently but couldn't find an entry in the discussion database. Has anyone ANY idea how high we can fly with numbers of audio tracks on 8 core 3 gig with 10 gig of ram? (my spec below) I expec [More]
Hi there, I have an old ultra 2 I want to install on with a type 6 keyboard. It seem to recognize the keyboard however when I try to hit stop to get into open boot it just continues on its merry way and tries to net boot, of course this fails... How [More]
I need a receipt for my MacBook which I bought July 2008, at that time I didnt get the receipt by email, now my Mac was stolen and the insurance company wants the receipt. I have credit card transaction no., date of purchase, amount and the apple sto [More]