Skip to content

Instantly share code, notes, and snippets.

@lispnik

lispnik/gist:5662665

Created May 28, 2013
Embed
What would you like to do?
standalone.xml:
...
<jms-destinations>
<jms-queue name="queue/example">
<entry name="queue/example"/>
<!-- <entry name="java:jboss/exported/jms/queue/test"/> -->
</jms-queue>
</jms-destinations>
</hornetq-server>
case #1 immutant.init:
(ns immutant.init
(:require [immutant.repl :as repl]
[immutant.messaging :as messaging]))
;;; (messaging/start "queue/example")
(messaging/listen "queue/example" #'println)
08:03:00,295 INFO [org.jboss.web] (ServerService Thread Pool -- 75) JBAS018210: Register web context: /example
08:03:03,134 INFO [org.hornetq.core.server] (pool-7-thread-1) HQ221005: trying to deploy queue jms.queue.queue/data
08:03:03,139 INFO [org.jboss.as.messaging] (pool-7-thread-1) JBAS011601: Bound messaging object to jndi name java:/queue/data
08:03:03,220 ERROR [immutant.runtime] (pool-6-thread-2) Unexpected error occurred loading immutant.init #<IllegalStateException java.lang.IllegalStateException: queue/example is not available>
08:03:03,220 ERROR [org.jboss.msc.service.fail] (pool-6-thread-2) MSC00001: Failed to start service jboss.deployment.unit."example.clj".immutant.core.application-initializer: org.jboss.msc.service.StartException in service jboss.deployment.unit."example.clj".immutant.core.application-initializer: java.lang.IllegalStateException: queue/example is not available
at org.projectodd.polyglot.core.AsyncService$1.run(AsyncService.java:52) [polyglot-core.jar:1.13.0]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_17]
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.7.0_17]
at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.7.0_17]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_17]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_17]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_17]
Caused by: java.lang.IllegalStateException: queue/example is not available
at org.immutant.messaging.MessageProcessorGroupizer.createGroup(MessageProcessorGroupizer.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_17]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_17]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_17]
at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_17]
at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:93) [clojure.jar:]
at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:28) [clojure.jar:]
at immutant.messaging$listen.doInvoke(messaging.clj:242)
at clojure.lang.RestFn.invoke(RestFn.java:425) [clojure.jar:]
at immutant.init$eval2080.invoke(init.clj:5)
at clojure.lang.Compiler.eval(Compiler.java:6619) [clojure.jar:]
at clojure.lang.Compiler.load(Compiler.java:7064) [clojure.jar:]
at clojure.lang.RT.loadResourceScript(RT.java:370) [clojure.jar:]
at clojure.lang.RT.loadResourceScript(RT.java:361) [clojure.jar:]
at clojure.lang.RT.load(RT.java:440) [clojure.jar:]
at clojure.lang.RT.load(RT.java:411) [clojure.jar:]
at clojure.core$load$fn__5018.invoke(core.clj:5530) [clojure.jar:]
at clojure.core$load.doInvoke(core.clj:5529) [clojure.jar:]
at clojure.lang.RestFn.invoke(RestFn.java:408) [clojure.jar:]
at clojure.core$load_one.invoke(core.clj:5336) [clojure.jar:]
at clojure.core$load_lib$fn__4967.invoke(core.clj:5375) [clojure.jar:]
at clojure.core$load_lib.doInvoke(core.clj:5374) [clojure.jar:]
at clojure.lang.RestFn.applyTo(RestFn.java:142) [clojure.jar:]
at clojure.core$apply.invoke(core.clj:619) [clojure.jar:]
at clojure.core$load_libs.doInvoke(core.clj:5413) [clojure.jar:]
at clojure.lang.RestFn.applyTo(RestFn.java:137) [clojure.jar:]
at clojure.core$apply.invoke(core.clj:619) [clojure.jar:]
at clojure.core$require.doInvoke(core.clj:5496) [clojure.jar:]
at clojure.lang.RestFn.invoke(RestFn.java:408) [clojure.jar:]
at immutant.runtime$init_by_ns.invoke(runtime.clj:58)
at immutant.runtime$initialize.invoke(runtime.clj:91)
at clojure.lang.Var.invoke(Var.java:419) [clojure.jar:]
at org.immutant.runtime.impl.ClojureRuntimeImpl.invoke(ClojureRuntimeImpl.java:146)
at org.immutant.runtime.impl.ClojureRuntimeImpl.invoke(ClojureRuntimeImpl.java:139)
at org.immutant.core.ApplicationInitializer.startAsync(ApplicationInitializer.java:48) [immutant-core-module.jar:1.x.incremental.886]
at org.projectodd.polyglot.core.AsyncService$1.run(AsyncService.java:49) [polyglot-core.jar:1.13.0]
... 6 more
case #2 immutant.init:
(ns immutant.init
(:require [immutant.repl :as repl]
[immutant.messaging :as messaging]))
(messaging/start "queue/example")
(messaging/listen "queue/example" #'println)
08:04:42,009 INFO [org.jboss.as.server.deployment] (MSC service thread 1-14) JBAS015876: Starting deployment of "example.clj" (runtime-name: "example.clj")
08:04:43,901 INFO [org.jboss.web] (ServerService Thread Pool -- 82) JBAS018210: Register web context: /example
08:04:45,908 ERROR [immutant.runtime] (pool-6-thread-4) Unexpected error occurred loading immutant.init #<ClassCastException java.lang.ClassCastException: org.jboss.as.messaging.jms.JMSQueueService cannot be cast to org.projectodd.polyglot.messaging.destinations.DestroyableJMSQueueService>
08:04:45,909 ERROR [org.jboss.msc.service.fail] (pool-6-thread-4) MSC00001: Failed to start service jboss.deployment.unit."example.clj".immutant.core.application-initializer: org.jboss.msc.service.StartException in service jboss.deployment.unit."example.clj".immutant.core.application-initializer: java.lang.ClassCastException: org.jboss.as.messaging.jms.JMSQueueService cannot be cast to org.projectodd.polyglot.messaging.destinations.DestroyableJMSQueueService
at org.projectodd.polyglot.core.AsyncService$1.run(AsyncService.java:52) [polyglot-core.jar:1.13.0]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_17]
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.7.0_17]
at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.7.0_17]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_17]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_17]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_17]
Caused by: java.lang.ClassCastException: org.jboss.as.messaging.jms.JMSQueueService cannot be cast to org.projectodd.polyglot.messaging.destinations.DestroyableJMSQueueService
at org.projectodd.polyglot.messaging.destinations.processors.QueueInstaller.deployGlobalQueue(QueueInstaller.java:94)
at org.immutant.messaging.Destinationizer.createQueue(Destinationizer.java:58)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_17]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_17]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_17]
at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_17]
at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:93) [clojure.jar:]
at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:28) [clojure.jar:]
at immutant.messaging.core$start_queue$fn__846.invoke(core.clj:178)
at immutant.messaging.core$start_destination.invoke(core.clj:168)
at immutant.messaging.core$start_queue.doInvoke(core.clj:176)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment