cancel
Showing results for 
Search instead for 
Did you mean: 

Connect from Weblogic JMS queue to SAP WAS JMS queue

Former Member
0 Kudos

Hi,

I am trying to setup a WLS 8.1 messaging bridge between a weblogic JMS queue and a SAP WAS JMS queue. I have configured a queue on both Weblogic and SAP WAS and I have set up the messaging bridge and bridge destintations in weblogic. However when weblogic tries to get the SAP initial context factory it fails with the error below.

I have added the SAP Client jars to the weblogic system classpath, and in the weblogic startup script but it still fails. Has anyone connected from an external JMS queue to a SAP WAS JMS queue that could provide me with some guidence?

<10/08/2006 08:23:45 AM WST> <Warning> <Connector> <BEA-190032> << Weblogic Mess

aging Bridge Adapter (XA)_eis/jms/WLSConnectionFactoryJNDIXA > ResourceAllocatio

nException of javax.resource.ResourceException: ConnectionFactory: failed to get

initial context (InitialContextFactory =com.sap.engine.services.jndi.InitialCon

textFactoryImpl, url = ux0800:55304, user name = username) on createManagedConnectio

n.>

Thanks

Warren

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hi Waren,

I found a similar problem description on BEA WebLogic's forum:

/message/600011660#600011660 [original link is broken]

and the solution proposed is

/message/600012124#600012124 [original link is broken]

Can you check if this helps?

Cheers,

Stoyan

Former Member
0 Kudos

Stoyan,

Thanks for that.

My problem ended up being a classpath problem. I referenced the directory of the SAP jars in the weblogic start up script. When I changed this to reference each jar individually it worked.

I have a new issue now which may have something to do with security. The trace suggests it is logging on as the guest user, even though I entered my username and password in the Messaging bridge.

#1.5#000E7FED310600A30000008A0000302D00041AA399E338B4#1155189870559#com.sap.jms##com.sap.jms.server.sessioncontainer.InboundBus instance=BWIP#J2EE_GUEST#0####165536f0283611db8903000e7fed3106#SAPEngine_Application_Thread[impl:3]_126##0#0#Error##Plain###com.sap.jms.server.exception.JMSServerInvalidDestinationException: No destination with ID=0 found.

at com.sap.jms.server.service.impl.RegistryServiceImpl.getDestinationContext(RegistryServiceImpl.java:404)

at com.sap.jms.server.sessioncontainer.InboundBus.getDestinationContext(InboundBus.java:98)

at com.sap.jms.server.sessioncontainer.InboundBus.process(InboundBus.java:153)

at com.sap.jms.server.sessioncontainer.InboundBus.enqueue(InboundBus.java:116)

at com.sap.jms.server.sessioncontainer.SessionContainer.receiveFromDispatcher(SessionContainer.java:63)

at com.sap.jms.server.routingcontainer.RoutingContainer.receiveFromDispatcher(RoutingContainer.java:447)

at com.sap.jms.server.JMSServerContainer.dispatchRequest(JMSServerContainer.java:635)

at com.sap.jms.server.JMSServerFrame.request(JMSServerFrame.java:536)

at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)

at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)

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:100)

at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)

Warren

0 Kudos

Hi Warren,

This does not seem a security problem, the server received a request for a destination with unknown ID (0). It may help to have a look at the JMS client log.

For remote clients, the log should be named sapjms.log and by default it should be located it your user's home directory, in Windows it should be something like C:\Documents and Settings\your_user_name.

Are there some relevant exceptions in it?

Greetings,

Stoyan

Former Member
0 Kudos

It doesn't appear to be logging to sapjms.log. I can see the log there, but no new entries are getting added? Do you know why?

0 Kudos

Is there a file logging.properties in the same folder as sapjms.log? It can override the default logging location.

Is your WebLogic on the same physical machine as your SAP WAS? I do not know much details about the WebLogic JMS bridge implementation, but I imagine it acting as a remote JMS client to the SAP WAS, in which case it should be logging in its local sapjms.log. Does the bridge have its own log?

Former Member
0 Kudos

No logging.properties file in the sapjms.log file. I did get some output in the sapjms.log file ealier, it is not consistent though. See below.

The weblogic instance is not on the same machine as the SAP WAS. I can see the weblogic errors through the weblogic console. The error is the same as the errors in the default.trc files on the SAP WAS which I posted earlier.

sapjms.log errors below:

#1.5#C0000A6053DD000000000001000EAC5A00041AC47D381C00#1155331123584#com.sap.jms.client.connection.SocketWrapper##com.sap.jms.client.connection.SocketWrapper#######Thread[Thread-13,5,main]##0#0#Error#1#/Applications/JMS#Plain###JMS internal error at socket receive! See trace file for more details!#

#1.5#C0000A6053DD000000000000000EAC5A00041AC47D385A80#1155331123584#com.sap.jms.client.connection.SocketWrapper##com.sap.jms.client.connection.SocketWrapper.run#######Thread[Thread-13,5,main]##0#0#Error##Plain###java.io.IOException: Unexpected end of stream, received bytes : 0

at com.sap.jms.protocol.PacketFactoryBaseImpl.createPacket(PacketFactoryBaseImpl.java:431)

at com.sap.jms.client.connection.SocketWrapper.run(SocketWrapper.java:158)

at com.sap.jms.client.session.WaiterThread.run(WaiterThread.java:61)

0 Kudos

Hi Warren,

The "java.io.IOException: Unexpected end of stream" error means the TCP connection to the remote server has been closed. At some earlier point however, the connection has been successfully established, otherwise you would have different type of errors.

From a post by you on another thread, I understand you have successfully sent messages from a standalone remote client. Did you run this client from the WebLogic machine? This will rule out the possibility for some networking issues between the WebLogic and the SAP WAS machines. If you successfuly run the standalone client from rhe WebLogic machine, but you fail from an application deployed on the WebLogic server, the problem may have some relation with the TCP connection allocation and maintenance from the WebLogic and/or its JMS bridge. WebLogic probably takes the TCP connection from some pool and it may close the connection e.g. after some period of inactivity. Is there something to configure in the JMS Bridge related to connection keep-alive?

BTW, what version/patch level is your SAP WAS? An issue related to the keep-alive of JMS connections was fixed about a year ago.

Greetings,

Stoyan

Former Member
0 Kudos

Stoyan,

Yes i did successfully send messages from a stand alone client. The stand along client was ran from the same machine that my Weblogic instance is running on. The failure is from a Messaging bridge or MDB deployed on the Weblogic server.

The Message Driven Bean (MDB) I deployed opens a connection, then tries to send a message immediately. The code for the connection to the SAP WAS from the MDB is identical to my client code that works.

Our SAP WAS is on release 7, SP7.

Warren

Former Member
0 Kudos

Can you attach screenshots of your bridge ?

Can't establish it for week,

I create bridge between two SAP queues on WebLogic side, everything works.

But if I try to send from WL queue to SAP queue it doesn't work (

-------------- Linked Exception ------------

javax.resource.ResourceException: Error creating producer or sending message

.....

-------------- Linked Exception 2 ------------

javax.jms.InvalidDestinationException: Unknown Destination ID = 0

......