Properly speaking, it works in 5.0.6 on my home computer, but not on my work 
computer, though now you've got me wondering if I added the logging after I 
last ran it (I don't think so, but...).  Regardless, it sounds like I shouldn't 
be trying to pass a Logger to my contributeHibernateSessionSource method.  Any 
suggestions on the right way to get a Logger to my 
DatabaseConnectionPropertiesHibernateConfigurer class?  I can obviously fall 
back on a traditional log4j logger declared in the class itself, but I'd like 
to try to do things the Tapestry IOC way.  Do I need a builder method for 
DatabaseConnectionPropertiesHibernateConfigurer that gives it the Logger, then 
make my built DatabaseConnectionPropertiesHibernateConfigurer an argument to 
contributeHibernateSessionSource?

Franz

----- Original Message ----
From: Howard Lewis Ship <[EMAIL PROTECTED]>
To: Tapestry users <users@tapestry.apache.org>
Sent: Wednesday, January 2, 2008 11:27:18 AM
Subject: Re: T5.0.7: No service implements the interface org.slf4j.Logger


That's odd, I don't understand why it would have worked in 5.0.5!  A
Logger should only be available for a service builder method, not for
a contribution method.

On Jan 2, 2008 11:18 AM, Franz Amador <[EMAIL PROTECTED]> wrote:
> This used to work, but now it's broken for me in 5.0.6 and 5.0.7.
  I'm not sure how to debug this.  Apparently a proxy is being created for
 Logger, but when HibernateSessionManagerImpl tries to use it, it can't
 be realized.  Thanks in advance for any help.
>
> Here are the relevant bits of AppModule.java:
>
> import org.slf4j.Logger;
> ...
>
> public class AppModule {
> ...
>     public static void
 contributeHibernateSessionSource(OrderedConfiguration<HibernateConfigurer> 
config, Logger log) {
>         config.add("DatabaseConnectionProperties", new
 DatabaseConnectionPropertiesHibernateConfigurer(log), "after:Default");
>     }
> ...
>
>
> and here's the stack trace:
>
> Caused by: java.lang.RuntimeException: Exception constructing service
 'HibernateSessionSource': Error invoking service builder method
 org.apache.tapestry.hibernate.HibernateModule.build(Logger, List) (at
 HibernateModule.java:111) (for service 'HibernateSessionSource'): Error
 invoking service contribution method
 
com.centricsoftware.pi.services.AppModule.contributeHibernateSessionSource(OrderedConfiguration,
 Logger): No
 service implements the interface org.slf4j.Logger.
>     at
 
org.apache.tapestry.ioc.internal.services.JustInTimeObjectCreator.createObject(JustInTimeObjectCreator.java:76)
>     at
 
$HibernateSessionSource_1173bde489d._delegate($HibernateSessionSource_1173bde489d.java)
>     at
 
$HibernateSessionSource_1173bde489d.create($HibernateSessionSource_1173bde489d.java)
>     at
 
org.apache.tapestry.internal.hibernate.HibernateSessionManagerImpl.<init>(HibernateSessionManagerImpl.java:31)
>     at
 org.apache.tapestry.hibernate.HibernateModule.build(HibernateModule.java:73)
>
> Franz Amador
> [EMAIL PROTECTED]
>
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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




Reply via email to