Skip to content

Instantly share code, notes, and snippets.

View hlship's full-sized avatar

Howard M. Lewis Ship hlship

View GitHub Profile
@hlship
hlship / gist:1225419
Created September 18, 2011 19:09
More complicated (defrecord) example
(defrecord Element [name attributes content]
NodeStreaming
(stream [node strategy out]
(let [element-name (clojure.core/name name)
attr-quote (strategy :attribute-quote)]
(write out "<" element-name)
; Write out normal attributes
(doseq [[attr-name attr-value] attributes]
(if-not (nil? attr-value)
@hlship
hlship / gist:1259462
Created October 3, 2011 16:03
Console Stack Trace
[ERROR] Registry Parameter 'value' of component class org.apache.tapestry5.integration.app1.components.ParameterSubClass conflicts with the parameter defined by the org.apache.tapestry5.integration.app1.base.ParameterBaseClass base class.
[ERROR] Registry Operations trace:
[ERROR] Registry [ 1] Constructing instance of page class org.apache.tapestry5.integration.app1.pages.ParameterConflictDemo
[ERROR] Registry [ 2] Creating ComponentAssembler for org.apache.tapestry5.integration.app1.pages.ParameterConflictDemo
[ERROR] Registry [ 3] Creating instantiator for component class org.apache.tapestry5.integration.app1.components.ParameterSubClass
[ERROR] Registry [ 4] Running component class transformations on org.apache.tapestry5.integration.app1.components.ParameterSubClass
[INFO] TimingFilter Request time: 0.01 s -- /parameterconflictdemo
[ERROR] RequestExceptionHandler Processing of request failed with uncaught exception: Failure creating embedded component 'parametersubclass' of org.apache.tapestry5.integrati
@hlship
hlship / gist:1259528
Created October 3, 2011 16:31
Tapestry startup logging
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -Dtools.jar=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/tools.jar -Dgroovy.home=/Users/hlship/.gradle/cache/org.codehaus.groovy/groovy-all/jars -Dgroovy.starter.conf=/Applications/IntelliJ IDEA 10.app/plugins/Groovy/lib/groovy-starter.conf -Xmx784M -Dtapestry.combine-scripts=false -Dtapestry.production-mode=false -Didea.launcher.port=7533 -Didea.launcher.bin.path=/Applications/IntelliJ IDEA 10.app/bin -Dfile.encoding=UTF-8 -classpath /Users/hlship/.gradle/cache/org.codehaus.groovy/groovy-all/jars/groovy-all-1.7.4.jar:/Applications/IntelliJ IDEA 10.app/lib/idea_rt.jar com.intellij.rt.execution.application.AppMain org.codehaus.groovy.tools.GroovyStarter --conf /Applications/IntelliJ IDEA 10.app/plugins/Groovy/lib/groovy-starter.conf --main groovy.ui.GroovyMain --classpath /Users/hlship/workspaces/tapestry/tapestry5/out/test/tapestry-core:/Users/hlship/workspaces/tapestry/tapestry5/out/production/tapestry-core:/Use
@hlship
hlship / gist:1259540
Created October 3, 2011 16:35
Operation tracking of handling a single request
[DEBUG] Registry [ 1] --> Realizing service HttpServletRequestHandler
[DEBUG] Registry [ 2] --> Instantiating service HttpServletRequestHandler implementation via org.apache.tapestry5.services.TapestryModule.buildHttpServletRequestHandler(Logger, List, RequestHandler, String, SessionFactory) (at TapestryModule.java:1373)
[DEBUG] Registry [ 3] --> Creating plan to invoke public org.apache.tapestry5.services.HttpServletRequestHandler org.apache.tapestry5.services.TapestryModule.buildHttpServletRequestHandler(org.slf4j.Logger,java.util.List,org.apache.tapestry5.services.RequestHandler,java.lang.String,org.apache.tapestry5.internal.services.SessionFactory)
[DEBUG] Registry [ 4] --> Determining injection value for parameter #1 (org.slf4j.Logger)
[DEBUG] Registry [ 4] <-- Determining injection value for parameter #1 (org.slf4j.Logger) [0.07 ms]
[DEBUG] Registry [ 4] --> Determining injection value for parameter #2 (java.util.List)
[DEBUG] Registry [ 5] --> Collecting ordered configuration for service HttpSer
@hlship
hlship / build.gradle
Created October 12, 2011 21:19
Quickstart archetype build.gradle
import org.apache.tools.ant.filters.FixCrLfFilter
import org.apache.tools.ant.filters.ReplaceTokens
generatedDir = new File(buildDir, 'quickstart-generated')
task generateArchetype(type: Copy) {
srcDir = file('prototypes')
// This let gradle know where is UP-TO-DATE
inputs.file srcDir
@hlship
hlship / build.gradle
Created October 12, 2011 21:22
Tapestry top-level build.gradle
description = "Apache Tapestry 5 Project"
// Remember that when generating a release, this should be incremented. Also don't forget to
// tag the release in Subversion.
tapestryVersion = "5.3-beta-20"
jettyVersion = '7.0.0.v20091005'
tomcatVersion = '6.0.30'
testngVersion = '5.14.9'
easymockVersion = '3.0'
@hlship
hlship / gist:1282681
Created October 12, 2011 21:25
Gradle execution output
$ gr genR -x test --debug
14:25:07.165 [WARN] [org.gradle.launcher.DaemonClient] Note: the Gradle build daemon is an experimental feature.
14:25:07.174 [WARN] [org.gradle.launcher.DaemonClient] As such, you may experience unexpected build failures. You may need to occasionally stop the daemon.
14:25:07.199 [DEBUG] [org.gradle.messaging.remote.internal.TcpOutgoingConnector] Found loop-back addresses: [/0:0:0:0:0:0:0:1, /127.0.0.1].
14:25:07.199 [DEBUG] [org.gradle.messaging.remote.internal.TcpOutgoingConnector] Trying to connect to address /0:0:0:0:0:0:0:1.
14:25:07.206 [DEBUG] [org.gradle.messaging.remote.internal.TcpOutgoingConnector] Connected to address /0:0:0:0:0:0:0:1.
14:25:07.295 [INFO] [org.gradle.BuildLogger] Starting Build
14:25:07.296 [DEBUG] [org.gradle.BuildLogger] Gradle user home: /Users/hlship/.gradle
14:25:07.297 [DEBUG] [org.gradle.BuildLogger] Current dir: /Users/hlship/workspaces/tapestry/tapestry5
14:25:07.298 [DEBUG] [org.gradle.BuildLogger] Settings file: null
@hlship
hlship / gist:1284946
Created October 13, 2011 17:57
Building a sample Tapestry 5.3 app in under 30 seconds
$ mvn archetype:generate -DarchetypeCatalog=http://tapestry.apache.org/
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:2.1:generate (default-cli) @ standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:2.1:generate (default-cli) @ standalone-pom <<<
@hlship
hlship / gist:1511300
Created December 22, 2011 18:23
Good Morning Howard ...
[ERROR] ioc.Registry Operations trace:
[ERROR] ioc.Registry [ 1] Realizing service RegistryStartup
[ERROR] ioc.Registry [ 2] Instantiating service RegistryStartup implementation via org.apache.tapestry5.ioc.internal.services.RegistryStartup(Logger, List) (at RegistryStartup.java:36) via org.apache.tapestry5.ioc.services.TapestryIOCModule.bind(ServiceBinder) (at TapestryIOCModule.java:49)
[ERROR] ioc.Registry [ 3] Creating plan to instantiate org.apache.tapestry5.ioc.internal.services.RegistryStartup via public org.apache.tapestry5.ioc.internal.services.RegistryStartup(org.slf4j.Logger,java.util.List)
[ERROR] ioc.Registry [ 4] Determining injection value for parameter #2 (java.util.List)
[ERROR] ioc.Registry [ 5] Collecting ordered configuration for service RegistryStartup
[ERROR] ioc.Registry [ 6] Invoking org.apache.tapestry5.hibernate.HibernateCoreModule.contributeRegistryStartup(OrderedConfiguration, boolean, HibernateSessionSource) (at HibernateCoreModule.java:65)
[ERROR] ioc.Registry [ 7] Determining inj
@hlship
hlship / gist:1511330
Created December 22, 2011 18:32
Resolve a boolean parameter
[ 6] Invoking org.apache.tapestry5.hibernate.HibernateCoreModule.contributeRegistryStartup(OrderedConfiguration, boolean, HibernateSessionSource) (at HibernateCoreModule.java:65)
[ 7] Determining injection value for parameter #2 (boolean)
[ 8] Resolving object of type boolean using MasterObjectProvider