Skip to content

Instantly share code, notes, and snippets.

@minostro
minostro / gist:7648322
Created November 25, 2013 20:30
stacktrace when using fntest in immutant-demo toy project.
➜ immutant-demo lein test
lein test immutant-demo.core-test
lein test immutant-demo.integration-test
Exception in thread "main" java.lang.IllegalArgumentException: No implementation of method: :ready? of protocol: #'jboss-as.management/Server found for class: clojure.lang.Var$Unbound
at clojure.core$_cache_protocol_fn.invoke(core_deftype.clj:541)
at jboss_as.management$eval2567$fn__2581$G__2554__2586.invoke(management.clj:6)
at jboss_as.management$wait_for_ready_QMARK_.invoke(management.clj:135)
at fntest.core$with_deployments$fn__3385.invoke(core.clj:62)
(use-fixtures :once
(compose-fixtures
fnt/with-jboss
(fnt/with-deployment "immutant-demo-fntest" {:root "/Users/milinostroza/Sandbox/immutant-demo-fntest/", :context-path "/foo"})))
lein test immutant-demo-fntest.integration-test
Starting JBoss
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -Xms64m -Xmx1024m -XX:MaxPermSize=1024m -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSClassUnloadingEnabled -Djboss.home.dir=/Users/milinostroza/.immutant/current/jboss -Dlogging.configuration=file:/Users/milinostroza/.immutant/current/jboss/standalone/configuration/logging.properties -Dorg.jboss.boot.log.file=/Users/milinostroza/Sandbox/immutant-demo-fntest/target/isolated-immutant/standalone/log/boot.log -jar /Users/milinostroza/.immutant/current/jboss/jboss-modules.jar -mp /Users/milinostroza/.immutant/current/jboss/modules -jaxpmodule javax.xml.jaxp-provider org.jboss.as.standalone -Djboss.server.base.dir=/Users/milinostroza/Sandbox/immutant-demo-fntest/target/isolated-immutant/standalone -Djboss.socket.binding.port-offset=67
Timed out waiting for JBoss (try setting WAIT_FOR_JBOSS=120)
Stopping JBoss
Exception in thread "main" java.net.ConnectException: Connection re
@minostro
minostro / gist:7663704
Created November 26, 2013 18:50
full jboss log
2:39:43,220 INFO [org.jboss.modules] (main) JBoss Modules version 1.2.0.CR1
12:39:43,453 INFO [org.jboss.msc] (main) JBoss MSC version 1.0.4.GA
12:39:43,499 INFO [org.jboss.as] (MSC service thread 1-5) JBAS015899: JBoss AS 7.2.x.slim.incremental.6 "Janus" starting
12:39:43,505 DEBUG [org.jboss.as.config] (MSC service thread 1-5) Configured system properties:
awt.nativeDoubleBuffering = true
awt.toolkit = apple.awt.CToolkit
file.encoding = MacRoman
file.encoding.pkg = sun.io
file.separator = /
ftp.nonProxyHosts = local|*.local|169.254/16|*.169.254/16
(ns immutant-demo-fntest.integration-test
(:use clojure.test)
(:require [clj-http.client :as http]
[fntest.core :as fnt]
[immutant.util :as util]))
; (use-fixtures :once
; (compose-fixtures
; fnt/with-jboss
; (fnt/with-deployment "immutant-demo-fntest.clj" {:root "./", :context-path "/foo"})))
@minostro
minostro / gist:7665585
Created November 26, 2013 20:25
jboss log
14:24:35,683 INFO [org.jboss.modules] (main) JBoss Modules version 1.2.0.CR1
14:24:35,908 INFO [org.jboss.msc] (main) JBoss MSC version 1.0.4.GA
14:24:35,952 INFO [org.jboss.as] (MSC service thread 1-6) JBAS015899: JBoss AS 7.2.x.slim.incremental.6 "Janus" starting
14:24:35,957 DEBUG [org.jboss.as.config] (MSC service thread 1-6) Configured system properties:
awt.nativeDoubleBuffering = true
awt.toolkit = apple.awt.CToolkit
file.encoding = MacRoman
file.encoding.pkg = sun.io
file.separator = /
ftp.nonProxyHosts = local|*.local|169.254/16|*.169.254/16
(ns immutant-demo-fntest.integration-test
(:use clojure.test)
(:require [clj-http.client :as http]
[fntest.core :as fnt]))
; (deftest first-integration-test
; (testing "jbos"
; (is (= "hola" (util/app-uri)))))
@minostro
minostro / gist:7714901
Last active December 29, 2015 19:08
Select the points belonging to a given checkpoint area. First, I create the tables checkpoint and point. Then, two checkpoints are created, and five points are inserted. Finally, I define the query that fulfill the statement.
CREATE TABLE public.checkpoint (
id SERIAL PRIMARY KEY,
geom GEOMETRY(Point, 26910),
radio int,
name VARCHAR(128)
);
CREATE INDEX public.checkpoint_geom_index
ON public.checkpoint
USING GIST (geom);
private HornetQJMSConnectionFactory getConnectionFactory() {
Map<String, Object> transportParams = new HashMap<String, Object>(5);
transportParams.put("host", "10.6.81.225");
transportParams.put("port", 10255);
transportParams.put("use-nio", "true");
TransportConfiguration tc = new TransportConfiguration("org.hornetq.core.remoting.impl.netty.NettyConnectorFactory", transportParams);
HornetQJMSConnectionFactory connectionFactory = HornetQJMSClient.createConnectionFactoryWithoutHA(tc);
connectionFactory.setReconnectAttempts(-1);
connectionFactory.setRetryInterval(1000);
(ns intl-mbus.core
(:import (javax.jms Connection MessageProducer Queue Session TextMessage)
(org.hornetq.api.core TransportConfiguration)
(java.util HashMap Map)
(org.hornetq.api.jms HornetQJMSClient JMSFactoryType)
(org.hornetq.jms.client HornetQConnectionFactory)
(org.hornetq.jms.client HornetQConnectionFactory))
(:require [cheshire.core :refer :all]))
(def props (java.util.HashMap. {"host" "10.6.81.225" "port" (Integer. 10255)}))