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 install mountain lion on my macbook pro late 2009 and freezing after waking up and is impossible restartRestart your mac in Safe Mode by holding down the 'shift' key while it powers up. You'll know if you've entered Safe Mode correctly if you see a [More]
Since downloading the new Itunes I am unable to transfer my playlist to my Ipod. I have tried dragging individual tracks but it will not let me load anything.  The symbol for my Ipod is no longer in the left column of my screen but at the top right h [More]
We are trying to replicate a few tables in a logical standby database to another database. Both the source ( The Logical Standby) and the target database are in Oracle 11g R1. The materialized views are refreshed using FAST REFRESH. The Materialized [More]
Had an itunes card, entered the code on the card to redeem it. This all worked fine and it applied the correct balance. Now go to itunes store and it keeps referring me to make purchase with other payment types rather than letting me purchase with my [More]
Recently I reloaded my acrobat pro and ever since when I convert a word file to a pdf, it shows as a firefox html file.  Why?Hi chief grunt, It seems that the pdf ownership is taken over by Firefox. Right click on the generated file and select 'Open [More]
Can I duplicate the design and layout of an old form to create a new form?Hi; You sure can. From the "My Forms" tab with the form selected there is a "Duplicate" button on the toolbar along the top, there is also "Duplicate" [More]
I have package defined in one schema (A). How can another user (B) access the body of that package logged in as B?SQL> select * from v$version; BANNER Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod PL/SQL Release 10.2.0.1.0 - Produc [More]
Sign in in creativecloud.de and Adobe.de is no problem. But when I start Creative Cloud Desktop an i want to sign in, it tells me I am signed out. There is no way to install Apps or do anything else at the moment. I habe deinstalled all applications [More]
I just bought a new iMac (the one without a cd drive!) and I'm trying to download the complete content set for garageband but nothing is working. I can't do anything in the app store and there are no updates to be found. please help!Flying Toad wrote [More]
I have a single domain environment I am running windows server 2008 R2 domain controller and exchange server 2010. I have been ask to add a second domain to the exchange server to use for receiving and sending email. now my question is will it be wis [More]