"clustered-queue" example is error, the properties is not loaded.
verystrongjoe Apr 1, 2013 4:13 AMI downloaded 2.2.1 version of hornetq. and I want to run the example, "clustered-queue".
I think the error is from that the properties can't be loaded.
I run it on the debug mode and figured out that null values is inputed
String runServerProp = System.getProperty("hornetq.example.runServer");
String logServerOutputProp = System.getProperty("hornetq.example.logserveroutput");
serverClasspath = System.getProperty("hornetq.example.server.classpath");
runServer = runServerProp == null ? true : Boolean.valueOf(runServerProp);
logServerOutput = logServerOutputProp == null ? false : Boolean.valueOf(logServerOutputProp);
serverProps = System.getProperty("hornetq.example.server.args");
if (System.getProperty("hornetq.example.server.override.args") != null)
{
serverProps = System.getProperty("hornetq.example.server.override.args");
}
System.out.println("serverProps = " + serverProps);
HornetQExample.log.info("hornetq.example.runServer is " + runServer);
so, error is message like below.
serverProps = null
4월 01, 2013 4:51:39 오후 org.hornetq.common.example.HornetQExample run
INFO: hornetq.example.runServer is true
4월 01, 2013 4:51:39 오후 org.hornetq.common.example.HornetQExample getContext
INFO: using server0\client-jndi.properties for jndi
[16:51:40.309] WARN Logger.warn(Logger.java:165) - Failed to connect to localhost:1099
javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:215)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1181)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:514)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:507)
at javax.naming.InitialContext.lookup(InitialContext.java:411)
at org.hornetq.jms.example.ClusteredQueueExample.runExample(ClusteredQueueExample.java:54)
at org.hornetq.common.example.HornetQExample.run(HornetQExample.java:76)
at org.hornetq.jms.example.ClusteredQueueExample.main(ClusteredQueueExample.java:36)
Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:190)
... 7 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:69)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:157)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
at java.net.Socket.connect(Socket.java:579)
at java.net.Socket.connect(Socket.java:528)
at java.net.Socket.<init>(Socket.java:425)
at java.net.Socket.<init>(Socket.java:319)
at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:69)
at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:62)
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:186)
... 7 more
javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]
at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1115)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1192)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:514)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:507)
at javax.naming.InitialContext.lookup(InitialContext.java:411)
at org.hornetq.jms.example.ClusteredQueueExample.runExample(ClusteredQueueExample.java:54)
at org.hornetq.common.example.HornetQExample.run(HornetQExample.java:76)
at org.hornetq.jms.example.ClusteredQueueExample.main(ClusteredQueueExample.java:36)
Caused by: java.net.SocketTimeoutException: Receive timed out
at java.net.TwoStacksPlainDatagramSocketImpl.receive0(Native Method)
at java.net.TwoStacksPlainDatagramSocketImpl.receive(TwoStacksPlainDatagramSocketImpl.java:90)
at java.net.DatagramSocket.receive(DatagramSocket.java:786)
at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1093)
... 7 more
#####################
### FAILURE! ###
#####################