I've googled this error without learning much. What does it mean? I've checked that the server is running, etc.


Better code:

thufir@doge:~$
thufir@doge:~$ activemq status
INFO: Loading '/home/thufir/apache-activemq-5.11.1/bin/env'
INFO: Using java '/usr/lib/jvm/java-7-openjdk-amd64/bin/java'
ActiveMQ not running
thufir@doge:~$
thufir@doge:~$ activemq start
INFO: Loading '/home/thufir/apache-activemq-5.11.1/bin/env'
INFO: Using java '/usr/lib/jvm/java-7-openjdk-amd64/bin/java'
INFO: Starting - inspect logfiles specified in logging.properties and log4j.properties to get details INFO: pidfile created : '/home/thufir/apache-activemq-5.11.1/data/activemq.pid' (pid '17530')
thufir@doge:~$
thufir@doge:~$ activemq status
INFO: Loading '/home/thufir/apache-activemq-5.11.1/bin/env'
INFO: Using java '/usr/lib/jvm/java-7-openjdk-amd64/bin/java'
ActiveMQ is running (pid '17530')
thufir@doge:~$
thufir@doge:~$ groovy IdeaProjects/groovy/src/hi.groovy
Caught: org.apache.activemq.ConnectionFailedException: The JMS connection has failed: java.io.EOFException org.apache.activemq.ConnectionFailedException: The JMS connection has failed: java.io.EOFException at org.apache.activemq.ActiveMQConnection.checkClosedOrFailed(ActiveMQConnection.java:1480) at org.apache.activemq.ActiveMQConnection.start(ActiveMQConnection.java:523)
    at net.sf.gtools.jms.JmsCategory.connect(JmsCategory.groovy:64)
    at GroovyJMSExample$_sendMessage_closure1.doCall(hi.groovy:22)
    at GroovyJMSExample$_sendMessage_closure1.doCall(hi.groovy)
    at GroovyJMSExample.sendMessage(hi.groovy:20)
    at GroovyJMSExample.main(hi.groovy:32)
Caused by: java.io.EOFException
at org.apache.activemq.openwire.v10.BaseDataStreamMarshaller.looseUnmarshalConstByteArray(BaseDataStreamMarshaller.java:602) at org.apache.activemq.openwire.v10.WireFormatInfoMarshaller.looseUnmarshal(WireFormatInfoMarshaller.java:130) at org.apache.activemq.openwire.OpenWireFormat.doUnmarshal(OpenWireFormat.java:373) at org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:285) at org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:221) at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:213) at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:196)
thufir@doge:~$
thufir@doge:~$ cat IdeaProjects/groovy/src/hi.groovy
@Grapes([
@Grab(group = 'net.sf.gtools.jms', module = 'JmsCategory', version = '0.2'), @Grab(group = 'org.apache.activemq', module = 'activemq-all', version = '5.9.0'),
        @Grab(group = "junit", module = "junit", version = "4.11"),
@Grab(group = 'net.sf.gtools.jms', module = 'JmsCategory', version = '0.2'), @Grab(group = 'org.apache.activemq', module = 'activemq-all', version = '5.9.0'),
        @Grab(group = "junit", module = "junit", version = "4.11"),
@Grab(group = 'net.sf.gtools.jms', module = 'JmsCategory', version = '0.2'), @Grab(group = 'org.apache.activemq', module = 'activemq-all', version = '5.9.0'),
        @Grab(group = "junit", module = "junit", version = "4.11"),
@Grab(group = 'net.sf.gtools.jms', module = 'JmsCategory', version = '0.2'), @Grab(group = 'org.apache.activemq', module = 'activemq-all', version = '5.9.0'),
        @Grab(group = "junit", module = "junit", version = "4.11")
])
import net.sf.gtools.jms.JmsCategory
import org.apache.activemq.ActiveMQConnectionFactory

class GroovyJMSExample {
    def static sendMessage() {
        use(JmsCategory) {
            def jms = new ActiveMQConnectionFactory('tcp://localhost:3700')
            jms.connect { c ->
                c.queue("TEST-queue") { q ->
                    def msg = createTextMessage("test")
                    q.send(msg)
                }
            }
        }
    }

    static void main(String[] args) {
        sendMessage()
    }
}
thufir@doge:~$



thanks,

Thufir

Reply via email to