Hi Raymond, have you set the principal class in your build.properties : principalClass=my.package. FwkUttCompetences
? 2013/7/23 Raymond NANEON <rnan...@me.com> > 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 (Webobjects-dev@lists.apple.com) > Help/Unsubscribe/Update your Subscription: > > https://lists.apple.com/mailman/options/webobjects-dev/alexis.tual%40gmail.com > > This email sent to alexis.t...@gmail.com >
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com