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 have songs with ratings in my 'Unrated' plylist. I have 650 songs in my "Unrated' playlists, however 73 of these songs do have ratings. I trid to shift the 5 and 4 star rated into 'My top rated', but they will not shift. Can anybody help? Keep smil [More]
I recently purchased two ipods for different family members. Can both be used on the same computer. I seem to remember seeing a blurb in the user agreement for itunes that said the program was only for one ipod. Can anyone elaborate?When the iPods be [More]
My son has a 400Mhz Rev. 2 Blue & White. Recently the Power Supply died, which I replaced, but when it died it also took one of the hard drives with it, before that it was working flawlessly. He had two ATA drives, both Maxtor, one the original 6 gig [More]
Good Morning to all, I'm Mr.Tuyen from VietNam. I have a big problem with AlwaysOn High Availabity in SQL 2012. I setup 3 server and join Availabilty Group. Ex: Server A (Primary), Server B (Secondary), Cluster Qourum is only node. I have test: 1. St [More]
i have downloaded mac os x 10.8 but now i am using 10.6.8 snow lepord but i cant able to updat eit "says  ur not compatiableRead this: http://www.apple.com/osx/how-to-upgrade/Read other 2 answers [More]
Formatted master pages don't auto update in multipage indd doc. When a page is added/removed, folios and rules remain in right page orientation even if they've just become left hand pages, and vice versa. Forced to keep taking the additional steps of [More]
What is the use above option in the KF creation? ThanksHi, A non-cumulative is a non-aggregating key figure on the level of one or more objects, which is always displayed in relation to time. Examples of non-cumulatives include headcount, account bal [More]
Hi All, I want change the vendor address using bapi_addressorg_change. Please give me the example. regards, rakesh.Change, delete and add a telephone number DATA: objtype LIKE bapi4001_1-objtype, obj_id LIKE bapi4001_1-objkey, obj_id_ext LIKE bapi400 [More]
Hi all,put some audiobooks onto my phone ready for my hols, tested them out and the narrator is too fast, tried looking for the settings to slow them down but unable to find any on my phone. Do you think if I sync to my PC there are the audiobook spe [More]
Hi, I am getting error in Close file . For more clarification i am attaching the word document and sample code Attachments: Bharath_Query.doc ‏179 KB Write_File.vi ‏44 KBYou get an error because your string array is empty and thus the loop thus runs [More]