Why do these properties fail to look up a ConnectionFactory from glassfish? - jms

This code fails when used by a local java client to lookup a JMS ConnectionFactory from a Glassfish server running on localhost.
Can anyone tell me why? I'm so desperate even useful insults are welcome.
I put the Console output below (as formatted by my program).
InitialContext ctx = null;
ConnectionFactory factory = null;
// properties - set One
Hashtable<String,String> env = new Hashtable<String,String> ();
envTwo.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.enterprise.naming.impl.SerialInitContextFactory");
env.put(Context.URL_PKG_PREFIXES,
"com.sun.enterprise.naming");
env.put("org.omg.CORBA.ORBInitialPort",
"3700");
env.put("org.omg.CORBA.ORBInitialHost",
"localHost");
ctx = new InitialContext(env);
factory = (ConnectionFactory) ctx.lookup("jms/goConnectionFactory");
Console Output
Properties:
key: org.omg.CORBA.ORBInitialPort
value: 3700
key: java.naming.factory.initial
value: com.sun.enterprise.naming.impl.SerialInitContextFactory
key: org.omg.CORBA.ORBInitialHost
value: localHost
key: java.naming.factory.url.pkgs
value: com.sun.enterprise.naming
InitialContext returned: javax.naming.InitialContext#59494225
calling ctx.lookup()
The following was written to the .err stream. All else to .out stream by my program)
-------------------------------------------------------------
java.lang.NullPointerException
at com.sun.enterprise.naming.impl.SerialContext.getORB(SerialContext.java:347)
at com.sun.enterprise.naming.impl.SerialContext.getProviderCacheKey(SerialContext.java:354)
at com.sun.enterprise.naming.impl.SerialContext.getRemoteProvider(SerialContext.java:384)
at com.sun.enterprise.naming.impl.SerialContext.getProvider(SerialContext.java:329)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:477)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:438)
at javax.naming.InitialContext.lookup(Unknown Source)
at org.america3.testclasses.OracleForumTestClass.main(OracleForumTestClass.java:59)
-------------------------------------------------------------
CAUGHT EXCEPTION: javax.naming.NamingException
MESSAGE : Lookup failed for 'jms/goConnectionFactory' in SerialContext[myEnv={org.omg.CORBA.ORBInitial
Port=3700, java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, org.omg.CORBA.
ORBInitialHost=localHost, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImp
l, java.naming.factory.url.pkgs=com.sun.enterprise.naming}
CAUSE : javax.naming.NamingException: Unable to acquire SerialContextProvider for SerialContext[myEn
v={org.omg.CORBA.ORBInitialPort=3700, java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitCon
textFactory, org.omg.CORBA.ORBInitialHost=localHost, java.naming.factory.state=com.sun.corba.ee.impl.presentat
ion.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is java.
lang.NullPointerException]
STACK TRACE :
com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:491)
com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:438)
javax.naming.InitialContext.lookup(Unknown Source)
org.america3.testclasses.OracleForumTestClass.main(OracleForumTestClass.java:59)

I came to know that glassfish 4.1 is having this bug where local client cant connect to the MDB deployed on server. I tried the same with two ejb projects and it is working just fine.

Related

Failed to start bean 'org.springframework.amqp.rabbit.config.internalRabbitListenerEndpointRegistry'

