on 08-12-2014 7:05 AM
Hi All,
We are trying to connect to a JMS Queue which is created on a Netweaver Stack from PO using "Access JMS Provider with JNDI". But we are getting the below error while trying to connect:
A channel error occurred. Detailed error (if any) : com.sap.aii.adapter.jms.api.connector.ConnectorException: Error creating initial context with environment: java.naming.provider.url=http://XXXXXXXXX:50200; java.naming.factory.initial=com.sap.engine.services.jndi.InitialContextFactoryImpl; java.naming.security.principal=administrator; java.naming.security.credentials=**********, force_remote=true; for profile: ConnectionProfile of channel: CC_Get_WorkOrder_JMS_Senderon node: 95436950 having object id: db790a3e9a343bd887081c89e1234f62: javax.naming.NamingException: Exception while trying to get InitialContext. at com.sap.aii.adapter.jms.core.connector.JndiConnectorImpl.createInitialContext(JndiConnectorImpl.java:71) ...
Hi A.B.
Have you tried changing the port. Try the P4 port - just change last digit to 4. So in your case that would be 50204. I think the default JMS service port is xxx10. But the P4 port works for me.
And I assume that you have checked the default values for the QueueConnectionFactiry + Queue/Topic, so that it matches the queue details that you have defined in NWA=>Configuration=>Infrastucture=>JMS Server Configuration=>JMS Resources
Regards,Emil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Emil and Jannus.
Let me tell you when we are trying to connect to a queue which is already exisiting in our PO, the channel works fine both for inbound and outbound cases. But when we are are trying to connect it to a queue which is created on another netweaver stack outside of PO then we are getting initial context error.
We have changed the port to 50204 and also used 'force_remote = true' in the initial context parameter but now we are getting a different error (attached below).
A channel error occurred. Detailed error (if any) : com.sap.engine.services.rmi_p4.exception.P4BaseRuntimeException: Unexpected exception at com.sap.engine.services.rmi_p4.server.P4ObjectBrokerServerImpl.getException(P4ObjectBrokerServerImpl.java:1328) at com.sap.engine.services.rmi_p4.server.P4ObjectBrokerServerImpl.getException(P4ObjectBrokerServerImpl.java:1305) at com.sap.engine.services.rmi_p4.reflect.P4InvocationHandler.invokeInternal(P4InvocationHandler.java:160) at com.sap.engine.services.rmi_p4.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:52) at com.sun.proxy.$Proxy3426.createQueueConnection(Unknown Source) at com.sap.aii.adapter.jms.core.connector.ConnectorImpl.createConnection(ConnectorImpl.java:526) at com.sap.aii.adapter.jms.core.connector.ConnectorImpl.buildConnection(ConnectorImpl.java:451) at com.sap.aii.adapter.jms.core.connector.ConnectorImpl.doConnect(ConnectorImpl.java:409) at com.sap.aii.adapter.jms.core.connector.JndiConnectorImpl.doConnect(JndiConnectorImpl.java:198) at com.sap.aii.adapter.jms.core.connector.ConnectorImpl.connectIfDisconnected(ConnectorImpl.java:230) at com.sap.aii.adapter.jms.core.connector.ConnectorImpl.connect(ConnectorImpl.java:213) at com.sap.aii.adapter.jms.core.channel.ChannelImpl.doStart(ChannelImpl.java:294) at com.sap.aii.adapter.jms.core.channel.ChannelImpl.start(ChannelImpl.java:168) at com.sap.aii.adapter.jms.core.channel.AdapterImpl.doAddUpdateChannel(AdapterImpl.java:901) at com.sap.aii.adapter.jms.core.channel.AdapterImpl.addOrReplaceChannel(AdapterImpl.java:837) at com.sap.aii.adapter.jms.core.channel.AdapterImpl.doStartCpaChannels(AdapterImpl.java:1052) at com.sap.aii.adapter.jms.core.channel.AdapterImpl$2.invoke(AdapterImpl.java:1002) at com.sap.aii.af.lib.scheduler.JobBroker$Worker.run(JobBroker.java:529) 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:185) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:302) Caused by: java.lang.ClassNotFoundException: com.sap.jms.client.connection.ConnectionProxy ------------------------- Loader Info ------------------------- ClassLoader name: [service:com.sap.aii.adapter.jms.svc] Loader hash code: 42ff1452 Living status: alive Direct parent loaders: [system:Frame] [interface:com.sap.aii.af.ms.ifc] [service:com.sap.aii.adapter.xi.svc] [library:com.sap.aii.adapter.lib] Resources: /usr/sap/PD4/J09/j2ee/cluster/bin/services/com.sap.aii.adapter.jms.svc/lib/com.sap.aii.adapter.jms.svc_api.jar --------------------------------------------------------------- at com.sap.engine.boot.loader.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:278) at com.sap.engine.boot.loader.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:247) at com.sap.engine.services.rmi_p4.MarshalInputStream.resolveClass(MarshalInputStream.java:114) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1600) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1505) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1759) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1338) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:358) at com.sap.engine.services.rmi_p4.reflect.P4InvocationHandler.readResult(P4InvocationHandler.java:302) at com.sap.engine.services.rmi_p4.reflect.P4InvocationHandler.invokeInternal(P4InvocationHandler.java:138) ...
Hi A.B.
Might be a stupid thing to ask but you guys have deployed all the required drivers etc?
Because your config is correct. Can you please try and connect to SAP PI's JMS queue?
Just replace your IP with localhost and replicate my config and it should point to your local JMS queue on the SAP PI system. If it connects there then we know that JMS is working correctly. Then we will start looking at other possiblities.
So just have a look at my screenshots i send earlier and then copy everything.
jmsfactory/alertingVP/AlertingConsumerConnectionFactory
jmsqueues/alertingVP/jms/queue/xi/monitoring/alert/ALERT-TO-MAIL
com.sap.engine.services.jndi.InitialContextFactoryImpl
localhost:Port4
username
password
JNDI.InitialContext.property 5
force_remote true
.
Regards,
Jannus Botha
Sorry to point to some basic stuff, but just to make sure:
1) you are using the 'default' virtual JMS provider on the external netweaver system hosting the JMS provider, right? I notice that 'default' is used in your channel configuration.
2) User and pw - have you checked that you are entering the 'administrator' pw valid for the user on the external netweaver system? And check that the user is not locked on the external system.
Are the two netweaver systems same version/SP?
/Emil
Hmm, that looks ok.
Try to do what Jannus suggest above, and connect to one of the standard queues on the external JMS provider. If you get the same error, then you will at least have identified that the problem is in the connecting PI system.
Have you been able to test that there is no firewall between the two servers? Some network teams limit the firewall exceptions to specific ports.
/Emil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.