Another "No FeatureManagerProvider returned a FeatureManager" issue.

245 views
Skip to first unread message

Jem Mawson

unread,
Feb 28, 2013, 10:56:03 PM2/28/13
to togglz...@googlegroups.com
Hi

I am running a spring-enabled war in Jetty. It contains the jars:

$ jar tvf my.war | grep togglz
 46878 Wed Feb 27 16:44:00 EST 2013 WEB-INF/lib/togglz-core-1.1.0.Final.jar
  8476 Wed Feb 27 16:43:58 EST 2013 WEB-INF/lib/togglz-servlet-1.1.0.Final.jar
  5534 Wed Feb 27 16:43:58 EST 2013 WEB-INF/lib/togglz-spring-1.1.0.Final.jar

The sources contains a TogglzConfig @Component. It looks like:

@Component
public class FeatureTogglesConfig implements TogglzConfig {

    @Override
    public StateRepository getStateRepository() {
        return new InMemoryStateRepository();
    }

    @Override
    public Class<? extends Feature> getFeatureClass() {
        return Features.class;
    }

    @Override
    public UserProvider getUserProvider() {
        return new NoOpUserProvider();
    }
}


At runtime I get the exception:

java.lang.IllegalStateException: No FeatureManagerProvider returned a FeatureManager
       at org.togglz.core.context.FeatureContext.getFeatureManager(FeatureContext.java:95)
       at ari.dnrs.registry.configuration.Features.isActive(Features.java:14)

I did not change my web.xml as I am running in a modern servlet container.

Where do I look next?

Jem

Christian Kaltepoth

unread,
Mar 1, 2013, 12:57:00 AM3/1/13
to togglz...@googlegroups.com
Hey Jem,

I recently also ran into problems with Jetty. In my case the annotation scanning of Spring didn't work correctly at all. Because of that the Spring container didn't know about the TogglzConfig class and therefore the Togglz Spring module didn't find it. So you could try to register the TogglzConfig instance manually in applicationContext.xml and check if this helps.

Have a look at this demo app I built. It also uses Spring and works fine on Jetty. 


I hope this helps. :)

Christian


2013/3/1 Jem Mawson <jem.m...@gmail.com>

Jem

--
 
---
You received this message because you are subscribed to the Google Groups "togglz-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to togglz-users...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Christian Kaltepoth

Reply all
Reply to author
Forward
0 new messages