I'm trying to add Togglz to my application without any luck so far. My application is deployed as an ear. The ear contains an ejb jar and a war-file. I would like to have the war and ejb-jar code share the same toggle configuration. To accomplish this I've followed the instructions at
http://www.togglz.org/documentation/advanced-config.html but without luck. When starting the application and pointing a browser to the console web application i get the following error:
16:05:42,279 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/caretrack].[TogglzConsoleServlet]] (http-/0.0.0.0:8080-3) JBWEB000236: Servlet.service() for servlet TogglzConsoleServlet threw exception: java.util.ServiceConfigurationError: org.togglz.core.spi.FeatureManagerProvider: Provider com.wirelesscar.vce.featuretoggling.EJBSingletonFeatureManagerProvider not a subtype
at java.util.ServiceLoader.fail(ServiceLoader.java:239) [jrebel-bootstrap-eea8bd346bc230e213a9a0575f4c9a73.jar:1.8.0_66]
at java.util.ServiceLoader.access$300(ServiceLoader.java:185) [jrebel-bootstrap-eea8bd346bc230e213a9a0575f4c9a73.jar:1.8.0_66]
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:376) [jrebel-bootstrap-eea8bd346bc230e213a9a0575f4c9a73.jar:1.8.0_66]
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404) [jrebel-bootstrap-eea8bd346bc230e213a9a0575f4c9a73.jar:1.8.0_66]
at java.util.ServiceLoader$1.next(ServiceLoader.java:480) [jrebel-bootstrap-eea8bd346bc230e213a9a0575f4c9a73.jar:1.8.0_66]
at org.togglz.core.context.FeatureContext.getFeatureManagerOrNull(FeatureContext.java:83) [togglz-core-2.2.0.Final.jar:]
at org.togglz.core.context.FeatureContext.getFeatureManager(FeatureContext.java:43) [togglz-core-2.2.0.Final.jar:]
at org.togglz.core.manager.LazyResolvingFeatureManager.getDelegate(LazyResolvingFeatureManager.java:24) [togglz-core-2.2.0.Final.jar:]
at org.togglz.core.manager.LazyResolvingFeatureManager.getCurrentFeatureUser(LazyResolvingFeatureManager.java:49) [togglz-core-2.2.0.Final.jar:]
at org.togglz.console.TogglzConsoleServlet.isFeatureAdmin(TogglzConsoleServlet.java:68) [togglz-console-2.2.0.Final.jar:]
at org.togglz.console.TogglzConsoleServlet.service(TogglzConsoleServlet.java:55) [togglz-console-2.2.0.Final.jar:]
com.wirelesscar.vce.featuretoggling.EJBSingletonFeatureManagerProvider is my FeatureManagerProvider implementation implementing the org.togglz.core.spi.FeatureManagerProvider interface. I'm running this in JBoss EAP 6.4, my war depends on togglz-console, the ejb-jar depends on togglz-core and togglz-cdi all with version 2.2.0.Final
I have a file named org.togglz.core.spi.FeatureManagerProvider in META-INF/services of my ejb-jar. It contains the full name of my FeatureManagerProvider: com.wirelesscar.vce.featuretoggling.EJBSingletonFeatureManagerProvider
I realize that I'm probably doing some stupid mistake but I just can't find it! :-)