I have a simple spring-boot application with a rabbit sender and a receiver. I want to write some receiver tests where I am running a rabbitmq docker instance as Junit Class Rule (RabbitContainerRule)and then sending a message using rabbitTemplate and the test verifies if the receiver receives the same message. But I am getting the following exception:
Caused by: org.springframework.context.ApplicationContextException: Failed to start bean 'org.springframework.amqp.rabbit.config.internalRabbitListenerEndpointRegistry'; nested exception is org.springframework.amqp.AmqpIllegalStateException: Fatal exception on listener startup
at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:178)
Caused by: org.springframework.amqp.rabbit.listener.QueuesNotAvailableException: Cannot prepare queue for listener. Either the queue doesn't exist or the broker will not allow us to use it.
at org.springframework.amqp.rabbit.listener.BlockingQueueConsumer.start(BlockingQueueConsumer.java:599)
at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:1424)
Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; protocol method: #method<channel.close>(reply-code=404, reply-text=NOT_FOUND - no queue 'my-message-queue' in vhost '/', class-id=50, method-id=10)
at com.rabbitmq.utility.ValueOrException.getValue(ValueOrException.java:66)
If I create the queue manually(by stopping at a breakpoint) in the docker instance using admin console, my test passes.
Also, if I test it manually using the docker rabbit instance, my spring boot application creates queue successfully. So what is causing it to not create in the test?
I am using spring-amqp 1.7.4 RELEASE
Receiver code:
#RabbitListener(bindings = #QueueBinding(
value = #Queue(value = "my-message-queue", durable = "true",
arguments = {
#Argument(name = "x-dead-letter-exchange", value = "my-message-exchange-dead-letter"),
#Argument(name = "x-dead-letter-routing-key", value = "my-message-queue")}),
exchange = #Exchange(value = "my-message-exchange", type = "topic", durable = "true"),
key = "my-message-rk")
)
public void handleMessage(MyMessage message) {
MESSAGE_LOG.info("Receiving message: " + message);
}
Also I am not creating any #Bean for my-message-queue in Configurations and rely on #RabbitListener to create one for me. But I am creating ConnectionFactory, RabbitTemplate and SimpleRabbitListenerContainerFactory beans in my config.
The #EnableRabbit is necessary on some #Configuration class to let your application context to parse #RabbitListener.
To let the application to create queues and exchanges and bindings between them automatically, and the RabbitAdmin bean must be present in the configuration.
See Reference Manual for more information: https://docs.spring.io/spring-amqp/docs/2.0.0.RELEASE/reference/html/
The class where you are building your queues should be annotated with #Configuration annotation, otherwise, spring will not be able to create the queues at the time of start up

Spring Boot with Embedded Mongo : Cannot assign requested address: JVM_Bind

I am trying to setup a JUnit test for a Spring Boot with embedded Mongo & Kafka :-
#RunWith(SpringRunner.class)
#SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE,
classes = {AccountingApplication.class})
#DataMongoTest
public class BaseEmbeddedTest {
#ClassRule
public static KafkaEmbedded embeddedKafka = new KafkaEmbedded(1, true);
#Autowired
private MongoTemplate mongoTemplate;
#Test
public void emptyTest(){
}
}
src/test/resources/application.yml :-
spring:
data:
mongodb:
port: 0
kafka:
bootstrap-servers: ${spring.embedded.kafka.brokers}
PROBLEM
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [de.flapdoodle.embed.mongo.config.IMongodConfig]: Factory method 'embeddedMongoConfiguration' threw exception; nested exception is java.net.BindException: Cannot assign requested address: JVM_Bind
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
... 140 more
Caused by: java.net.BindException: Cannot assign requested address: JVM_Bind
at java.net.DualStackPlainSocketImpl.bind0(Native Method)
at java.net.DualStackPlainSocketImpl.socketBind(DualStackPlainSocketImpl.java:106)
at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:387)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:190)
at java.net.ServerSocket.bind(ServerSocket.java:375)
at java.net.ServerSocket.<init>(ServerSocket.java:237)
at de.flapdoodle.embed.process.runtime.Network.getFreeServerPort(Network.java:80)
at org.springframework.boot.autoconfigure.mongo.embedded.EmbeddedMongoAutoConfiguration.embeddedMongoConfiguration(EmbeddedMongoAutoConfiguration.java:147)
What am I doing wrong here ?
Version:-
dependencyManagementPluginVersion = '1.0.3.RELEASE'
springBootVersion = '1.5.6.RELEASE'
springCloudVersion = 'Dalston.SR2'
projectVersion = '0.0.1-SNAPSHOT'
javaVersion = 1.8
kotlinVersion = '1.1.4'
This annotation: #DataMongoTest causes Spring Boot to create an embedded Mongo instance. The exception messages tells us that the embedded Mongo instance cannot start because there is already a process running on the port it is trying to run on.
The embedded Mongo instance is configured by EmbeddedMongoAutoConfiguration and the strategy applied by Spring Boot - for port allocation - is as follows:
if configured Mongo port > 0 then
use the configured port
else
assign a random port
end
So, I suspect that your test context is configured with a non zero value for spring.data.mongodb.port. I know you posted your application.yml which implies that you are - correctly - assigning a zero value to spring.data.mongodb.port but if you put a breakpoint inside the EmbeddedMongoAutoConfiguration constructor and peek inside the properties parameter I think you'll see that the actual value in use by that configuration class is not zero. If the port value passed to EmbeddedMongoAutoConfiguration is actually zero but you are still getting the JVM_Bind error then that implies that this call: Network.getFreeServerPort(this.getHost()) is not returning a free port and that seems unlikely.
In order to fix this issue: as long as you configure your test context with spring.data.mongodb.port=0 then the embedded Mongo instance will be assigned a random port and this random port will be made known to other aspects of your Spring context (such as your MongoTemplate) which need to talk to that Mongo instance.

