Skip to content

Instantly share code, notes, and snippets.

@pungoyal
Created July 15, 2012 18:20
Show Gist options
  • Save pungoyal/3118033 to your computer and use it in GitHub Desktop.
Save pungoyal/3118033 to your computer and use it in GitHub Desktop.
java consumer of a hornetq deployed in torquebox
⚡ mvn clean package exec:java -Dexec.mainClass="com.y2cf.messaging.App"
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building consumer 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ consumer ---
[INFO] Deleting /Users/puneet/work/hoppr/jms/consumer/target
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ consumer ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ consumer ---
[INFO] Compiling 2 source files to /Users/puneet/work/hoppr/jms/consumer/target/classes
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ consumer ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/puneet/work/hoppr/jms/consumer/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ consumer ---
[INFO] Compiling 1 source file to /Users/puneet/work/hoppr/jms/consumer/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.7.2:test (default-test) @ consumer ---
[INFO] Surefire report directory: /Users/puneet/work/hoppr/jms/consumer/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.y2cf.messaging.AppTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.025 sec
Results :
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ consumer ---
[INFO] Building jar: /Users/puneet/work/hoppr/jms/consumer/target/consumer-1.0-SNAPSHOT.jar
[INFO]
[INFO] >>> exec-maven-plugin:1.2.1:java (default-cli) @ consumer >>>
[INFO]
[INFO] <<< exec-maven-plugin:1.2.1:java (default-cli) @ consumer <<<
[INFO]
[INFO] --- exec-maven-plugin:1.2.1:java (default-cli) @ consumer ---
Hello World!
[WARNING]
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
at java.lang.Thread.run(Thread.java:680)
Caused by: javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:5445 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 localhost:5445 [Root exception is java.io.EOFException]]
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1562)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:634)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at com.y2cf.messaging.Consumer.run(Consumer.java:16)
at com.y2cf.messaging.App.main(App.java:7)
... 6 more
Caused by: javax.naming.CommunicationException: Failed to retrieve stub from server localhost:5445 [Root exception is java.io.EOFException]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:268)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1533)
... 11 more
Caused by: java.io.EOFException
at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2280)
at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2749)
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:779)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:279)
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:255)
... 12 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:08.787s
[INFO] Finished at: Sun Jul 15 23:40:21 GMT+05:30 2012
[INFO] Final Memory: 12M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java (default-cli) on project consumer: An exception occured while executing the Java class. null: InvocationTargetException: Could not obtain connection to any of these urls: localhost:5445 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]: Failed to retrieve stub from server localhost:5445: EOFException -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
23:40:16,701 WARN [org.hornetq.core.protocol.core.impl.RemotingConnectionImpl] (hornetq-failure-check-thread) Connection failure has been detected: Did not receive data from /127.0.0.1:63211. It is likely the client has exited or crashed without closing its connection, or the network between the server and client has failed. You also might have configured connection-ttl and client-failure-check-period incorrectly. Please check user manual for more information. The connection will now be closed. [code=3]
application:
env: production
ruby:
version: 1.9
queues:
/queues/test.queue:
durable: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment