Also, If I do this:

public void testTest() throws Exception {
  RegistryBuilder builder = new RegistryBuilder();
  builder.add(TapestryModule.class);
  builder.add(HibernateModule.class);
  builder.add(AppModule.class);
        
  Registry registry = builder.build();
  ... get the service and do something ...
}

I get the exception:

Caused by: java.lang.RuntimeException: The Alias service's mode has not
been set. Unable to determine the correct set of alias properties.
        at
org.apache.tapestry.internal.services.AliasImpl.provide(AliasImpl.java:79)
        at org.apache.tapestry.services.TapestryModule
$2.provide(TapestryModule.java:590)

On Fri, 2007-06-08 at 17:16 -0400, Dan Adams wrote:
> I have some dao services that i would like to test and for that i need a
> running hibernate session. I can't seem to get tapestry-hibernate to
> load in my tests however. What I have to load the ioc is basically:
> 
> RegistryBuilder builder = new RegistryBuilder();
> IOCUtilities.addDefaultModules(builder);
> builder.add(AppModule.class);
> builder.build();
> 
> The exception I'm getting is:
> 
> Caused by: java.lang.RuntimeException: No service implements the
> interface org.apache.tapestry.services.ApplicationGlobals.
>       at
> org.apache.tapestry.ioc.internal.RegistryImpl.getService(RegistryImpl.java:475)
>       at
> org.apache.tapestry.ioc.internal.ObjectLocatorImpl.getService(ObjectLocatorImpl.java:45)
> 
> Anyone been able to load up a hibernate environment with t5 ioc in a
> test yet?
> 
-- 
Dan Adams
Senior Software Engineer
Interactive Factory
617.235.5857


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to