Ok, found the solution, had to inject the service with @Local annotation.
Now it's working. But I guess I'm lucky to only need a service defined in
the same module.


On Fri, Mar 5, 2010 at 11:27 AM, Robin Komiwes <odiss...@gmail.com> wrote:

> Hi there,
>
> I'm trying to advise all my services method with some kind of Logging.
> I can't manage to achieve that.
>
> Based on http://tapestry.apache.org/tapestry5.1/tapestry-ioc/advice.html I
> declared my advisor.
>
>
>
> Whenever I try to inject a service (cf following code), I've got several
> errors :
>    @Match("*")
>     public static void adviseDummy(@Inject Dummy dummy,
> MethodAdviceReceiver receiver)
>     {
>     };
>
> However, this will work:
>    @Match("*")
>     public static void adviseDummy( MethodAdviceReceiver receiver)
>     {
>     };
>
> Dummy is an extremely simple service made just for the tests.
>
> public interface Dummy
> {
>     public String doSomething();
> }
>
>
> Any ideas about what I am missing?
>
>
>
>
> Here it is the stack trace:
>
>
> [ERROR] ioc.Registry Construction of service 'AssetObjectProvider' has
> failed due to recursion: the service depends on itself in some way. Please
> check
> org.apache.tapestry5.internal.services.AssetObjectProvider(AssetSource,
> TypeCoercer, SymbolSource) (at AssetObjectProvider.java:45) via
> org.apache.tapestry5.services.TapestryModule.bind(ServiceBinder) (at
> TapestryModule.java:251) for references to another service that is itself
> dependent on service 'AssetObjectProvider'.
> [ERROR] ioc.Registry Operations trace:
> [ERROR] ioc.Registry [ 1] Realizing service ServletApplicationInitializer
> [ERROR] ioc.Registry [ 2] Invoking
> org.apache.tapestry5.services.TapestryModule.buildServletApplicationInitializer(Logger,
> List, ApplicationInitializer) (at TapestryModule.java:1247)
> [ERROR] ioc.Registry [ 3] Constructing module class
> org.apache.tapestry5.services.TapestryModule
> [ERROR] ioc.Registry [ 4] Determining injection value for parameter #1
> (org.apache.tapestry5.ioc.services.PipelineBuilder)
> [ERROR] ioc.Registry [ 5] Resolving object of type
> org.apache.tapestry5.ioc.services.PipelineBuilder using MasterObjectProvider
> [ERROR] ioc.Registry [ 6] Realizing service AssetObjectProvider
> [ERROR] ioc.Registry [ 7] Invoking
> com.xxx.tapestry.mytest.services.MyModule.adviseDummy(Dummy,
> MethodAdviceReceiver) (at MyModule.java:67)
> [ERROR] ioc.Registry [ 8] Determining injection value for parameter #1
> (com.xxx.tapestry.mytest.services.Dummy)
> [ERROR] ioc.Registry [ 9] Resolving object of type
> com.xxx.tapestry.mytest.services.Dummy using MasterObjectProvider
> [ERROR] ioc.Registry [10] Realizing service AssetObjectProvider
> [ERROR] TapestryModule.AssetObjectProvider Construction of service
> AssetObjectProvider failed: Exception invoking method
> com.xxx.tapestry.mytest.services.MyModule.adviseDummy(Dummy,
> MethodAdviceReceiver) (at MyModule.java:67): Exception constructing service
> 'AssetObjectProvider': Construction of service 'AssetObjectProvider' has
> failed due to recursion: the service depends on itself in some way. Please
> check
> org.apache.tapestry5.internal.services.AssetObjectProvider(AssetSource,
> TypeCoercer, SymbolSource) (at AssetObjectProvider.java:45) via
> org.apache.tapestry5.services.TapestryModule.bind(ServiceBinder) (at
> TapestryModule.java:251) for references to another service that is itself
> dependent on service 'AssetObjectProvider'.
> java.lang.RuntimeException: Exception invoking method
> com.xxx.tapestry.mytest.services.MyModule.adviseDummy(Dummy,
> MethodAdviceReceiver) (at MyModule.java:67): Exception constructing service
> 'AssetObjectProvider': Construction of service 'AssetObjectProvider' has
> failed due to recursion: the service depends on itself in some way. Please
> check
> org.apache.tapestry5.internal.services.AssetObjectProvider(AssetSource,
> TypeCoercer, SymbolSource) (at AssetObjectProvider.java:45) via
> org.apache.tapestry5.services.TapestryModule.bind(ServiceBinder) (at
> TapestryModule.java:251) for references to another service that is itself
> dependent on service 'AssetObjectProvider'.
>  at
> org.apache.tapestry5.ioc.internal.AbstractMethodInvokingInstrumenter.invoke(AbstractMethodInvokingInstrumenter.java:113)
> at
> org.apache.tapestry5.ioc.internal.ServiceAdvisorImpl.advise(ServiceAdvisorImpl.java:51)
>  at
> org.apache.tapestry5.ioc.internal.AdvisorStackBuilder$1.run(AdvisorStackBuilder.java:78)
> at
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl$1.invoke(OperationTrackerImpl.java:52)
>  at
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl$1.invoke(OperationTrackerImpl.java:50)
> at
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:68)
>  at
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.run(OperationTrackerImpl.java:48)
> at
> org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.run(PerThreadOperationTracker.java:56)
>  at
> org.apache.tapestry5.ioc.internal.RegistryImpl.run(RegistryImpl.java:936)
> at
> org.apache.tapestry5.ioc.internal.AdvisorStackBuilder.createObject(AdvisorStackBuilder.java:74)
>  at
> org.apache.tapestry5.ioc.internal.InterceptorStackBuilder.createObject(InterceptorStackBuilder.java:52)
> at
> org.apache.tapestry5.ioc.internal.RecursiveServiceCreationCheckWrapper.createObject(RecursiveServiceCreationCheckWrapper.java:60)
>  at
> org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator$1.invoke(OperationTrackingObjectCreator.java:45)
> at
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:68)
>  at
> org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
> at
> org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:941)
>  at
> org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator.createObject(OperationTrackingObjectCreator.java:49)
> at
> org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.obtainObjectFromCreator(JustInTimeObjectCreator.java:68)
>  at
> org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.createObject(JustInTimeObjectCreator.java:57)
> at $ObjectProvider_1272dd85a94.delegate($ObjectProvider_1272dd85a94.java)
>  at $ObjectProvider_1272dd85a94.provide($ObjectProvider_1272dd85a94.java)
> at
> org.apache.tapestry5.ioc.internal.services.MasterObjectProviderImpl$1.invoke(MasterObjectProviderImpl.java:48)
>  at
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:68)
> at
> org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
>  at
> org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:941)
> at
> org.apache.tapestry5.ioc.internal.services.MasterObjectProviderImpl.provide(MasterObjectProviderImpl.java:41)
>  at
> $MasterObjectProvider_1272dd85a92.provide($MasterObjectProvider_1272dd85a92.java)
> at
> org.apache.tapestry5.ioc.internal.RegistryImpl.getObject(RegistryImpl.java:696)
>  at
> org.apache.tapestry5.ioc.internal.ObjectLocatorImpl.getObject(ObjectLocatorImpl.java:49)
> at
> org.apache.tapestry5.ioc.internal.util.InternalUtils.calculateInjection(InternalUtils.java:209)
>  at
> org.apache.tapestry5.ioc.internal.util.InternalUtils.access$000(InternalUtils.java:43)
> at
> org.apache.tapestry5.ioc.internal.util.InternalUtils$2.invoke(InternalUtils.java:256)
>  at
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:68)
> at
> org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
>  at
> org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:941)
> at
> org.apache.tapestry5.ioc.internal.util.InternalUtils.calculateParameters(InternalUtils.java:260)
>  at
> org.apache.tapestry5.ioc.internal.ModuleImpl.instantiateModuleInstance(ModuleImpl.java:414)
> at
> org.apache.tapestry5.ioc.internal.ModuleImpl.access$1200(ModuleImpl.java:32)
>  at
> org.apache.tapestry5.ioc.internal.ModuleImpl$6$1.invoke(ModuleImpl.java:346)
> at
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:68)
>  at
> org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
> at
> org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:941)
>  at
> org.apache.tapestry5.ioc.internal.ModuleImpl$6.run(ModuleImpl.java:341)
> at
> org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier$2.invoke(ConcurrentBarrier.java:200)
>  at
> org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier$2.invoke(ConcurrentBarrier.java:198)
> at
> org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withWrite(ConcurrentBarrier.java:140)
>  at
> org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withWrite(ConcurrentBarrier.java:206)
> at
> org.apache.tapestry5.ioc.internal.ModuleImpl$7.invoke(ModuleImpl.java:356)
>  at
> org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
> at
> org.apache.tapestry5.ioc.internal.ModuleImpl.getModuleBuilder(ModuleImpl.java:364)
>  at
> org.apache.tapestry5.ioc.internal.ServiceResourcesImpl.getModuleBuilder(ServiceResourcesImpl.java:137)
> at
> org.apache.tapestry5.ioc.internal.ServiceBuilderMethodInvoker.createObject(ServiceBuilderMethodInvoker.java:47)
>  at
> org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator$1.invoke(OperationTrackingObjectCreator.java:45)
> at
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:68)
>  at
> org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
> at
> org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:941)
>  at
> org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator.createObject(OperationTrackingObjectCreator.java:49)
> at
> org.apache.tapestry5.ioc.internal.SingletonServiceLifecycle.createService(SingletonServiceLifecycle.java:29)
>  at
> org.apache.tapestry5.ioc.internal.LifecycleWrappedServiceCreator.createObject(LifecycleWrappedServiceCreator.java:46)
> at
> org.apache.tapestry5.ioc.internal.AdvisorStackBuilder.createObject(AdvisorStackBuilder.java:60)
>  at
> org.apache.tapestry5.ioc.internal.InterceptorStackBuilder.createObject(InterceptorStackBuilder.java:52)
> at
> org.apache.tapestry5.ioc.internal.RecursiveServiceCreationCheckWrapper.createObject(RecursiveServiceCreationCheckWrapper.java:60)
>  at
> org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator$1.invoke(OperationTrackingObjectCreator.java:45)
> at
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:68)
>  at
> org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
> at
> org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:941)
>  at
> org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator.createObject(OperationTrackingObjectCreator.java:49)
> at
> org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.obtainObjectFromCreator(JustInTimeObjectCreator.java:68)
>  at
> org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.createObject(JustInTimeObjectCreator.java:57)
> at
> $ServletApplicationInitializer_1272dd85a91.delegate($ServletApplicationInitializer_1272dd85a91.java)
>  at
> $ServletApplicationInitializer_1272dd85a91.initializeApplication($ServletApplicationInitializer_1272dd85a91.java)
> at org.apache.tapestry5.TapestryFilter.init(TapestryFilter.java:85)
>  at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
> at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
>  at
> org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:589)
> at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
>  at
> org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1220)
> at
> org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:510)
>  at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
> at
> org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart(Jetty6PluginWebAppContext.java:110)
>  at
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
> at
> org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
>  at
> org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
> at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
>  at
> org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
> at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
>  at
> org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
> at org.mortbay.jetty.Server.doStart(Server.java:222)
>  at
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
> at
> org.mortbay.jetty.plugin.Jetty6PluginServer.start(Jetty6PluginServer.java:132)
>  at
> org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:357)
> at
> org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:293)
>  at
> org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute(AbstractJettyRunMojo.java:203)
> at org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:184)
>  at
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:105)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:577)
>  at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:324)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:247)
>  at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:104)
> at org.apache.maven.cli.MavenCli.execute(MavenCli.java:427)
>  at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:157)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:121)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>  at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
>  at
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
>  at
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
> Caused by: java.lang.RuntimeException: Exception constructing service
> 'AssetObjectProvider': Construction of service 'AssetObjectProvider' has
> failed due to recursion: the service depends on itself in some way. Please
> check
> org.apache.tapestry5.internal.services.AssetObjectProvider(AssetSource,
> TypeCoercer, SymbolSource) (at AssetObjectProvider.java:45) via
> org.apache.tapestry5.services.TapestryModule.bind(ServiceBinder) (at
> TapestryModule.java:251) for references to another service that is itself
> dependent on service 'AssetObjectProvider'.
>  at
> org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.obtainObjectFromCreator(JustInTimeObjectCreator.java:78)
> at
> org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.createObject(JustInTimeObjectCreator.java:57)
>  at $ObjectProvider_1272dd85a94.delegate($ObjectProvider_1272dd85a94.java)
> at $ObjectProvider_1272dd85a94.provide($ObjectProvider_1272dd85a94.java)
>  at
> org.apache.tapestry5.ioc.internal.services.MasterObjectProviderImpl$1.invoke(MasterObjectProviderImpl.java:48)
> at
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:68)
>  at
> org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
> at
> org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:941)
>  at
> org.apache.tapestry5.ioc.internal.services.MasterObjectProviderImpl.provide(MasterObjectProviderImpl.java:41)
> at
> $MasterObjectProvider_1272dd85a92.provide($MasterObjectProvider_1272dd85a92.java)
>  at
> org.apache.tapestry5.ioc.internal.RegistryImpl.getObject(RegistryImpl.java:696)
> at
> org.apache.tapestry5.ioc.internal.ObjectLocatorImpl.getObject(ObjectLocatorImpl.java:49)
>  at
> org.apache.tapestry5.ioc.internal.util.InternalUtils.calculateInjection(InternalUtils.java:209)
> at
> org.apache.tapestry5.ioc.internal.util.InternalUtils.access$000(InternalUtils.java:43)
>  at
> org.apache.tapestry5.ioc.internal.util.InternalUtils$2.invoke(InternalUtils.java:256)
> at
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:68)
>  at
> org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
> at
> org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:941)
>  at
> org.apache.tapestry5.ioc.internal.util.InternalUtils.calculateParameters(InternalUtils.java:260)
> at
> org.apache.tapestry5.ioc.internal.util.InternalUtils.calculateParametersForMethod(InternalUtils.java:217)
>  at
> org.apache.tapestry5.ioc.internal.AbstractMethodInvokingInstrumenter.invoke(AbstractMethodInvokingInstrumenter.java:96)
> ... 109 more
> Caused by: org.apache.tapestry5.ioc.internal.OperationException:
> Construction of service 'AssetObjectProvider' has failed due to recursion:
> the service depends on itself in some way. Please check
> org.apache.tapestry5.internal.services.AssetObjectProvider(AssetSource,
> TypeCoercer, SymbolSource) (at AssetObjectProvider.java:45) via
> org.apache.tapestry5.services.TapestryModule.bind(ServiceBinder) (at
> TapestryModule.java:251) for references to another service that is itself
> dependent on service 'AssetObjectProvider'.
>  at
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:90)
> at
> org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
>  at
> org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:941)
> at
> org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator.createObject(OperationTrackingObjectCreator.java:49)
>  at
> org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.obtainObjectFromCreator(JustInTimeObjectCreator.java:68)
> ... 129 more
> Caused by: java.lang.IllegalStateException: Construction of service
> 'AssetObjectProvider' has failed due to recursion: the service depends on
> itself in some way. Please check
> org.apache.tapestry5.internal.services.AssetObjectProvider(AssetSource,
> TypeCoercer, SymbolSource) (at AssetObjectProvider.java:45) via
> org.apache.tapestry5.services.TapestryModule.bind(ServiceBinder) (at
> TapestryModule.java:251) for references to another service that is itself
> dependent on service 'AssetObjectProvider'.
>  at
> org.apache.tapestry5.ioc.internal.RecursiveServiceCreationCheckWrapper.createObject(RecursiveServiceCreationCheckWrapper.java:52)
> at
> org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator$1.invoke(OperationTrackingObjectCreator.java:45)
>  at
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:68)
> ... 133 more
> [ERROR] TapestryModule.ServletApplicationInitializer Construction of
> service ServletApplicationInitializer failed: Unable to instantiate class
> org.apache.tapestry5.services.TapestryModule as a module: Exception
> constructing service 'AssetObjectProvider': Exception invoking method
> com.xxx.tapestry.mytest.services.MyModule.adviseDummy(Dummy,
> MethodAdviceReceiver) (at MyModule.java:67): Exception constructing service
> 'AssetObjectProvider': Construction of service 'AssetObjectProvider' has
> failed due to recursion: the service depends on itself in some way. Please
> check
> org.apache.tapestry5.internal.services.AssetObjectProvider(AssetSource,
> TypeCoercer, SymbolSource) (at AssetObjectProvider.java:45) via
> org.apache.tapestry5.services.TapestryModule.bind(ServiceBinder) (at
> TapestryModule.java:251) for references to another service that is itself
> dependent on service 'AssetObjectProvider'.
> java.lang.RuntimeException: Unable to instantiate class
> org.apache.tapestry5.services.TapestryModule as a module: Exception
> constructing service 'AssetObjectProvider': Exception invoking method
> com.xxx.tapestry.mytest.services.MyModule.adviseDummy(Dummy,
> MethodAdviceReceiver) (at MyModule.java:67): Exception constructing service
> 'AssetObjectProvider': Construction of service 'AssetObjectProvider' has
> failed due to recursion: the service depends on itself in some way. Please
> check
> org.apache.tapestry5.internal.services.AssetObjectProvider(AssetSource,
> TypeCoercer, SymbolSource) (at AssetObjectProvider.java:45) via
> org.apache.tapestry5.services.TapestryModule.bind(ServiceBinder) (at
> TapestryModule.java:251) for references to another service that is itself
> dependent on service 'AssetObjectProvider'.
>  at
> org.apache.tapestry5.ioc.internal.ModuleImpl.instantiateModuleInstance(ModuleImpl.java:439)
> at
> org.apache.tapestry5.ioc.internal.ModuleImpl.access$1200(ModuleImpl.java:32)
>  at
> org.apache.tapestry5.ioc.internal.ModuleImpl$6$1.invoke(ModuleImpl.java:346)
> at
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:68)
>  at
> org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
> at
> org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:941)
>  at
> org.apache.tapestry5.ioc.internal.ModuleImpl$6.run(ModuleImpl.java:341)
> at
> org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier$2.invoke(ConcurrentBarrier.java:200)
>  at
> org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier$2.invoke(ConcurrentBarrier.java:198)
> at
> org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withWrite(ConcurrentBarrier.java:140)
>  at
> org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withWrite(ConcurrentBarrier.java:206)
> at
> org.apache.tapestry5.ioc.internal.ModuleImpl$7.invoke(ModuleImpl.java:356)
>  at
> org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
> at
> org.apache.tapestry5.ioc.internal.ModuleImpl.getModuleBuilder(ModuleImpl.java:364)
>  at
> org.apache.tapestry5.ioc.internal.ServiceResourcesImpl.getModuleBuilder(ServiceResourcesImpl.java:137)
> at
> org.apache.tapestry5.ioc.internal.ServiceBuilderMethodInvoker.createObject(ServiceBuilderMethodInvoker.java:47)
>  at
> org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator$1.invoke(OperationTrackingObjectCreator.java:45)
> at
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:68)
>  at
> org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
> at
> org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:941)
>  at
> org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator.createObject(OperationTrackingObjectCreator.java:49)
> at
> org.apache.tapestry5.ioc.internal.SingletonServiceLifecycle.createService(SingletonServiceLifecycle.java:29)
>  at
> org.apache.tapestry5.ioc.internal.LifecycleWrappedServiceCreator.createObject(LifecycleWrappedServiceCreator.java:46)
> at
> org.apache.tapestry5.ioc.internal.AdvisorStackBuilder.createObject(AdvisorStackBuilder.java:60)
>  at
> org.apache.tapestry5.ioc.internal.InterceptorStackBuilder.createObject(InterceptorStackBuilder.java:52)
> at
> org.apache.tapestry5.ioc.internal.RecursiveServiceCreationCheckWrapper.createObject(RecursiveServiceCreationCheckWrapper.java:60)
>  at
> org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator$1.invoke(OperationTrackingObjectCreator.java:45)
> at
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:68)
>  at
> org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
> at
> org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:941)
>  at
> org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator.createObject(OperationTrackingObjectCreator.java:49)
> at
> org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.obtainObjectFromCreator(JustInTimeObjectCreator.java:68)
>  at
> org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.createObject(JustInTimeObjectCreator.java:57)
> at
> $ServletApplicationInitializer_1272dd85a91.delegate($ServletApplicationInitializer_1272dd85a91.java)
>  at
> $ServletApplicationInitializer_1272dd85a91.initializeApplication($ServletApplicationInitializer_1272dd85a91.java)
> at org.apache.tapestry5.TapestryFilter.init(TapestryFilter.java:85)
>  at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
> at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
>  at
> org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:589)
> at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
>  at
> org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1220)
> at
> org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:510)
>  at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
> at
> org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart(Jetty6PluginWebAppContext.java:110)
>  at
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
> at
> org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
>  at
> org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
> at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
>  at
> org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
> at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
>  at
> org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
> at org.mortbay.jetty.Server.doStart(Server.java:222)
>  at
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
> at
> org.mortbay.jetty.plugin.Jetty6PluginServer.start(Jetty6PluginServer.java:132)
>  at
> org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:357)
> at
> org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:293)
>  at
> org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute(AbstractJettyRunMojo.java:203)
> at org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:184)
>  at
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:105)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:577)
>  at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:324)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:247)
>  at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:104)
> at org.apache.maven.cli.MavenCli.execute(MavenCli.java:427)
>  at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:157)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:121)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>  at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
>  at
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
>  at
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
> Caused by: java.lang.RuntimeException: Exception constructing service
> 'AssetObjectProvider': Exception invoking method
> com.xxx.tapestry.mytest.services.MyModule.adviseDummy(Dummy,
> MethodAdviceReceiver) (at MyModule.java:67): Exception constructing service
> 'AssetObjectProvider': Construction of service 'AssetObjectProvider' has
> failed due to recursion: the service depends on itself in some way. Please
> check
> org.apache.tapestry5.internal.services.AssetObjectProvider(AssetSource,
> TypeCoercer, SymbolSource) (at AssetObjectProvider.java:45) via
> org.apache.tapestry5.services.TapestryModule.bind(ServiceBinder) (at
> TapestryModule.java:251) for references to another service that is itself
> dependent on service 'AssetObjectProvider'.
>  at
> org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.obtainObjectFromCreator(JustInTimeObjectCreator.java:78)
> at
> org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.createObject(JustInTimeObjectCreator.java:57)
>  at $ObjectProvider_1272dd85a94.delegate($ObjectProvider_1272dd85a94.java)
> at $ObjectProvider_1272dd85a94.provide($ObjectProvider_1272dd85a94.java)
>  at
> org.apache.tapestry5.ioc.internal.services.MasterObjectProviderImpl$1.invoke(MasterObjectProviderImpl.java:48)
> at
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:68)
>  at
> org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
> at
> org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:941)
>  at
> org.apache.tapestry5.ioc.internal.services.MasterObjectProviderImpl.provide(MasterObjectProviderImpl.java:41)
> at
> $MasterObjectProvider_1272dd85a92.provide($MasterObjectProvider_1272dd85a92.java)
>  at
> org.apache.tapestry5.ioc.internal.RegistryImpl.getObject(RegistryImpl.java:696)
> at
> org.apache.tapestry5.ioc.internal.ObjectLocatorImpl.getObject(ObjectLocatorImpl.java:49)
>  at
> org.apache.tapestry5.ioc.internal.util.InternalUtils.calculateInjection(InternalUtils.java:209)
> at
> org.apache.tapestry5.ioc.internal.util.InternalUtils.access$000(InternalUtils.java:43)
>  at
> org.apache.tapestry5.ioc.internal.util.InternalUtils$2.invoke(InternalUtils.java:256)
> at
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:68)
>  at
> org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
> at
> org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:941)
>  at
> org.apache.tapestry5.ioc.internal.util.InternalUtils.calculateParameters(InternalUtils.java:260)
> at
> org.apache.tapestry5.ioc.internal.ModuleImpl.instantiateModuleInstance(ModuleImpl.java:414)
>  ... 73 more
> Caused by: java.lang.RuntimeException: Exception invoking method
> com.xxx.tapestry.mytest.services.MyModule.adviseDummy(Dummy,
> MethodAdviceReceiver) (at MyModule.java:67): Exception constructing service
> 'AssetObjectProvider': Construction of service 'AssetObjectProvider' has
> failed due to recursion: the service depends on itself in some way. Please
> check
> org.apache.tapestry5.internal.services.AssetObjectProvider(AssetSource,
> TypeCoercer, SymbolSource) (at AssetObjectProvider.java:45) via
> org.apache.tapestry5.services.TapestryModule.bind(ServiceBinder) (at
> TapestryModule.java:251) for references to another service that is itself
> dependent on service 'AssetObjectProvider'.
>  at
> org.apache.tapestry5.ioc.internal.AbstractMethodInvokingInstrumenter.invoke(AbstractMethodInvokingInstrumenter.java:113)
> at
> org.apache.tapestry5.ioc.internal.ServiceAdvisorImpl.advise(ServiceAdvisorImpl.java:51)
>  at
> org.apache.tapestry5.ioc.internal.AdvisorStackBuilder$1.run(AdvisorStackBuilder.java:78)
> at
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl$1.invoke(OperationTrackerImpl.java:52)
>  at
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl$1.invoke(OperationTrackerImpl.java:50)
> at
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:68)
>  at
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.run(OperationTrackerImpl.java:48)
> at
> org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.run(PerThreadOperationTracker.java:56)
>  at
> org.apache.tapestry5.ioc.internal.RegistryImpl.run(RegistryImpl.java:936)
> at
> org.apache.tapestry5.ioc.internal.AdvisorStackBuilder.createObject(AdvisorStackBuilder.java:74)
>  at
> org.apache.tapestry5.ioc.internal.InterceptorStackBuilder.createObject(InterceptorStackBuilder.java:52)
> at
> org.apache.tapestry5.ioc.internal.RecursiveServiceCreationCheckWrapper.createObject(RecursiveServiceCreationCheckWrapper.java:60)
>  at
> org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator$1.invoke(OperationTrackingObjectCreator.java:45)
> at
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:68)
>  at
> org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
> at
> org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:941)
>  at
> org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator.createObject(OperationTrackingObjectCreator.java:49)
> at
> org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.obtainObjectFromCreator(JustInTimeObjectCreator.java:68)
>  ... 92 more
> Caused by: java.lang.RuntimeException: Exception constructing service
> 'AssetObjectProvider': Construction of service 'AssetObjectProvider' has
> failed due to recursion: the service depends on itself in some way. Please
> check
> org.apache.tapestry5.internal.services.AssetObjectProvider(AssetSource,
> TypeCoercer, SymbolSource) (at AssetObjectProvider.java:45) via
> org.apache.tapestry5.services.TapestryModule.bind(ServiceBinder) (at
> TapestryModule.java:251) for references to another service that is itself
> dependent on service 'AssetObjectProvider'.
>  at
> org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.obtainObjectFromCreator(JustInTimeObjectCreator.java:78)
> at
> org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.createObject(JustInTimeObjectCreator.java:57)
>  at $ObjectProvider_1272dd85a94.delegate($ObjectProvider_1272dd85a94.java)
> at $ObjectProvider_1272dd85a94.provide($ObjectProvider_1272dd85a94.java)
>  at
> org.apache.tapestry5.ioc.internal.services.MasterObjectProviderImpl$1.invoke(MasterObjectProviderImpl.java:48)
> at
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:68)
>  at
> org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
> at
> org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:941)
>  at
> org.apache.tapestry5.ioc.internal.services.MasterObjectProviderImpl.provide(MasterObjectProviderImpl.java:41)
> at
> $MasterObjectProvider_1272dd85a92.provide($MasterObjectProvider_1272dd85a92.java)
>  at
> org.apache.tapestry5.ioc.internal.RegistryImpl.getObject(RegistryImpl.java:696)
> at
> org.apache.tapestry5.ioc.internal.ObjectLocatorImpl.getObject(ObjectLocatorImpl.java:49)
>  at
> org.apache.tapestry5.ioc.internal.util.InternalUtils.calculateInjection(InternalUtils.java:209)
> at
> org.apache.tapestry5.ioc.internal.util.InternalUtils.access$000(InternalUtils.java:43)
>  at
> org.apache.tapestry5.ioc.internal.util.InternalUtils$2.invoke(InternalUtils.java:256)
> at
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:68)
>  at
> org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
> at
> org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:941)
>  at
> org.apache.tapestry5.ioc.internal.util.InternalUtils.calculateParameters(InternalUtils.java:260)
> at
> org.apache.tapestry5.ioc.internal.util.InternalUtils.calculateParametersForMethod(InternalUtils.java:217)
>  at
> org.apache.tapestry5.ioc.internal.AbstractMethodInvokingInstrumenter.invoke(AbstractMethodInvokingInstrumenter.java:96)
> ... 109 more
> Caused by: org.apache.tapestry5.ioc.internal.OperationException:
> Construction of service 'AssetObjectProvider' has failed due to recursion:
> the service depends on itself in some way. Please check
> org.apache.tapestry5.internal.services.AssetObjectProvider(AssetSource,
> TypeCoercer, SymbolSource) (at AssetObjectProvider.java:45) via
> org.apache.tapestry5.services.TapestryModule.bind(ServiceBinder) (at
> TapestryModule.java:251) for references to another service that is itself
> dependent on service 'AssetObjectProvider'.
>  at
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:90)
> at
> org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
>  at
> org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:941)
> at
> org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator.createObject(OperationTrackingObjectCreator.java:49)
>  at
> org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.obtainObjectFromCreator(JustInTimeObjectCreator.java:68)
> ... 129 more
> Caused by: java.lang.IllegalStateException: Construction of service
> 'AssetObjectProvider' has failed due to recursion: the service depends on
> itself in some way. Please check
> org.apache.tapestry5.internal.services.AssetObjectProvider(AssetSource,
> TypeCoercer, SymbolSource) (at AssetObjectProvider.java:45) via
> org.apache.tapestry5.services.TapestryModule.bind(ServiceBinder) (at
> TapestryModule.java:251) for references to another service that is itself
> dependent on service 'AssetObjectProvider'.
>  at
> org.apache.tapestry5.ioc.internal.RecursiveServiceCreationCheckWrapper.createObject(RecursiveServiceCreationCheckWrapper.java:52)
> at
> org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator$1.invoke(OperationTrackingObjectCreator.java:45)
>  at
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:68)
> ... 133 more
>

Reply via email to