did you add SchoolModule to the injector?

Guice.createInjector(new SchoolModule());

On Sat, Jun 19, 2010 at 7:52 PM, pbartosz <[email protected]> wrote:

> I'm trying to use Google Guice.
> In a simple code i get an error:
>
> No implementation for pl.edu.agh.logger.IMessageSerializer was bound.
>  while locating pl.edu.agh.logger.IMessageSerializer
>    for parameter 0 at pl.edu.agh.logger.Logger.<init>(Logger.java:26)
>  while locating pl.edu.agh.logger.Logger
>
> What is it caused by?
>
> public class Logger {
> ...
>  @Inject
>  public Logger(IMessageSerializer messageSerializer) {
>    registeredSerializers = new HashSet<IMessageSerializer>();
>    registeredSerializers.add(messageSerializer);
>    dateFormat = new SimpleDateFormat("yyyy.MM.dd HH:mm:ss");
>  }
> ...
> }
>
> public class SchoolModule extends AbstractModule{
>  @Override
>  protected void configure(){
>    bind(IMessageSerializer.class).to(FileMessageSerializer.class);
>  }
> }
>
> --
> You received this message because you are subscribed to the Google Groups
> "google-guice" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-guice%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-guice?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-guice?hl=en.

Reply via email to