Bug 912653 - Clone: Remote JNDI is not working with a HornetQ-only JMS bridge [NEEDINFO]
Summary: Clone: Remote JNDI is not working with a HornetQ-only JMS bridge
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: HornetQ
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ER3
: EAP 6.2.0
Assignee: Yong Hao Gao
QA Contact: Martin Svehla
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-19 10:09 UTC by Miroslav Novak
Modified: 2014-05-27 01:28 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-15 16:15:54 UTC
Type: Bug
Embargoed:
lcosti: needinfo?


Attachments (Terms of Use)
logs and configuration of servers (35.08 KB, application/zip)
2013-03-28 13:13 UTC, Nikoleta Hlavickova
no flags Details
logs and configuration of servers after fix (37.19 KB, application/zip)
2013-04-16 10:53 UTC, Nikoleta Hlavickova
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker AS7-6549 0 Major Resolved Remote JNDI is not working with a HornetQ-only JMS bridge 2017-05-19 15:09:38 UTC

Description Miroslav Novak 2013-02-19 10:09:33 UTC
Cloning to Bugzilla just to see it during verification:

The jms-bridge can be used to bridge a hornetq server to another and should work by specifying to use the org.hornetq.module to load the JMS implementation classes.

However, this fails because this module does not have access to the JBoss remote-naming module that is required to connect to remote JBoss JNDI server.

Comment 1 JBoss JIRA Server 2013-02-20 10:05:34 UTC
Jeff Mesnil <jmesnil> made a comment on jira AS7-6549

PR merged in master branch

Comment 2 Miroslav Novak 2013-02-20 11:15:51 UTC
Changing status to ON_QA since jira was resolved.

Comment 4 Nikoleta Hlavickova 2013-03-28 13:13:42 UTC
Created attachment 717659 [details]
logs and configuration of servers

JMS bridge still could not be started. See configuration and log of both source and target servers in attachment.

Comment 5 Miroslav Novak 2013-03-28 13:43:42 UTC
Hi Jeff, 

fix for this issue did not get into EAP 6.1.0.ER3. Could you check with productization guys to where the fix should be committed? 

Thanks,

Mirek

Comment 6 Vladimir Dosoudil 2013-03-28 14:29:08 UTC
Pull request for EAP 6.1.x sent: https://github.com/jbossas/jboss-eap/pull/82

Comment 8 Nikoleta Hlavickova 2013-04-16 10:53:59 UTC
Created attachment 736280 [details]
logs and configuration of servers after fix

It seems that JMS bridge can be now started:

12:38:05,216 INFO  [org.jboss.messaging] (ServerService Thread Pool -- 67) JBAS011610: Started JMS Bridge myBridge

However when trying to send messages to source queue producer gets exception:

12:38:30,956 ERROR [org.jboss.qa.hornetq.apps.clients.ProducerClientAck:114] Producer got exception and ended:
org.jboss.naming.remote.protocol.NamingIOException: Failed to lookup [Root exception is java.io.NotSerializableException: org.hornetq.core.client.impl.ClientSessionFactoryImpl]
	at org.jboss.naming.remote.client.ClientUtil.namingException(ClientUtil.java:49)
	at org.jboss.naming.remote.protocol.v1.Protocol$1.execute(Protocol.java:104)
	at org.jboss.naming.remote.protocol.v1.RemoteNamingStoreV1.lookup(RemoteNamingStoreV1.java:79)
	at org.jboss.naming.remote.client.RemoteContext.lookup(RemoteContext.java:79)
	at org.jboss.naming.remote.client.RemoteContext.lookup(RemoteContext.java:83)
	at javax.naming.InitialContext.lookup(InitialContext.java:392)
	at org.jboss.qa.hornetq.apps.clients.ProducerClientAck.run(ProducerClientAck.java:79)
Caused by: java.io.NotSerializableException: org.hornetq.core.client.impl.ClientSessionFactoryImpl
	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:891)
	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:585)
	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1063)
	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1019)
	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:885)
	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1063)
	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1019)
	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:998)
	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:885)
	at org.jboss.marshalling.AbstractObjectOutput.writeObject(AbstractObjectOutput.java:62)
	at org.jboss.marshalling.AbstractMarshaller.writeObject(AbstractMarshaller.java:119)
	at org.jboss.naming.remote.protocol.v1.Protocol$1$2.write(Protocol.java:138)
	at org.jboss.naming.remote.protocol.v1.WriteUtil.write(WriteUtil.java:61)
	at org.jboss.naming.remote.protocol.v1.Protocol$1.handleServerMessage(Protocol.java:128)
	at org.jboss.naming.remote.protocol.v1.RemoteNamingServerV1$MessageReciever$1.run(RemoteNamingServerV1.java:73)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:662)
Caused by: an exception which occurred:
	in field factories
	in field serverLocator
	in object org.hornetq.jms.client.HornetQXAConnectionFactory@7920f96a

It is possible to send messages to the same queue while JMS Bridge is not connected. The exception occurs only when JMS Bridge is started.

See configurations and logs in attachment.

Comment 9 Miroslav Novak 2013-05-14 12:49:59 UTC
Issue in the previous comment seems to be related to the way how connection factory is deployed and looked up from JNDI. 
Client and JMS bridge are using the same connection factory. When JMS bridge uses this connection factory first then JMS client gets this NotSerializableException.

Comment 12 Yong Hao Gao 2013-09-04 06:39:32 UTC
There are some non-serializable fields that caused the problem. When a JMS bridge is deployed and started and if it uses a local Connection Factory to create connections, the Connection Factory will have such fields stored. When a remote client looks up the same connection factory via JNDI, the factory won't get serialized because of those fields.

To workaround the client can use a different Connection Factory. I'll submit the fix soon.

Howard

Comment 13 Miroslav Novak 2013-09-18 09:50:09 UTC
It seems that bz was lost from focus. Setting jboss-eap-6.2 flag to ?.

@Howard
Can you send an update, please?

Thanks,

Mirek

Comment 18 Martin Svehla 2013-10-04 11:31:15 UTC
No NotSerializableExceptions anymore. Good job.

Comment 19 Russell Dickenson 2013-12-03 13:02:50 UTC
'Docs text' field NACK'd as it is too late to include this ticket in release notes without at least draft content.


Note You need to log in before you can comment on or make changes to this bug.