Skip to content

frustrations with tapestry (or is it hivemind?)

Now don’t get me wrong, I really like tapestry in many ways but I have to admit that it is a little frustrating the spottiness of the documentation and here is the biggest beef the way it is scattered all over the place and not cross-referenced!

But also most importantly a lot of knowledge only exists in email archives. The most recent example of this is how to initialize a service that depends on Tapestry’s infrastructure.

I originally tried to use just the HiveMind EagerLoad feature:

  <contribution configuration-id="hivemind.EagerLoad">
    <load service-id="testData"/>

But I quickly got this error:

java.lang.IllegalStateException: The Infrastructure service has not yet been initialized.

This is because Hivemind is running my service initialization before Tapestry is doing it’s initialization. Now as a research point it may be possible to indicate to Hivemind some dependency ordering here, but the hivemind docs can be just as scattered as the tapestry documentation. Because Tapestry 4.x is so dependent on Hivemind it is not always clear where to look on these configuration issues.

Going out the email lists I found that there is a tapestry ‘contribution’ that to make in your hivemodule.xml file that is supposed to work.

  <contribution configuration-id="tapestry.init.ApplicationInitializers">
    <command after="*" id="myInitializer" object="service:testData"/>

Unfortunately while the tapestry infrastructure is now available there is no WebRequest object for the session to attach to.

java.lang.NullPointerException: Property ‘webRequest’ of <OuterProxy for tapestry.globals.RequestGlobals(> is null.
at $WebRequest_10deb12def2._targetServiceProperty($
at $WebRequest_10deb12def2.getSession($
at $WebRequest_10deb12dec3.getSession($
at $WebRequest_10deb12dec2.getSession($
at org.apache.tapestry.engine.state.SessionScopeManager.getSession(
at org.apache.tapestry.engine.state.SessionScopeManager.get(
at $StateObjectPersistenceManager_10deb12deed.get($
at $StateObjectPersistenceManager_10deb12deec.get($
at org.apache.tapestry.engine.state.StateObjectManagerImpl.get(
at org.apache.tapestry.engine.state.ApplicationStateManagerImpl.get(

So back to email lists..

Posted in amplafi, technical.

0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Some HTML is OK

or, reply to this post via trackback.