• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Guice configuration error: No implementation was bound
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Guice configuration error: No implementation was bound


  • Subject: Guice configuration error: No implementation was bound
  • From: Raymond NANEON <email@hidden>
  • Date: Tue, 23 Jul 2013 14:42:47 +0000 (GMT)

Hi List,

I try to use WOInject and Guice in my Apps and FWK but they cause a fail. Alexis gave me an example how to do but I don't understand the module I create is not added, the interface's injection create an Exception.

My FWK module code

public class RfcctModule extends AbstractModule {

    /* (non-Javadoc)
     * @see com.google.inject.AbstractModule#configure()
     */
    @Override
    protected void configure() {
        // TODO Auto-generated method stub
        bind(RechercheCompetenceService.class).to(RechercheCompetenceServiceImpl.class);
    }

}

FwkUttCompetences class

public class FwkUttCompetences extends ERXFrameworkPrincipal {
   
    static {
        setUpFrameworkPrincipalClass(FwkUttCompetences.class);
    }

    /* (non-Javadoc)
     * @see er.extensions.ERXFrameworkPrincipal#finishInitialization()
     */
    @Override
    public void finishInitialization() {
        // TODO Auto-generated method stub
        ModuleRegister moduleRegister = CktlWebApplication.application().getModuleRegister();
        moduleRegister.addModule(new RfcctModule());

    }

injection interface implementation

public class Accueil extends BaseComponent {
...
@Inject
    private RechercheCompetenceService rechercheCompetenceService;
//EXCEPTION

}

Exception :

juil. 23 16:35:03 RFcct[8485] ERROR com.webobjects.foundation.InstantiationInterceptor  - The instantiation of org.utt.rfcct.serveur.components.Accueil class has failed.
CreationException: Guice creation errors:
1) No implementation for org.utt.fwkuttcompetences.serveur.modele.rfcct.service.recherche.RechercheCompetenceService was bound.
  while locating org.utt.fwkuttcompetences.serveur.modele.rfcct.service.recherche.RechercheCompetenceService
    for field at org.utt.rfcct.serveur.components.Accueil.rechercheCompetenceService(Accueil.java:80)
  at org.utt.rfcct.serveur.components.Accueil.class(Accueil.java:80)
1 error
  at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:435)
  at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:154)
  at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:106)
  at com.google.inject.internal.InjectorImpl.createChildInjector(InjectorImpl.java:217)
  at com.google.inject.internal.InjectorImpl.createChildInjector(InjectorImpl.java:224)

I put a breakpoint in at the finishInitialization method of the FwkUttCompetences.Class but The Debug mode never break there. I think the FwkUttCompetences.Class is never read and I don't know why.

Thanks a lot for help.
Envoyé depuis iCloud
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Guice configuration error: No implementation was bound
      • From: Alexis Tual <email@hidden>
  • Prev by Date: Re: mysql access exception after a long time
  • Next by Date: Re: WOWODC 2013 presentations
  • Previous by thread: Re: Apple developer site hacked, looks like Java data structures being involved
  • Next by thread: Re: Guice configuration error: No implementation was bound
  • Index(es):
    • Date
    • Thread