Remote EJB issue with Liberty and Spring Boot 1.4.2

I am getting the following error when making remote EJB call with Liberty Profile in a Spring Boot application.
org.omg.CORBA.BAD_PARAM: bad address: iiop port is invalid: vmcid: OMG minor code: 0x8
My code looks like this:
InitialContext ctx = new InitialContext();
Object obj = ctx.lookup("corbaloc:iiop:my.host.com:9810#ejb/com/dwl/base/requestHandler/beans/DWLServiceController");
dwlServiceControllerHome = (DWLServiceControllerHome) PortableRemoteObject.narrow(obj, DWLServiceControllerHome.class);
Error Trace:
[err] org.omg.CORBA.BAD_PARAM: bad address: iiop port is invalid: vmcid: OMG minor code: 0x8 completed: No
[err] at org.apache.yoko.orb.OCI.IIOP.CorbalocProtocol_impl.parse_address(CorbalocProtocol_impl.java:121)
[err] at [internal classes]
[err] at javax.naming.InitialContext.lookup(InitialContext.java:417)
I am using JEE 7 full profile Liberty profile 16.0.0.3.
You may try adding "NameServiceServerRoot" after port:
InitialContext ctx = new InitialContext();
Object obj = ctx.lookup("corbaloc:iiop:my.host.com:9810/NameServiceServerRoot#ejb/com/dwl/base/requestHandler/beans/DWLServiceController");
dwlServiceControllerHome = (DWLServiceControllerHome) PortableRemoteObject.narrow(obj, DWLServiceControllerHome.class);
We solved CORBA.BAD_PARAM error adding it to the url. Our case was invoking a deployed ejb in a WAS full from a Liberty profile

Calling session Bean deployed on jboss 5.x from client side

