if you use constructor injection you have to qualify the ClassFactory
with either the full service id or a annotation (marker) it is associated 
with. this applies equally to builder or contribute methods in your 
module.

this is true for any service interface that has multiple implementations
in the registry. 

eg with annotation:

public Foo(@Builtin ClassFactory classFactory, Logger logger){}


or maybe you just have to ensure your jars on the classpath have 
the right version :)


g,
kris




Britske <[EMAIL PROTECTED]> 
19.05.2008 18:56
Bitte antworten an
"Tapestry users" <users@tapestry.apache.org>


An
users@tapestry.apache.org
Kopie

Thema
Re: getting ClassFactory is matched by 2 services After upgrade from 5.06 
-> 5.0.11








I do not quite understand where to put the annotation. I haven't got any 
code
where I'm referencing a classloader explicitly. I must be something 
missing
here?..



Howard Lewis Ship wrote:
> 
> Add the injection point (i.e., the constructor parameter) add either
> the @Builtin or the @ComponentLayer annotation.  This marker
> annotation will select the correct implementation:  either the general
> ClassFactory (used by the IoC container) or the one used when working
> with component code.  You probably want @Builtin.
> 
> On Sun, May 18, 2008 at 6:40 AM, Britske <[EMAIL PROTECTED]> wrote:
>>
>> After upgrading tapestry from 5.0.6  to 5.0.11 I'm getting the 
following
>> error:
>>
>> Caused by: java.lang.RuntimeException: Service interface
>> org.apache.tapestry.ioc.services.ClassFactory is matched by 2 services:
>> ClassFactory, ComponentClassFactory.  Automatic dependency resolution
>> requires that exactly one service implement the interface.
>>
>> I'm getting the error (I think), I'm just not sure where to look to
>> change
>> it. For instance, I have nothing defined in my AppModule that could be
>> the
>> cause.
>>
>> Anyone?
>>
>> Thanks,
>> Britske
>> --
>> View this message in context:
>> 
http://www.nabble.com/getting-ClassFactory-is-matched-by-2-services-After-upgrade-from-5.06--%3E-5.0.11-tp17303089p17303089.html

>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/getting-ClassFactory-is-matched-by-2-services-After-upgrade-from-5.06--%3E-5.0.11-tp17303089p17323208.html

Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Reply via email to