Hello,

After the registry was built and performRegistryStartup has been called, I get the following exception at processing the first request:

java.lang.RuntimeException: Exception constructing service 'RatingSessionFactory': Method org .apache .tapestry5 .ioc.internal.ModuleImpl.findDecoratorsForService(ModuleImpl.java:130) may no longer be invoked.

There is a workaround to make RatingSessionFactory eager loading - however I don't want to make every service eager loading to
prevent such a startup problem.

It's now the third time this exception occurs (with different services) and I'd like to know what's wrong.

I'm using tapestry5-ioc version 5.0.18 my module looks something like this:

        public static void bind(ServiceBinder binder)
        {
                // other services, using the session factory
        }
        
public static SessionFactory buildRatingSessionFactory(HibernateConfig config)
        {
                AnnotationConfiguration annotated = new 
AnnotationConfiguration()
                        .setProperty("hibernate.dialect", config.dialect())
.setProperty("hibernate.connection.driver_class", config.driverClass())
                        .setProperty("hibernate.connection.url", config.url())
                        .setProperty("hibernate.connection.username", 
config.username())
                        .setProperty("hibernate.connection.password", 
config.password())
.setProperty("hibernate.connection.pool_size", "" + config.poolSize()) .setProperty("hibernate.connection.autocommit", "" + config.autoCommit()) .setProperty("hibernate.cache.provider_class", config.cacheProvider())
                        .setProperty("hibernate.hbm2ddl.auto", config.hbm2ddl())
                        .setProperty("hibernate.show_sql", "" + 
config.showSQL())
                        .setProperty("hibernate.current_session_context_class", 
"thread")
                        .addAnnotatedClass(SomeClass.class);
                
                return annotated.buildSessionFactory();
        }

My startup code is this:

                RegistryBuilder builder = new RegistryBuilder();
                
                builder.add(MyModule1.class);
                builder.add(MyModule2.class);
                
                Registry registry = builder.build();
                registry.performRegistryStartup();

Thanks for any responses :)
Michael



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to