I'm running JBoss 5.1 GA with JDK 1.6 on Linux and trying to call session bean(jar containing this session bean is deployed on jboss server), Now i want to call this session bean from client, but didnt work.
Java Code at client Side
public class CallingJbossSessionBeanFromClient {
/**
* #param args
* #throws Exception
*/
public static void main(String[] args) throws Exception
{
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
p.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
p.put(Context.PROVIDER_URL, "jnp://182.158.93.41:8080");
Context context = new InitialContext(p);
System.out.println("Successfully Lookup and going to call SessionBean Function deployed on JBoss-5.1.0 Server");
SlsSessiongRemote remote=(SlsSessionRemote) context.lookup("SlsSessionBean/remote");
//SlsSessionBean/remote is RemoteBinding of session Bean
System.out.println("Called");
}
}
where 'SlsSessionBean/remote' is remote binding of session bean deployed on jboss server.
#Stateless
#RemoteBinding(jndiBinding="SlsSessionBean/remote")
but end up with following error
Exception in thread "main" javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at CallingJbossSessionBeanFromClient.main(CallingJbossSessionBeanFromClient.java:20)
Caused by: java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:46)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:654)
... 4 more
After seeing above error i added jbossjmx-ant.jar in the classpath of 'CallingJbossSessionBeanFromClient' class and got following error
Exception in thread "main" java.lang.NoClassDefFoundError: org/jboss/logging/Logger
at org.jnp.interfaces.NamingContext.<clinit>(NamingContext.java:181)
at org.jnp.interfaces.NamingContextFactory.getInitialContext(NamingContextFactory.java:55)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at CallingJbossSessionBeanFromClient.main(CallingJbossSessionBeanFromClient.java:20)
Caused by: java.lang.ClassNotFoundException: org.jboss.logging.Logger
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
... 7 more
After seeing above error i added jboss-logging-spi.jar in the classpath of 'CallingJbossSessionBeanFromClient' class and got following error
Exception in thread "main" javax.naming.CommunicationException: Could not obtain connection to any of these urls: 182.158.93.41:8080 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to retrieve stub from server /182.158.93.41:8080 [Root exception is java.io.EOFException]]
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1763)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:693)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at CallingJbossSessionBeanFromClient.main(CallingJbossSessionBeanFromClient.java:22)
Caused by: javax.naming.CommunicationException: Failed to retrieve stub from server /182.158.93.41:8080 [Root exception is java.io.EOFException]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:327)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1734)
... 4 more
Caused by: java.io.EOFException
at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2281)
at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2750)
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:780)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:280)
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:312)
... 5 more
Plz tell me, am i on the right way to call sesion bean from client java class?
I have spent hours looking for solution on Google. However I cannot seem to find anything that holds the hand..try to be more clear, i'm in lack of ideas in this problem, even it sounds like a classic
Plz suggest solution
The solution to this problem is to open the JMX-Console and click on the service=Naming to view the MBean view of the Naming service. Check if the port used is still 1099.....
Changed the URL to jnp://182.158.93.41:1299, the client could communicate with the EJB.
If you are running over JBoss AS 5.x
Here is RMI based JNDI description.
RMI-Port: default -1099 / If dynamic port changed to ports-01 Then Port is 1199
Now, Remaining Things are OK, Modify code ass below
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
p.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
p.put(Context.PROVIDER_URL, "jnp://182.158.93.41:1199");
Another Point is case of accessing
SlsSessiongRemote remote=(SlsSessionRemote) context.lookup("SlsSessionBean/remote");
if - #Stateless(name="SlsSessionBean")
Then Remote JNDI- [SlsSessionBean/remote] and Local JNDI - [SlsSessionBean/local]
if - #Stateless(name="SlsSessionBean", mappedName="SlsSessionBeanGlobal")
Then Remote JNDI- [SlsSessionBeanGlobal] and Local JNDI - [SlsSessionBean/local]

HornetQ JMSException: Failed to create session factory

