Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sisu-users] Strange error while debugging Sisu

On 24 Sep 2013, at 00:37, Jason van Zyl wrote:

I'm debugging a server using Sisu. I have some errors that I need to resolve but while doing so I have the following errors:


The debugger is referring to BeanProviders.java but that class does not exist in the M5 jar? Seems to be in master but not in the M5 jar.

Something go wrong with the packaging of the release?

No this has always been the case, BeansProvider.java contains a number of small closely-related non-public classes that are all providers of beans

The error message suggests that you've somehow turned on explicit bindings - this disables implicit bindings such as @ImplementedBy, so you need to add explicit bindings to replace them such as:

bind( BeanLocator.class ).to( MutableBeanLocator.class );
bind( MutableBeanLocator.class ).to( DefaultBeanLocator.class );
bind( RankingFunction.class ).to( DefaultRankingFunction.class );

You also need to add explicit bindings for any concrete instances you inject (such as @Inject MyConcreteImpl) since those are not implicitly available when binder.requireExplicitBindings() is selected:

bind( DefaultBeanLocator.class ).toInstance( mySharedLocator ); // if you're using a shared instance, otherwise just bind( DefaultBeanLocator.class );
bind( DefaultRankingFunction.class );
bind( TypeConverterMap.class );
...etc...

There's also an error message about already configured bindings which suggests that you're not wrapping everything inside a WireModule (or ChildWireModule if you're using child injectors).

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
http://twitter.com/jvanzyl
---------------------------------------------------------


Back to the top