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 made an in app purchase and the game (Happy Farm) crashed but I completed the purchase on my iPad's Home screen because the Confirm purchase window popped up before I could relaunch the game.  When I launched the game the purchase (which was Gems) [More]
Hello   In crystal report version XI, can you write your query in sqlplus and then use the crystal report designer to build your report instead of using the GUI . I would like to be able to go database and show sql query and open that query and make [More]
Problem: "F11 System Recovery" during boot does not work after Cloning hard drive. HP Envy m6-1125dx UEFI Notebook Computer with GPT hard drive. Original Seagate Hard Disk GPT 700GB with Window 8.0_64 upgraded to Windows 8.1_64 Startup Menu (F11 [More]
My early 2010 MBP has started shwoing the following error when I insert a CD: "The disk you inserted was not readable by this computer." DVDs play with no problem at all and also, if I chose the ignore the ignore option to the CD error above, I [More]
Hi, In case of vendor or customer line item display, the profit centre is not showing. We have implemented GL Profit Centre concept rather than Business area concept. But now the question is when the client is asking any report on area wise vendor or [More]
Why doesn't the iPad allow me to download adobe flash player so I can play my games?Noble Seven wrote: It's a really long story. TL;DR, Adobe doesn't make flash for the iPad, and they never will. If you want to view or play flash content, do it on a [More]
This started happening last night where my ipod has "hold" lock on, almost permanently, even if it's not switched on. Nothing happens if I actually move the switch over to "hold," it just stays on "hold." The only way I can g [More]
Hi Can any one help me how to set Oracle Data Integrator Timeout (ODI menu>User Paramter>Oracle Data Integrator Timeout > paramter value as unlimited. By default it is 30 and i want to change it as unlimited. I am connecting linux box through win [More]
Is there any way to extract a font from an SWF? I don't need to use the font for anything besides other Flash/SWF files, so exporting to a system font file is not needed. I just need to be able to re-use a font that is on SWF in other SWFs, when the [More]
Hello, I will soon start developing a game in Flash (note: not necessarily a webgame - it should be a standalone, also). The game is an isometric managerial simulation, so i would need to learn more not only about isometric tiles, but also data handl [More]