I'm trying to Directly instantiating JMS Resources without using JNDI to a REMOTE HORNETQ.
I am running my test code in Eclipse IDE. Setup my classpath to use the HornetQ 2.2.5 libraries.
The target HornetQ is version 2.1.2.Final, I figured they should be backwards compatible, maybe im wrong?
Okay, so I have read the online documentation and followed the examples on connecting to a remote JMS server without using JNDI. I keep on getting the following exception. Im not sure what Im missing but I believe I have everything setup correctly. Could someone please point out what Im missing here? Thanks in advance.
JMSException: Failed to create session factory
The connector on hornetq-configuration.xml is:
<connector name="netty">
<factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
<param key="host" value="${10.100.111.222}"/>
<param key="port" value="${hornetq.remoting.netty.port:5445}"/>
</connector>
The acceptor is:
<acceptor name="netty">
<factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
<param key="host" value="${10.100.111.222}"/>
<param key="port" value="${hornetq.remoting.netty.port:5445}"/>
</acceptor>
My Test code is:
Connection connection = null;
try
{
Queue queue = HornetQJMSClient.createQueue("TESTQ");
Map<String, Object> connectionParams = new HashMap<String, Object>();
connectionParams.put(TransportConstants.PORT_PROP_NAME, 5445);
connectionParams.put(TransportConstants.HOST_PROP_NAME, "10.100.111.222");
TransportConfiguration transportConfiguration = new TransportConfiguration(NettyConnectorFactory.class.getName(),
connectionParams);
ConnectionFactory factory = (ConnectionFactory) HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, transportConfiguration);
System.out.println("debug: " + factory.getClass());
connection = factory.createConnection();
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
MessageProducer producer = session.createProducer(queue);
TextMessage message = session.createTextMessage("This is a test message");
System.out.println("Sent message: " + message.getText());
producer.send(message);
}
finally
{
if (connection != null)
{
try {
connection.close();
} catch (JMSException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
I get the following Exception
SEVERE: Failed to create netty connection
java.net.SocketTimeoutException: connect timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at org.jboss.netty.channel.socket.oio.OioClientSocketPipelineSink.connect(OioClientSocketPipelineSink.java:114)
at org.jboss.netty.channel.socket.oio.OioClientSocketPipelineSink.eventSunk(OioClientSocketPipelineSink.java:74)
at org.jboss.netty.channel.Channels.connect(Channels.java:541)
at org.jboss.netty.channel.AbstractChannel.connect(AbstractChannel.java:218)
at org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:227)
at org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:188)
at org.hornetq.core.remoting.impl.netty.NettyConnector.createConnection(NettyConnector.java:450)
at org.hornetq.core.client.impl.ClientSessionFactoryImpl.getConnection(ClientSessionFactoryImpl.java:1016)
at org.hornetq.core.client.impl.ClientSessionFactoryImpl.getConnectionWithRetry(ClientSessionFactoryImpl.java:897)
at org.hornetq.core.client.impl.ClientSessionFactoryImpl.connect(ClientSessionFactoryImpl.java:212)
at org.hornetq.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:602)
at org.hornetq.jms.client.HornetQConnectionFactory.createConnectionInternal(HornetQConnectionFactory.java:611)
at org.hornetq.jms.client.HornetQConnectionFactory.createConnection(HornetQConnectionFactory.java:121)
at org.hornetq.jms.client.HornetQConnectionFactory.createConnection(HornetQConnectionFactory.java:116)
at com.ws.proto.ManualJMS.main(ManualJMS.java:39)
Oct 19, 2011 1:18:50 PM org.hornetq.core.logging.impl.JULLogDelegate warn
WARNING: Tried 1 times to connect. Now giving up on reconnecting it.
Exception in thread "main" javax.jms.JMSException: Failed to create session factory
at org.hornetq.jms.client.HornetQConnectionFactory.createConnectionInternal(HornetQConnectionFactory.java:615)
at org.hornetq.jms.client.HornetQConnectionFactory.createConnection(HornetQConnectionFactory.java:121)
at org.hornetq.jms.client.HornetQConnectionFactory.createConnection(HornetQConnectionFactory.java:116)
at com.ws.proto.ManualJMS.main(ManualJMS.java:39)
Caused by: HornetQException[errorCode=2 message=Cannot connect to server(s). Tried with all available servers.]
at org.hornetq.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:619)
at org.hornetq.jms.client.HornetQConnectionFactory.createConnectionInternal(HornetQConnectionFactory.java:611)
... 3 more
Regarding compatibility: We didn't have client compatibility until 2.2.5+. If you try client on 2.2.2 and server at 2.2.5, you will probably get a version mismatch exception.
We are aiming to always be compatible from 2.2.5+
And you have a typo in your config:
<connector name="netty">
<factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
<param key="host" value="10.100.111.222"/>
<param key="port" value="${hornetq.remoting.netty.port:5445}"/>
</connector>
We use a syntax for properties and default values. You could for instance define a variable MY_IP and use it as:
"${MY_IP:10.100.111.222}"
If MY_IP is null, you would get 10.100.111.222
But "${10.100.111.222}" doesn't mean anything.

Resources