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 Sep 23, 2013, at 5:04 PM, Stuart McCulloch <mcculls@xxxxxxxxx> wrote:

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

I can't navigate to the source file specified by the debugger. Isn't that wrong?


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).


I'm working with a system that has modules that turns on explicit bindings. I don't have any choice here, but I assume that Sisu would contribute everything necessary to the binder. Can't all bindings be satisfied from within Sisu?

I added the suggested bindings and now I have the following:


TypeConverterMap doesn't appear visible for me to bind.

Thanks,

Jason

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

_______________________________________________
sisu-users mailing list
sisu-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/sisu-users

Thanks,

Jason

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








Back to the top