ComponentDefinitionException: Error when instantiating bean provider of class org.opendaylight.aaa.impl.AAAShiroProvider


Michael Vorburger <vorburger@...>
 

+ aaa-dev & skitt:

I've never seen this issue; I think you should open a JIRA about this, to track it.

If I had to guess, I would think what is happening here must be related to some refresh issue.. probably AAA get restarted when you do the 2nd feature installed, you could double check with feature:install -v.

But it look like it's not restartable, it's not happy - and that "Caused by: net.sf.ehcache.ObjectExistsException: Cache tokens already exist" error line is the interesting one; probably something is already in the cache from the previous start, and did not get removed on bundle stop, and so code is not expecting it to already be there - kind of thing? (This is pure guess work; I'm not familiar with AAA.)

The first question to decide here is: Do we want it to not restart, or do we want to make it cleanly restartable? I think the solution is the former (it should not restart; that's a mess).

You may (likely) be able to work around the problem using --no-auto-refresh in feature install.

https://jira.opendaylight.org/browse/CONTROLLER-1764 has problem which may be related. Stephen recently something related to that, but that's not in master yet. Perhaps that will fix this problem as well, when it's available.

Tx,
M.
--
Michael Vorburger, Red Hat
vorburger@... | IRC: vorburger @freenode | ~ = http://vorburger.ch


On Wed, Dec 13, 2017 at 11:13 AM, VIJI J <viji.j@...> wrote:

Hi,

 

Providing karaf logs and bundle:diag for the issue.

 

opendaylight-user@root> feature:install odl-netvirt-openstack

opendaylight-user@root>

opendaylight-user@root>list | grep aaa

175 | Active   |  80 | 0.7.0.SNAPSHOT                      | ODL :: aaa :: aaa-authn-api

176 | Active   |  80 | 0.7.0.SNAPSHOT                      | ODL :: aaa :: aaa-cert

177 | Active   |  80 | 0.7.0.SNAPSHOT                      | ODL :: aaa :: aaa-encrypt-service

178 | Active   |  80 | 0.7.0.SNAPSHOT                      | org.opendaylight.aaa.aaa-filterchain

179 | Active   |  80 | 0.7.0.SNAPSHOT                      | org.opendaylight.aaa.aaa-shiro

180 | Active   |  80 | 0.7.0.SNAPSHOT                      | aaa-shiro-act

181 | Active   |  80 | 0.7.0.SNAPSHOT                      | ODL :: aaa :: aaa-shiro-api

opendaylight-user@root>

opendaylight-user@root>feature:install odl-mdsal-apidocs

opendaylight-user@root>

opendaylight-user@root>list | grep aaa

175 | Active      |  80 | 0.7.0.SNAPSHOT                      | ODL :: aaa :: aaa-authn-api

176 | Active      |  80 | 0.7.0.SNAPSHOT                      | ODL :: aaa :: aaa-cert

177 | Active      |  80 | 0.7.0.SNAPSHOT                      | ODL :: aaa :: aaa-encrypt-service

178 | Active      |  80 | 0.7.0.SNAPSHOT                      | org.opendaylight.aaa.aaa-filterchain

179 | Failure     |  80 | 0.7.0.SNAPSHOT                      | org.opendaylight.aaa.aaa-shiro

180 | Active      |  80 | 0.7.0.SNAPSHOT                      | aaa-shiro-act

181 | Active      |  80 | 0.7.0.SNAPSHOT                      | ODL :: aaa :: aaa-shiro-api

opendaylight-user@root>

opendaylight-user@root>

opendaylight-user@root>bundle:diag 179

org.opendaylight.aaa.aaa-shiro (179)

------------------------------------

Status: Failure

Blueprint

12/13/17 3:39 PM

Exception:

Error when instantiating bean provider of class org.opendaylight.aaa.impl.AAAShiroProvider

org.osgi.service.blueprint.container.ComponentDefinitionException: Error when instantiating bean provider of class org.opendaylight.aaa.impl.AAAShiroProvider

        at org.apache.aries.blueprint.container.BeanRecipe.wrapAsCompDefEx(BeanRecipe.java:361)

       at org.apache.aries.blueprint.container.BeanRecipe.getInstanceFromStaticFactory(BeanRecipe.java:331)

        at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:280)

        at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:830)

        at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:811)

        at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)

        at java.util.concurrent.FutureTask.run(FutureTask.java:266)

        at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)

        at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:255)

        at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:186)

        at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:724)

        at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:411)

        at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:276)

        at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:300)

        at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:269)

        at org.apache.aries.blueprint.container.BlueprintExtender.access$900(BlueprintExtender.java:68)

        at org.apache.aries.blueprint.container.BlueprintExtender$BlueprintContainerServiceImpl.createContainer(BlueprintExtender.java:602)

        at org.opendaylight.controller.blueprint.BlueprintBundleTracker.modifiedBundle(BlueprintBundleTracker.java:220)

        at org.opendaylight.controller.blueprint.BlueprintBundleTracker.addingBundle(BlueprintBundleTracker.java:201)

        at org.opendaylight.controller.blueprint.BlueprintBundleTracker.addingBundle(BlueprintBundleTracker.java:52)

        at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:469)

        at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:415)

        at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)

        at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)

        at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444)

        at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:902)

        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)

        at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)

        at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:165)

        at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:75)

        at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:67)

        at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:102)

        at org.eclipse.osgi.container.Module.publishEvent(Module.java:466)

        at org.eclipse.osgi.container.Module.start(Module.java:457)

        at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:454)

        at org.eclipse.osgi.container.ModuleContainer.applyDelta(ModuleContainer.java:717)

        at org.eclipse.osgi.container.ModuleContainer.resolveAndApply(ModuleContainer.java:491)

        at org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.java:437)

        at org.eclipse.osgi.container.ModuleContainer.refresh(ModuleContainer.java:955)

        at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1336)

        at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1)

        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)

        at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)

Caused by: net.sf.ehcache.ObjectExistsException: Cache tokens already exists

        at net.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java:1391)

        at net.sf.ehcache.CacheManager.addCache(CacheManager.java:1275)

        at net.sf.ehcache.CacheManager.addCache(CacheManager.java:1244)

        at org.opendaylight.aaa.impl.datastore.h2.H2TokenStore.<init>(H2TokenStore.java:36)

        at org.opendaylight.aaa.impl.AAAShiroProvider.<init>(AAAShiroProvider.java:89)

        at org.opendaylight.aaa.impl.AAAShiroProvider.newInstance(AAAShiroProvider.java:172)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:498)

        at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:299)

        at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:980)

        at org.apache.aries.blueprint.container.BeanRecipe.getInstanceFromStaticFactory(BeanRecipe.java:329)

        ... 41 more

 

Thanks,

Viji J

 

 

From: Faseela K
Sent: Wednesday, December 13, 2017 11:28 AM
To: Ryan Goulding <ryandgoulding@...>
Cc: netconf-dev@lists.opendaylight.org; VIJI J <viji.j@...>; Rajarajan M <rajarajan.m@...>; Michael Vorburger <vorburger@...>
Subject: RE: ComponentDefinitionException: Error when instantiating bean provider of class org.opendaylight.aaa.impl.AAAShiroProvider

 

+Viji, Raja, and Michael

 

From: Faseela K
Sent: Wednesday, December 13, 2017 12:55 AM
To: 'Ryan Goulding' <ryandgoulding@...>
Cc: 'netconf-dev@lists.opendaylight.org' <netconf-dev@lists.opendaylight.org>
Subject: ComponentDefinitionException: Error when instantiating bean provider of class org.opendaylight.aaa.impl.AAAShiroProvider

 

Hi,

  Whenever I have two features, both of which has odl-restconf dependency, aaa does not come up properl.

  I do see the below error I logs, I feel there is something wrong with the bundle refresh? Any pointers? Any one else hitting this issue?

 

  2017-12-11 23:26:20,182 | ERROR | ffc-ac0e2b6783b3 | BlueprintContainerImpl           | 13 - org.apache.aries.blueprint.core - 1.7.1 | Unable to start blueprint container for bundle org.opendaylight.aaa.shiro/0.7.0.SNAPSHOT

org.osgi.service.blueprint.container.ComponentDefinitionException: Error when instantiating bean provider of class org.opendaylight.aaa.impl.AAAShiroProvider

        at org.apache.aries.blueprint.container.BeanRecipe.wrapAsCompDefEx(BeanRecipe.java:361)[13:org.apache.aries.blueprint.core:1.7.1]

        at org.apache.aries.blueprint.container.BeanRecipe.getInstanceFromStaticFactory(BeanRecipe.java:331)[13:org.apache.aries.blueprint.core:1.7.1]

        at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:280)[13:org.apache.aries.blueprint.core:1.7.1]

        at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:830)[13:org.apache.aries.blueprint.core:1.7.1]

        at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:811)[13:org.apache.aries.blueprint.core:1.7.1]

        at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[13:org.apache.aries.blueprint.core:1.7.1]

        at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_92]

        at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[13:org.apache.aries.blueprint.core:1.7.1]

        at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:255)[13:org.apache.aries.blueprint.core:1.7.1]

        at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:186)[13:org.apache.aries.blueprint.core:1.7.1]

        at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:724)[13:org.apache.aries.blueprint.core:1.7.1]

        at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:411)[13:org.apache.aries.blueprint.core:1.7.1]

        at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:276)[13:org.apache.aries.blueprint.core:1.7.1]

        at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:300)[13:org.apache.aries.blueprint.core:1.7.1]

        at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:269)[13:org.apache.aries.blueprint.core:1.7.1]

        at org.apache.aries.blueprint.container.BlueprintExtender.access$900(BlueprintExtender.java:68)[13:org.apache.aries.blueprint.core:1.7.1]

        at org.apache.aries.blueprint.container.BlueprintExtender$BlueprintContainerServiceImpl.createContainer(BlueprintExtender.java:602)[13:org.apache.aries.blueprint.core:1.7.1]

        at org.opendaylight.controller.blueprint.BlueprintBundleTracker.modifiedBundle(BlueprintBundleTracker.java:220)[183:org.opendaylight.controller.blueprint:0.8.0.SNAPSHOT]

        at org.opendaylight.controller.blueprint.BlueprintBundleTracker.addingBundle(BlueprintBundleTracker.java:201)[183:org.opendaylight.controller.blueprint:0.8.0.SNAPSHOT]

        at org.opendaylight.controller.blueprint.BlueprintBundleTracker.addingBundle(BlueprintBundleTracker.java:52)[183:org.opendaylight.controller.blueprint:0.8.0.SNAPSHOT]

        at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:469)[org.osgi.core-6.0.0.jar:]

        at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:415)[org.osgi.core-6.0.0.jar:]

        at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)[org.osgi.core-6.0.0.jar:]

        at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)[org.osgi.core-6.0.0.jar:]

        at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444)[org.osgi.core-6.0.0.jar:]

        at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:902)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

        at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

        at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:165)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

        at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:75)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

        at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:67)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

        at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:102)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

        at org.eclipse.osgi.container.Module.publishEvent(Module.java:466)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

        at org.eclipse.osgi.container.Module.start(Module.java:457)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

        at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:454)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

        at org.eclipse.osgi.container.ModuleContainer.applyDelta(ModuleContainer.java:717)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

        at org.eclipse.osgi.container.ModuleContainer.resolveAndApply(ModuleContainer.java:491)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

        at org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.java:437)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

 

Thanks,

Faseela

 



Luis Gomez
 

How are the features being installed? I am asking because since karaf 4 we do not support successive feature installation from karaf console as this can cause bundle restart and that is something most projects in ODL cannot handle today. I am not sure there is a release note for this but the workaround is to either: 1) use --no-auto-refresh in the consecutive feature install command as Michael points out, 2) list all the features you need in the karaf config boot file or 3) install all features at once in console, for example:

feature:install odl-restconf odl-netconf-mdsal odl-mdsal-apidocs odl-clustering-test-app odl-netconf-topology

BR/Luis

On Dec 13, 2017, at 2:27 AM, Michael Vorburger <vorburger@...> wrote:

+ aaa-dev & skitt:

I've never seen this issue; I think you should open a JIRA about this, to track it.

If I had to guess, I would think what is happening here must be related to some refresh issue.. probably AAA get restarted when you do the 2nd feature installed, you could double check with feature:install -v.

But it look like it's not restartable, it's not happy - and that "Caused by: net.sf.ehcache.ObjectExistsException: Cache tokens already exist" error line is the interesting one; probably something is already in the cache from the previous start, and did not get removed on bundle stop, and so code is not expecting it to already be there - kind of thing? (This is pure guess work; I'm not familiar with AAA.)

The first question to decide here is: Do we want it to not restart, or do we want to make it cleanly restartable? I think the solution is the former (it should not restart; that's a mess).

You may (likely) be able to work around the problem using --no-auto-refresh in feature install.

https://jira.opendaylight.org/browse/CONTROLLER-1764 has problem which may be related. Stephen recently something related to that, but that's not in master yet. Perhaps that will fix this problem as well, when it's available.

Tx,
M.
--
Michael Vorburger, Red Hat
vorburger@... | IRC: vorburger @freenode | ~ = http://vorburger.ch


On Wed, Dec 13, 2017 at 11:13 AM, VIJI J <viji.j@...> wrote:
Hi,



Providing karaf logs and bundle:diag for the issue.



opendaylight-user@root> feature:install odl-netvirt-openstack

opendaylight-user@root>

opendaylight-user@root>list | grep aaa

175 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-authn-api

176 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-cert

177 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-encrypt-service

178 | Active | 80 | 0.7.0.SNAPSHOT | org.opendaylight.aaa.aaa-filterchain

179 | Active | 80 | 0.7.0.SNAPSHOT | org.opendaylight.aaa.aaa-shiro

180 | Active | 80 | 0.7.0.SNAPSHOT | aaa-shiro-act

181 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-shiro-api

opendaylight-user@root>

opendaylight-user@root>feature:install odl-mdsal-apidocs

opendaylight-user@root>

opendaylight-user@root>list | grep aaa

175 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-authn-api

176 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-cert

177 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-encrypt-service

178 | Active | 80 | 0.7.0.SNAPSHOT | org.opendaylight.aaa.aaa-filterchain

179 | Failure | 80 | 0.7.0.SNAPSHOT | org.opendaylight.aaa.aaa-shiro

180 | Active | 80 | 0.7.0.SNAPSHOT | aaa-shiro-act

181 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-shiro-api

opendaylight-user@root>

opendaylight-user@root>

opendaylight-user@root>bundle:diag 179

org.opendaylight.aaa.aaa-shiro (179)

------------------------------------

Status: Failure

Blueprint

12/13/17 3:39 PM

Exception:

Error when instantiating bean provider of class org.opendaylight.aaa.impl.AAAShiroProvider

org.osgi.service.blueprint.container.ComponentDefinitionException: Error when instantiating bean provider of class org.opendaylight.aaa.impl.AAAShiroProvider

at org.apache.aries.blueprint.container.BeanRecipe.wrapAsCompDefEx(BeanRecipe.java:361)

at org.apache.aries.blueprint.container.BeanRecipe.getInstanceFromStaticFactory(BeanRecipe.java:331)

at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:280)

at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:830)

at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:811)

at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)

at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:255)

at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:186)

at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:724)

at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:411)

at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:276)

at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:300)

at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:269)

at org.apache.aries.blueprint.container.BlueprintExtender.access$900(BlueprintExtender.java:68)

at org.apache.aries.blueprint.container.BlueprintExtender$BlueprintContainerServiceImpl.createContainer(BlueprintExtender.java:602)

at org.opendaylight.controller.blueprint.BlueprintBundleTracker.modifiedBundle(BlueprintBundleTracker.java:220)

at org.opendaylight.controller.blueprint.BlueprintBundleTracker.addingBundle(BlueprintBundleTracker.java:201)

at org.opendaylight.controller.blueprint.BlueprintBundleTracker.addingBundle(BlueprintBundleTracker.java:52)

at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:469)

at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:415)

at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)

at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)

at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444)

at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:902)

at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)

at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)

at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:165)

at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:75)

at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:67)

at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:102)

at org.eclipse.osgi.container.Module.publishEvent(Module.java:466)

at org.eclipse.osgi.container.Module.start(Module.java:457)

at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:454)

at org.eclipse.osgi.container.ModuleContainer.applyDelta(ModuleContainer.java:717)

at org.eclipse.osgi.container.ModuleContainer.resolveAndApply(ModuleContainer.java:491)

at org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.java:437)

at org.eclipse.osgi.container.ModuleContainer.refresh(ModuleContainer.java:955)

at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1336)

at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1)

at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)

at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)

Caused by: net.sf.ehcache.ObjectExistsException: Cache tokens already exists

at net.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java:1391)

at net.sf.ehcache.CacheManager.addCache(CacheManager.java:1275)

at net.sf.ehcache.CacheManager.addCache(CacheManager.java:1244)

at org.opendaylight.aaa.impl.datastore.h2.H2TokenStore.<init>(H2TokenStore.java:36)

at org.opendaylight.aaa.impl.AAAShiroProvider.<init>(AAAShiroProvider.java:89)

at org.opendaylight.aaa.impl.AAAShiroProvider.newInstance(AAAShiroProvider.java:172)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:299)

at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:980)

at org.apache.aries.blueprint.container.BeanRecipe.getInstanceFromStaticFactory(BeanRecipe.java:329)

... 41 more



Thanks,

Viji J





From: Faseela K
Sent: Wednesday, December 13, 2017 11:28 AM
To: Ryan Goulding <ryandgoulding@...>
Cc: netconf-dev@...; VIJI J <viji.j@...>; Rajarajan M <rajarajan.m@...>; Michael Vorburger <vorburger@...>
Subject: RE: ComponentDefinitionException: Error when instantiating bean provider of class org.opendaylight.aaa.impl.AAAShiroProvider



+Viji, Raja, and Michael



From: Faseela K
Sent: Wednesday, December 13, 2017 12:55 AM
To: 'Ryan Goulding' <ryandgoulding@...>
Cc: 'netconf-dev@...' <netconf-dev@...>
Subject: ComponentDefinitionException: Error when instantiating bean provider of class org.opendaylight.aaa.impl.AAAShiroProvider



Hi,

Whenever I have two features, both of which has odl-restconf dependency, aaa does not come up properl.

I do see the below error I logs, I feel there is something wrong with the bundle refresh? Any pointers? Any one else hitting this issue?



2017-12-11 23:26:20,182 | ERROR | ffc-ac0e2b6783b3 | BlueprintContainerImpl | 13 - org.apache.aries.blueprint.core - 1.7.1 | Unable to start blueprint container for bundle org.opendaylight.aaa.shiro/0.7.0.SNAPSHOT

org.osgi.service.blueprint.container.ComponentDefinitionException: Error when instantiating bean provider of class org.opendaylight.aaa.impl.AAAShiroProvider

at org.apache.aries.blueprint.container.BeanRecipe.wrapAsCompDefEx(BeanRecipe.java:361)[13:org.apache.aries.blueprint.core:1.7.1]

at org.apache.aries.blueprint.container.BeanRecipe.getInstanceFromStaticFactory(BeanRecipe.java:331)[13:org.apache.aries.blueprint.core:1.7.1]

at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:280)[13:org.apache.aries.blueprint.core:1.7.1]

at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:830)[13:org.apache.aries.blueprint.core:1.7.1]

at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:811)[13:org.apache.aries.blueprint.core:1.7.1]

at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[13:org.apache.aries.blueprint.core:1.7.1]

at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_92]

at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[13:org.apache.aries.blueprint.core:1.7.1]

at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:255)[13:org.apache.aries.blueprint.core:1.7.1]

at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:186)[13:org.apache.aries.blueprint.core:1.7.1]

at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:724)[13:org.apache.aries.blueprint.core:1.7.1]

at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:411)[13:org.apache.aries.blueprint.core:1.7.1]

at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:276)[13:org.apache.aries.blueprint.core:1.7.1]

at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:300)[13:org.apache.aries.blueprint.core:1.7.1]

at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:269)[13:org.apache.aries.blueprint.core:1.7.1]

at org.apache.aries.blueprint.container.BlueprintExtender.access$900(BlueprintExtender.java:68)[13:org.apache.aries.blueprint.core:1.7.1]

at org.apache.aries.blueprint.container.BlueprintExtender$BlueprintContainerServiceImpl.createContainer(BlueprintExtender.java:602)[13:org.apache.aries.blueprint.core:1.7.1]

at org.opendaylight.controller.blueprint.BlueprintBundleTracker.modifiedBundle(BlueprintBundleTracker.java:220)[183:org.opendaylight.controller.blueprint:0.8.0.SNAPSHOT]

at org.opendaylight.controller.blueprint.BlueprintBundleTracker.addingBundle(BlueprintBundleTracker.java:201)[183:org.opendaylight.controller.blueprint:0.8.0.SNAPSHOT]

at org.opendaylight.controller.blueprint.BlueprintBundleTracker.addingBundle(BlueprintBundleTracker.java:52)[183:org.opendaylight.controller.blueprint:0.8.0.SNAPSHOT]

at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:469)[org.osgi.core-6.0.0.jar:]

at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:415)[org.osgi.core-6.0.0.jar:]

at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)[org.osgi.core-6.0.0.jar:]

at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)[org.osgi.core-6.0.0.jar:]

at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444)[org.osgi.core-6.0.0.jar:]

at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:902)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:165)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:75)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:67)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:102)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at org.eclipse.osgi.container.Module.publishEvent(Module.java:466)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at org.eclipse.osgi.container.Module.start(Module.java:457)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:454)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at org.eclipse.osgi.container.ModuleContainer.applyDelta(ModuleContainer.java:717)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at org.eclipse.osgi.container.ModuleContainer.resolveAndApply(ModuleContainer.java:491)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.java:437)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]



Thanks,

Faseela




_______________________________________________
aaa-dev mailing list
aaa-dev@...
https://lists.opendaylight.org/mailman/listinfo/aaa-dev


Ryan Goulding <ryandgoulding@...>
 

Hi all,

Sorry for delay;  I am attending ONAP developer forum this week and thus splitting my time many ways.  That is likely because the token ehcache is already created;  please answer Luis's questions about how you are installing the feature so we can narrow down what is actually happening.

Regards,

Ryan Goulding

On Wed, Dec 13, 2017 at 6:05 PM, Luis Gomez <ecelgp@...> wrote:
How are the features being installed? I am asking because since karaf 4 we do not support successive feature installation from karaf console as this can cause bundle restart and that is something most projects in ODL cannot handle today. I am not sure there is a release note for this but the workaround is to either: 1) use --no-auto-refresh in the consecutive feature install command as Michael points out, 2) list all the features you need in the karaf config boot file or 3) install all features at once in console, for example:

feature:install odl-restconf odl-netconf-mdsal odl-mdsal-apidocs odl-clustering-test-app odl-netconf-topology

BR/Luis

> On Dec 13, 2017, at 2:27 AM, Michael Vorburger <vorburger@...> wrote:
>
> + aaa-dev & skitt:
>
> I've never seen this issue; I think you should open a JIRA about this, to track it.
>
> If I had to guess, I would think what is happening here must be related to some refresh issue.. probably AAA get restarted when you do the 2nd feature installed, you could double check with feature:install -v.
>
> But it look like it's not restartable, it's not happy - and that "Caused by: net.sf.ehcache.ObjectExistsException: Cache tokens already exist" error line is the interesting one; probably something is already in the cache from the previous start, and did not get removed on bundle stop, and so code is not expecting it to already be there - kind of thing? (This is pure guess work; I'm not familiar with AAA.)
>
> The first question to decide here is: Do we want it to not restart, or do we want to make it cleanly restartable? I think the solution is the former (it should not restart; that's a mess).
>
> You may (likely) be able to work around the problem using --no-auto-refresh in feature install.
>
> https://jira.opendaylight.org/browse/CONTROLLER-1764 has problem which may be related. Stephen recently something related to that, but that's not in master yet. Perhaps that will fix this problem as well, when it's available.
>
> Tx,
> M.
> --
> Michael Vorburger, Red Hat
> vorburger@... | IRC: vorburger @freenode | ~ = http://vorburger.ch
>
>
> On Wed, Dec 13, 2017 at 11:13 AM, VIJI J <viji.j@...> wrote:
> Hi,
>
>
>
> Providing karaf logs and bundle:diag for the issue.
>
>
>
> opendaylight-user@root> feature:install odl-netvirt-openstack
>
> opendaylight-user@root>
>
> opendaylight-user@root>list | grep aaa
>
> 175 | Active   |  80 | 0.7.0.SNAPSHOT                      | ODL :: aaa :: aaa-authn-api
>
> 176 | Active   |  80 | 0.7.0.SNAPSHOT                      | ODL :: aaa :: aaa-cert
>
> 177 | Active   |  80 | 0.7.0.SNAPSHOT                      | ODL :: aaa :: aaa-encrypt-service
>
> 178 | Active   |  80 | 0.7.0.SNAPSHOT                      | org.opendaylight.aaa.aaa-filterchain
>
> 179 | Active   |  80 | 0.7.0.SNAPSHOT                      | org.opendaylight.aaa.aaa-shiro
>
> 180 | Active   |  80 | 0.7.0.SNAPSHOT                      | aaa-shiro-act
>
> 181 | Active   |  80 | 0.7.0.SNAPSHOT                      | ODL :: aaa :: aaa-shiro-api
>
> opendaylight-user@root>
>
> opendaylight-user@root>feature:install odl-mdsal-apidocs
>
> opendaylight-user@root>
>
> opendaylight-user@root>list | grep aaa
>
> 175 | Active      |  80 | 0.7.0.SNAPSHOT                      | ODL :: aaa :: aaa-authn-api
>
> 176 | Active      |  80 | 0.7.0.SNAPSHOT                      | ODL :: aaa :: aaa-cert
>
> 177 | Active      |  80 | 0.7.0.SNAPSHOT                      | ODL :: aaa :: aaa-encrypt-service
>
> 178 | Active      |  80 | 0.7.0.SNAPSHOT                      | org.opendaylight.aaa.aaa-filterchain
>
> 179 | Failure     |  80 | 0.7.0.SNAPSHOT                      | org.opendaylight.aaa.aaa-shiro
>
> 180 | Active      |  80 | 0.7.0.SNAPSHOT                      | aaa-shiro-act
>
> 181 | Active      |  80 | 0.7.0.SNAPSHOT                      | ODL :: aaa :: aaa-shiro-api
>
> opendaylight-user@root>
>
> opendaylight-user@root>
>
> opendaylight-user@root>bundle:diag 179
>
> org.opendaylight.aaa.aaa-shiro (179)
>
> ------------------------------------
>
> Status: Failure
>
> Blueprint
>
> 12/13/17 3:39 PM
>
> Exception:
>
> Error when instantiating bean provider of class org.opendaylight.aaa.impl.AAAShiroProvider
>
> org.osgi.service.blueprint.container.ComponentDefinitionException: Error when instantiating bean provider of class org.opendaylight.aaa.impl.AAAShiroProvider
>
>         at org.apache.aries.blueprint.container.BeanRecipe.wrapAsCompDefEx(BeanRecipe.java:361)
>
>        at org.apache.aries.blueprint.container.BeanRecipe.getInstanceFromStaticFactory(BeanRecipe.java:331)
>
>         at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:280)
>
>         at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:830)
>
>         at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:811)
>
>         at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)
>
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>
>         at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)
>
>         at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:255)
>
>         at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:186)
>
>         at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:724)
>
>         at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:411)
>
>         at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:276)
>
>         at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:300)
>
>         at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:269)
>
>         at org.apache.aries.blueprint.container.BlueprintExtender.access$900(BlueprintExtender.java:68)
>
>         at org.apache.aries.blueprint.container.BlueprintExtender$BlueprintContainerServiceImpl.createContainer(BlueprintExtender.java:602)
>
>         at org.opendaylight.controller.blueprint.BlueprintBundleTracker.modifiedBundle(BlueprintBundleTracker.java:220)
>
>         at org.opendaylight.controller.blueprint.BlueprintBundleTracker.addingBundle(BlueprintBundleTracker.java:201)
>
>         at org.opendaylight.controller.blueprint.BlueprintBundleTracker.addingBundle(BlueprintBundleTracker.java:52)
>
>         at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:469)
>
>         at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:415)
>
>         at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
>
>         at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
>
>         at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444)
>
>         at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:902)
>
>         at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
>
>         at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
>
>         at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:165)
>
>         at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:75)
>
>         at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:67)
>
>         at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:102)
>
>         at org.eclipse.osgi.container.Module.publishEvent(Module.java:466)
>
>         at org.eclipse.osgi.container.Module.start(Module.java:457)
>
>         at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:454)
>
>         at org.eclipse.osgi.container.ModuleContainer.applyDelta(ModuleContainer.java:717)
>
>         at org.eclipse.osgi.container.ModuleContainer.resolveAndApply(ModuleContainer.java:491)
>
>         at org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.java:437)
>
>         at org.eclipse.osgi.container.ModuleContainer.refresh(ModuleContainer.java:955)
>
>         at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1336)
>
>         at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1)
>
>         at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
>
>         at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
>
> Caused by: net.sf.ehcache.ObjectExistsException: Cache tokens already exists
>
>         at net.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java:1391)
>
>         at net.sf.ehcache.CacheManager.addCache(CacheManager.java:1275)
>
>         at net.sf.ehcache.CacheManager.addCache(CacheManager.java:1244)
>
>         at org.opendaylight.aaa.impl.datastore.h2.H2TokenStore.<init>(H2TokenStore.java:36)
>
>         at org.opendaylight.aaa.impl.AAAShiroProvider.<init>(AAAShiroProvider.java:89)
>
>         at org.opendaylight.aaa.impl.AAAShiroProvider.newInstance(AAAShiroProvider.java:172)
>
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>
>         at java.lang.reflect.Method.invoke(Method.java:498)
>
>         at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:299)
>
>         at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:980)
>
>         at org.apache.aries.blueprint.container.BeanRecipe.getInstanceFromStaticFactory(BeanRecipe.java:329)
>
>         ... 41 more
>
>
>
> Thanks,
>
> Viji J
>
>
>
>
>
> From: Faseela K
> Sent: Wednesday, December 13, 2017 11:28 AM
> To: Ryan Goulding <ryandgoulding@...>
> Cc: netconf-dev@lists.opendaylight.org; VIJI J <viji.j@...>; Rajarajan M <rajarajan.m@...>; Michael Vorburger <vorburger@...>
> Subject: RE: ComponentDefinitionException: Error when instantiating bean provider of class org.opendaylight.aaa.impl.AAAShiroProvider
>
>
>
> +Viji, Raja, and Michael
>
>
>
> From: Faseela K
> Sent: Wednesday, December 13, 2017 12:55 AM
> To: 'Ryan Goulding' <ryandgoulding@...>
> Cc: 'netconf-dev@lists.opendaylight.org' <netconf-dev@lists.opendaylight.org>
> Subject: ComponentDefinitionException: Error when instantiating bean provider of class org.opendaylight.aaa.impl.AAAShiroProvider
>
>
>
> Hi,
>
>   Whenever I have two features, both of which has odl-restconf dependency, aaa does not come up properl.
>
>   I do see the below error I logs, I feel there is something wrong with the bundle refresh? Any pointers? Any one else hitting this issue?
>
>
>
>   2017-12-11 23:26:20,182 | ERROR | ffc-ac0e2b6783b3 | BlueprintContainerImpl           | 13 - org.apache.aries.blueprint.core - 1.7.1 | Unable to start blueprint container for bundle org.opendaylight.aaa.shiro/0.7.0.SNAPSHOT
>
> org.osgi.service.blueprint.container.ComponentDefinitionException: Error when instantiating bean provider of class org.opendaylight.aaa.impl.AAAShiroProvider
>
>         at org.apache.aries.blueprint.container.BeanRecipe.wrapAsCompDefEx(BeanRecipe.java:361)[13:org.apache.aries.blueprint.core:1.7.1]
>
>         at org.apache.aries.blueprint.container.BeanRecipe.getInstanceFromStaticFactory(BeanRecipe.java:331)[13:org.apache.aries.blueprint.core:1.7.1]
>
>         at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:280)[13:org.apache.aries.blueprint.core:1.7.1]
>
>         at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:830)[13:org.apache.aries.blueprint.core:1.7.1]
>
>         at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:811)[13:org.apache.aries.blueprint.core:1.7.1]
>
>         at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[13:org.apache.aries.blueprint.core:1.7.1]
>
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_92]
>
>         at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[13:org.apache.aries.blueprint.core:1.7.1]
>
>         at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:255)[13:org.apache.aries.blueprint.core:1.7.1]
>
>         at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:186)[13:org.apache.aries.blueprint.core:1.7.1]
>
>         at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:724)[13:org.apache.aries.blueprint.core:1.7.1]
>
>         at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:411)[13:org.apache.aries.blueprint.core:1.7.1]
>
>         at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:276)[13:org.apache.aries.blueprint.core:1.7.1]
>
>         at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:300)[13:org.apache.aries.blueprint.core:1.7.1]
>
>         at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:269)[13:org.apache.aries.blueprint.core:1.7.1]
>
>         at org.apache.aries.blueprint.container.BlueprintExtender.access$900(BlueprintExtender.java:68)[13:org.apache.aries.blueprint.core:1.7.1]
>
>         at org.apache.aries.blueprint.container.BlueprintExtender$BlueprintContainerServiceImpl.createContainer(BlueprintExtender.java:602)[13:org.apache.aries.blueprint.core:1.7.1]
>
>         at org.opendaylight.controller.blueprint.BlueprintBundleTracker.modifiedBundle(BlueprintBundleTracker.java:220)[183:org.opendaylight.controller.blueprint:0.8.0.SNAPSHOT]
>
>         at org.opendaylight.controller.blueprint.BlueprintBundleTracker.addingBundle(BlueprintBundleTracker.java:201)[183:org.opendaylight.controller.blueprint:0.8.0.SNAPSHOT]
>
>         at org.opendaylight.controller.blueprint.BlueprintBundleTracker.addingBundle(BlueprintBundleTracker.java:52)[183:org.opendaylight.controller.blueprint:0.8.0.SNAPSHOT]
>
>         at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:469)[org.osgi.core-6.0.0.jar:]
>
>         at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:415)[org.osgi.core-6.0.0.jar:]
>
>         at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)[org.osgi.core-6.0.0.jar:]
>
>         at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)[org.osgi.core-6.0.0.jar:]
>
>         at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444)[org.osgi.core-6.0.0.jar:]
>
>         at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:902)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
>
>         at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
>
>         at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
>
>         at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:165)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
>
>         at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:75)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
>
>         at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:67)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
>
>         at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:102)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
>
>         at org.eclipse.osgi.container.Module.publishEvent(Module.java:466)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
>
>         at org.eclipse.osgi.container.Module.start(Module.java:457)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
>
>         at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:454)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
>
>         at org.eclipse.osgi.container.ModuleContainer.applyDelta(ModuleContainer.java:717)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
>
>         at org.eclipse.osgi.container.ModuleContainer.resolveAndApply(ModuleContainer.java:491)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
>
>         at org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.java:437)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
>
>
>
> Thanks,
>
> Faseela
>
>
>
>
> _______________________________________________
> aaa-dev mailing list
> aaa-dev@...
> https://lists.opendaylight.org/mailman/listinfo/aaa-dev

_______________________________________________
aaa-dev mailing list
aaa-dev@...
https://lists.opendaylight.org/mailman/listinfo/aaa-dev


Rajarajan M <rajarajan.m@...>
 

Hi Luis,

I have installed features one by one.

Initially I installed "odl-netvirt-openstack" and later I have installed "odl-restconf-all". I observed this issue after 2nd feature("odl-restconf-all") getting installed.

Today I will try to install both feature in single line and update you the same.

Thanks & Regards,
RajaRajan M

-----Original Message-----
From: Luis Gomez [mailto:ecelgp@...]
Sent: Thursday, December 14, 2017 4:36 AM
To: Michael Vorburger <vorburger@...>
Cc: VIJI J <viji.j@...>; aaa-dev@...; Kitt, Stephen <skitt@...>; netconf-dev@...; Rajarajan M <rajarajan.m@...>; Faseela K <faseela.k@...>
Subject: Re: [Aaa-dev] ComponentDefinitionException: Error when instantiating bean provider of class org.opendaylight.aaa.impl.AAAShiroProvider

How are the features being installed? I am asking because since karaf 4 we do not support successive feature installation from karaf console as this can cause bundle restart and that is something most projects in ODL cannot handle today. I am not sure there is a release note for this but the workaround is to either: 1) use --no-auto-refresh in the consecutive feature install command as Michael points out, 2) list all the features you need in the karaf config boot file or 3) install all features at once in console, for example:

feature:install odl-restconf odl-netconf-mdsal odl-mdsal-apidocs odl-clustering-test-app odl-netconf-topology

BR/Luis

On Dec 13, 2017, at 2:27 AM, Michael Vorburger <vorburger@...> wrote:

+ aaa-dev & skitt:

I've never seen this issue; I think you should open a JIRA about this, to track it.

If I had to guess, I would think what is happening here must be related to some refresh issue.. probably AAA get restarted when you do the 2nd feature installed, you could double check with feature:install -v.

But it look like it's not restartable, it's not happy - and that "Caused by: net.sf.ehcache.ObjectExistsException: Cache tokens already exist" error line is the interesting one; probably something is already in the cache from the previous start, and did not get removed on bundle stop, and so code is not expecting it to already be there - kind of thing? (This is pure guess work; I'm not familiar with AAA.)

The first question to decide here is: Do we want it to not restart, or do we want to make it cleanly restartable? I think the solution is the former (it should not restart; that's a mess).

You may (likely) be able to work around the problem using --no-auto-refresh in feature install.

https://jira.opendaylight.org/browse/CONTROLLER-1764 has problem which may be related. Stephen recently something related to that, but that's not in master yet. Perhaps that will fix this problem as well, when it's available.

Tx,
M.
--
Michael Vorburger, Red Hat
vorburger@... | IRC: vorburger @freenode | ~ = http://vorburger.ch


On Wed, Dec 13, 2017 at 11:13 AM, VIJI J <viji.j@...> wrote:
Hi,



Providing karaf logs and bundle:diag for the issue.



opendaylight-user@root> feature:install odl-netvirt-openstack

opendaylight-user@root>

opendaylight-user@root>list | grep aaa

175 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-authn-api

176 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-cert

177 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-encrypt-service

178 | Active | 80 | 0.7.0.SNAPSHOT | org.opendaylight.aaa.aaa-filterchain

179 | Active | 80 | 0.7.0.SNAPSHOT | org.opendaylight.aaa.aaa-shiro

180 | Active | 80 | 0.7.0.SNAPSHOT | aaa-shiro-act

181 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-shiro-api

opendaylight-user@root>

opendaylight-user@root>feature:install odl-mdsal-apidocs

opendaylight-user@root>

opendaylight-user@root>list | grep aaa

175 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-authn-api

176 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-cert

177 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-encrypt-service

178 | Active | 80 | 0.7.0.SNAPSHOT | org.opendaylight.aaa.aaa-filterchain

179 | Failure | 80 | 0.7.0.SNAPSHOT | org.opendaylight.aaa.aaa-shiro

180 | Active | 80 | 0.7.0.SNAPSHOT | aaa-shiro-act

181 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-shiro-api

opendaylight-user@root>

opendaylight-user@root>

opendaylight-user@root>bundle:diag 179

org.opendaylight.aaa.aaa-shiro (179)

------------------------------------

Status: Failure

Blueprint

12/13/17 3:39 PM

Exception:

Error when instantiating bean provider of class org.opendaylight.aaa.impl.AAAShiroProvider

org.osgi.service.blueprint.container.ComponentDefinitionException: Error when instantiating bean provider of class org.opendaylight.aaa.impl.AAAShiroProvider

at org.apache.aries.blueprint.container.BeanRecipe.wrapAsCompDefEx(BeanRecipe.java:361)

at org.apache.aries.blueprint.container.BeanRecipe.getInstanceFromStaticFactory(BeanRecipe.java:331)

at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:280)

at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:830)

at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:811)

at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)

at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:255)

at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:186)

at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:724)

at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:411)

at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:276)

at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:300)

at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:269)

at org.apache.aries.blueprint.container.BlueprintExtender.access$900(BlueprintExtender.java:68)

at org.apache.aries.blueprint.container.BlueprintExtender$BlueprintContainerServiceImpl.createContainer(BlueprintExtender.java:602)

at org.opendaylight.controller.blueprint.BlueprintBundleTracker.modifiedBundle(BlueprintBundleTracker.java:220)

at org.opendaylight.controller.blueprint.BlueprintBundleTracker.addingBundle(BlueprintBundleTracker.java:201)

at org.opendaylight.controller.blueprint.BlueprintBundleTracker.addingBundle(BlueprintBundleTracker.java:52)

at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:469)

at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:415)

at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)

at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)

at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444)

at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:902)

at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)

at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)

at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:165)

at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:75)

at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:67)

at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:102)

at org.eclipse.osgi.container.Module.publishEvent(Module.java:466)

at org.eclipse.osgi.container.Module.start(Module.java:457)

at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:454)

at org.eclipse.osgi.container.ModuleContainer.applyDelta(ModuleContainer.java:717)

at org.eclipse.osgi.container.ModuleContainer.resolveAndApply(ModuleContainer.java:491)

at org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.java:437)

at org.eclipse.osgi.container.ModuleContainer.refresh(ModuleContainer.java:955)

at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1336)

at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1)

at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)

at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)

Caused by: net.sf.ehcache.ObjectExistsException: Cache tokens already exists

at net.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java:1391)

at net.sf.ehcache.CacheManager.addCache(CacheManager.java:1275)

at net.sf.ehcache.CacheManager.addCache(CacheManager.java:1244)

at org.opendaylight.aaa.impl.datastore.h2.H2TokenStore.<init>(H2TokenStore.java:36)

at org.opendaylight.aaa.impl.AAAShiroProvider.<init>(AAAShiroProvider.java:89)

at org.opendaylight.aaa.impl.AAAShiroProvider.newInstance(AAAShiroProvider.java:172)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:299)

at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:980)

at org.apache.aries.blueprint.container.BeanRecipe.getInstanceFromStaticFactory(BeanRecipe.java:329)

... 41 more



Thanks,

Viji J





From: Faseela K
Sent: Wednesday, December 13, 2017 11:28 AM
To: Ryan Goulding <ryandgoulding@...>
Cc: netconf-dev@...; VIJI J <viji.j@...>; Rajarajan M <rajarajan.m@...>; Michael Vorburger <vorburger@...>
Subject: RE: ComponentDefinitionException: Error when instantiating bean provider of class org.opendaylight.aaa.impl.AAAShiroProvider



+Viji, Raja, and Michael



From: Faseela K
Sent: Wednesday, December 13, 2017 12:55 AM
To: 'Ryan Goulding' <ryandgoulding@...>
Cc: 'netconf-dev@...' <netconf-dev@...>
Subject: ComponentDefinitionException: Error when instantiating bean provider of class org.opendaylight.aaa.impl.AAAShiroProvider



Hi,

Whenever I have two features, both of which has odl-restconf dependency, aaa does not come up properl.

I do see the below error I logs, I feel there is something wrong with the bundle refresh? Any pointers? Any one else hitting this issue?



2017-12-11 23:26:20,182 | ERROR | ffc-ac0e2b6783b3 | BlueprintContainerImpl | 13 - org.apache.aries.blueprint.core - 1.7.1 | Unable to start blueprint container for bundle org.opendaylight.aaa.shiro/0.7.0.SNAPSHOT

org.osgi.service.blueprint.container.ComponentDefinitionException: Error when instantiating bean provider of class org.opendaylight.aaa.impl.AAAShiroProvider

at org.apache.aries.blueprint.container.BeanRecipe.wrapAsCompDefEx(BeanRecipe.java:361)[13:org.apache.aries.blueprint.core:1.7.1]

at org.apache.aries.blueprint.container.BeanRecipe.getInstanceFromStaticFactory(BeanRecipe.java:331)[13:org.apache.aries.blueprint.core:1.7.1]

at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:280)[13:org.apache.aries.blueprint.core:1.7.1]

at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:830)[13:org.apache.aries.blueprint.core:1.7.1]

at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:811)[13:org.apache.aries.blueprint.core:1.7.1]

at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[13:org.apache.aries.blueprint.core:1.7.1]

at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_92]

at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[13:org.apache.aries.blueprint.core:1.7.1]

at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:255)[13:org.apache.aries.blueprint.core:1.7.1]

at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:186)[13:org.apache.aries.blueprint.core:1.7.1]

at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:724)[13:org.apache.aries.blueprint.core:1.7.1]

at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:411)[13:org.apache.aries.blueprint.core:1.7.1]

at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:276)[13:org.apache.aries.blueprint.core:1.7.1]

at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:300)[13:org.apache.aries.blueprint.core:1.7.1]

at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:269)[13:org.apache.aries.blueprint.core:1.7.1]

at org.apache.aries.blueprint.container.BlueprintExtender.access$900(BlueprintExtender.java:68)[13:org.apache.aries.blueprint.core:1.7.1]

at org.apache.aries.blueprint.container.BlueprintExtender$BlueprintContainerServiceImpl.createContainer(BlueprintExtender.java:602)[13:org.apache.aries.blueprint.core:1.7.1]

at org.opendaylight.controller.blueprint.BlueprintBundleTracker.modifiedBundle(BlueprintBundleTracker.java:220)[183:org.opendaylight.controller.blueprint:0.8.0.SNAPSHOT]

at org.opendaylight.controller.blueprint.BlueprintBundleTracker.addingBundle(BlueprintBundleTracker.java:201)[183:org.opendaylight.controller.blueprint:0.8.0.SNAPSHOT]

at org.opendaylight.controller.blueprint.BlueprintBundleTracker.addingBundle(BlueprintBundleTracker.java:52)[183:org.opendaylight.controller.blueprint:0.8.0.SNAPSHOT]

at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:469)[org.osgi.core-6.0.0.jar:]

at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:415)[org.osgi.core-6.0.0.jar:]

at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)[org.osgi.core-6.0.0.jar:]

at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)[org.osgi.core-6.0.0.jar:]

at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444)[org.osgi.core-6.0.0.jar:]

at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:902)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:165)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:75)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:67)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:102)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at org.eclipse.osgi.container.Module.publishEvent(Module.java:466)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at org.eclipse.osgi.container.Module.start(Module.java:457)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:454)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at org.eclipse.osgi.container.ModuleContainer.applyDelta(ModuleContainer.java:717)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at org.eclipse.osgi.container.ModuleContainer.resolveAndApply(ModuleContainer.java:491)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.java:437)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]



Thanks,

Faseela




_______________________________________________
aaa-dev mailing list
aaa-dev@...
https://lists.opendaylight.org/mailman/listinfo/aaa-dev


Jamo Luhrsen <jluhrsen@...>
 

Rajarajan,

double check "feature:list -i" (listing installed features) after you install
odl-netvirt-openstack. you are probably getting the restconf feature installed
for you as it's a per-requisite for netvirt-openstack.

JamO

On 12/13/2017 09:59 PM, Rajarajan M wrote:
Hi Luis,

I have installed features one by one.

Initially I installed "odl-netvirt-openstack" and later I have installed "odl-restconf-all". I observed this issue after 2nd feature("odl-restconf-all") getting installed.

Today I will try to install both feature in single line and update you the same.

Thanks & Regards,
RajaRajan M

-----Original Message-----
From: Luis Gomez [mailto:ecelgp@...]
Sent: Thursday, December 14, 2017 4:36 AM
To: Michael Vorburger <vorburger@...>
Cc: VIJI J <viji.j@...>; aaa-dev@...; Kitt, Stephen <skitt@...>; netconf-dev@...; Rajarajan M <rajarajan.m@...>; Faseela K <faseela.k@...>
Subject: Re: [Aaa-dev] ComponentDefinitionException: Error when instantiating bean provider of class org.opendaylight.aaa.impl.AAAShiroProvider

How are the features being installed? I am asking because since karaf 4 we do not support successive feature installation from karaf console as this can cause bundle restart and that is something most projects in ODL cannot handle today. I am not sure there is a release note for this but the workaround is to either: 1) use --no-auto-refresh in the consecutive feature install command as Michael points out, 2) list all the features you need in the karaf config boot file or 3) install all features at once in console, for example:

feature:install odl-restconf odl-netconf-mdsal odl-mdsal-apidocs odl-clustering-test-app odl-netconf-topology

BR/Luis

On Dec 13, 2017, at 2:27 AM, Michael Vorburger <vorburger@...> wrote:

+ aaa-dev & skitt:

I've never seen this issue; I think you should open a JIRA about this, to track it.

If I had to guess, I would think what is happening here must be related to some refresh issue.. probably AAA get restarted when you do the 2nd feature installed, you could double check with feature:install -v.

But it look like it's not restartable, it's not happy - and that "Caused by: net.sf.ehcache.ObjectExistsException: Cache tokens already exist" error line is the interesting one; probably something is already in the cache from the previous start, and did not get removed on bundle stop, and so code is not expecting it to already be there - kind of thing? (This is pure guess work; I'm not familiar with AAA.)

The first question to decide here is: Do we want it to not restart, or do we want to make it cleanly restartable? I think the solution is the former (it should not restart; that's a mess).

You may (likely) be able to work around the problem using --no-auto-refresh in feature install.

https://jira.opendaylight.org/browse/CONTROLLER-1764 has problem which may be related. Stephen recently something related to that, but that's not in master yet. Perhaps that will fix this problem as well, when it's available.

Tx,
M.
--
Michael Vorburger, Red Hat
vorburger@... | IRC: vorburger @freenode | ~ = http://vorburger.ch


On Wed, Dec 13, 2017 at 11:13 AM, VIJI J <viji.j@...> wrote:
Hi,



Providing karaf logs and bundle:diag for the issue.



opendaylight-user@root> feature:install odl-netvirt-openstack

opendaylight-user@root>

opendaylight-user@root>list | grep aaa

175 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-authn-api

176 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-cert

177 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-encrypt-service

178 | Active | 80 | 0.7.0.SNAPSHOT | org.opendaylight.aaa.aaa-filterchain

179 | Active | 80 | 0.7.0.SNAPSHOT | org.opendaylight.aaa.aaa-shiro

180 | Active | 80 | 0.7.0.SNAPSHOT | aaa-shiro-act

181 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-shiro-api

opendaylight-user@root>

opendaylight-user@root>feature:install odl-mdsal-apidocs

opendaylight-user@root>

opendaylight-user@root>list | grep aaa

175 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-authn-api

176 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-cert

177 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-encrypt-service

178 | Active | 80 | 0.7.0.SNAPSHOT | org.opendaylight.aaa.aaa-filterchain

179 | Failure | 80 | 0.7.0.SNAPSHOT | org.opendaylight.aaa.aaa-shiro

180 | Active | 80 | 0.7.0.SNAPSHOT | aaa-shiro-act

181 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-shiro-api

opendaylight-user@root>

opendaylight-user@root>

opendaylight-user@root>bundle:diag 179

org.opendaylight.aaa.aaa-shiro (179)

------------------------------------

Status: Failure

Blueprint

12/13/17 3:39 PM

Exception:

Error when instantiating bean provider of class org.opendaylight.aaa.impl.AAAShiroProvider

org.osgi.service.blueprint.container.ComponentDefinitionException: Error when instantiating bean provider of class org.opendaylight.aaa.impl.AAAShiroProvider

at org.apache.aries.blueprint.container.BeanRecipe.wrapAsCompDefEx(BeanRecipe.java:361)

at org.apache.aries.blueprint.container.BeanRecipe.getInstanceFromStaticFactory(BeanRecipe.java:331)

at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:280)

at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:830)

at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:811)

at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)

at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:255)

at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:186)

at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:724)

at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:411)

at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:276)

at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:300)

at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:269)

at org.apache.aries.blueprint.container.BlueprintExtender.access$900(BlueprintExtender.java:68)

at org.apache.aries.blueprint.container.BlueprintExtender$BlueprintContainerServiceImpl.createContainer(BlueprintExtender.java:602)

at org.opendaylight.controller.blueprint.BlueprintBundleTracker.modifiedBundle(BlueprintBundleTracker.java:220)

at org.opendaylight.controller.blueprint.BlueprintBundleTracker.addingBundle(BlueprintBundleTracker.java:201)

at org.opendaylight.controller.blueprint.BlueprintBundleTracker.addingBundle(BlueprintBundleTracker.java:52)

at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:469)

at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:415)

at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)

at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)

at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444)

at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:902)

at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)

at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)

at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:165)

at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:75)

at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:67)

at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:102)

at org.eclipse.osgi.container.Module.publishEvent(Module.java:466)

at org.eclipse.osgi.container.Module.start(Module.java:457)

at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:454)

at org.eclipse.osgi.container.ModuleContainer.applyDelta(ModuleContainer.java:717)

at org.eclipse.osgi.container.ModuleContainer.resolveAndApply(ModuleContainer.java:491)

at org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.java:437)

at org.eclipse.osgi.container.ModuleContainer.refresh(ModuleContainer.java:955)

at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1336)

at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1)

at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)

at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)

Caused by: net.sf.ehcache.ObjectExistsException: Cache tokens already exists

at net.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java:1391)

at net.sf.ehcache.CacheManager.addCache(CacheManager.java:1275)

at net.sf.ehcache.CacheManager.addCache(CacheManager.java:1244)

at org.opendaylight.aaa.impl.datastore.h2.H2TokenStore.<init>(H2TokenStore.java:36)

at org.opendaylight.aaa.impl.AAAShiroProvider.<init>(AAAShiroProvider.java:89)

at org.opendaylight.aaa.impl.AAAShiroProvider.newInstance(AAAShiroProvider.java:172)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:299)

at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:980)

at org.apache.aries.blueprint.container.BeanRecipe.getInstanceFromStaticFactory(BeanRecipe.java:329)

... 41 more



Thanks,

Viji J





From: Faseela K
Sent: Wednesday, December 13, 2017 11:28 AM
To: Ryan Goulding <ryandgoulding@...>
Cc: netconf-dev@...; VIJI J <viji.j@...>; Rajarajan M <rajarajan.m@...>; Michael Vorburger <vorburger@...>
Subject: RE: ComponentDefinitionException: Error when instantiating bean provider of class org.opendaylight.aaa.impl.AAAShiroProvider



+Viji, Raja, and Michael



From: Faseela K
Sent: Wednesday, December 13, 2017 12:55 AM
To: 'Ryan Goulding' <ryandgoulding@...>
Cc: 'netconf-dev@...' <netconf-dev@...>
Subject: ComponentDefinitionException: Error when instantiating bean provider of class org.opendaylight.aaa.impl.AAAShiroProvider



Hi,

Whenever I have two features, both of which has odl-restconf dependency, aaa does not come up properl.

I do see the below error I logs, I feel there is something wrong with the bundle refresh? Any pointers? Any one else hitting this issue?



2017-12-11 23:26:20,182 | ERROR | ffc-ac0e2b6783b3 | BlueprintContainerImpl | 13 - org.apache.aries.blueprint.core - 1.7.1 | Unable to start blueprint container for bundle org.opendaylight.aaa.shiro/0.7.0.SNAPSHOT

org.osgi.service.blueprint.container.ComponentDefinitionException: Error when instantiating bean provider of class org.opendaylight.aaa.impl.AAAShiroProvider

at org.apache.aries.blueprint.container.BeanRecipe.wrapAsCompDefEx(BeanRecipe.java:361)[13:org.apache.aries.blueprint.core:1.7.1]

at org.apache.aries.blueprint.container.BeanRecipe.getInstanceFromStaticFactory(BeanRecipe.java:331)[13:org.apache.aries.blueprint.core:1.7.1]

at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:280)[13:org.apache.aries.blueprint.core:1.7.1]

at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:830)[13:org.apache.aries.blueprint.core:1.7.1]

at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:811)[13:org.apache.aries.blueprint.core:1.7.1]

at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[13:org.apache.aries.blueprint.core:1.7.1]

at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_92]

at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[13:org.apache.aries.blueprint.core:1.7.1]

at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:255)[13:org.apache.aries.blueprint.core:1.7.1]

at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:186)[13:org.apache.aries.blueprint.core:1.7.1]

at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:724)[13:org.apache.aries.blueprint.core:1.7.1]

at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:411)[13:org.apache.aries.blueprint.core:1.7.1]

at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:276)[13:org.apache.aries.blueprint.core:1.7.1]

at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:300)[13:org.apache.aries.blueprint.core:1.7.1]

at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:269)[13:org.apache.aries.blueprint.core:1.7.1]

at org.apache.aries.blueprint.container.BlueprintExtender.access$900(BlueprintExtender.java:68)[13:org.apache.aries.blueprint.core:1.7.1]

at org.apache.aries.blueprint.container.BlueprintExtender$BlueprintContainerServiceImpl.createContainer(BlueprintExtender.java:602)[13:org.apache.aries.blueprint.core:1.7.1]

at org.opendaylight.controller.blueprint.BlueprintBundleTracker.modifiedBundle(BlueprintBundleTracker.java:220)[183:org.opendaylight.controller.blueprint:0.8.0.SNAPSHOT]

at org.opendaylight.controller.blueprint.BlueprintBundleTracker.addingBundle(BlueprintBundleTracker.java:201)[183:org.opendaylight.controller.blueprint:0.8.0.SNAPSHOT]

at org.opendaylight.controller.blueprint.BlueprintBundleTracker.addingBundle(BlueprintBundleTracker.java:52)[183:org.opendaylight.controller.blueprint:0.8.0.SNAPSHOT]

at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:469)[org.osgi.core-6.0.0.jar:]

at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:415)[org.osgi.core-6.0.0.jar:]

at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)[org.osgi.core-6.0.0.jar:]

at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)[org.osgi.core-6.0.0.jar:]

at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444)[org.osgi.core-6.0.0.jar:]

at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:902)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:165)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:75)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:67)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:102)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at org.eclipse.osgi.container.Module.publishEvent(Module.java:466)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at org.eclipse.osgi.container.Module.start(Module.java:457)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:454)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at org.eclipse.osgi.container.ModuleContainer.applyDelta(ModuleContainer.java:717)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at org.eclipse.osgi.container.ModuleContainer.resolveAndApply(ModuleContainer.java:491)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.java:437)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]



Thanks,

Faseela




_______________________________________________
aaa-dev mailing list
aaa-dev@...
https://lists.opendaylight.org/mailman/listinfo/aaa-dev
_______________________________________________
aaa-dev mailing list
aaa-dev@...
https://lists.opendaylight.org/mailman/listinfo/aaa-dev


Faseela K <faseela.k@...>
 

Jamo,
Raja was hitting the issue for odl-netvirt-openstack + odl-mdsal-apidocs as well.
That is when he raised the concern.
However we do not see the problem when we install both the features in one shot.
Is this already release noted? Or should we raise a separate JIRA?
Thanks,
Faseela

-----Original Message-----
From: Jamo Luhrsen [mailto:jluhrsen@...]
Sent: Thursday, December 14, 2017 8:47 PM
To: Rajarajan M <rajarajan.m@...>; Luis Gomez <ecelgp@...>; Michael Vorburger <vorburger@...>
Cc: Kitt, Stephen <skitt@...>; netconf-dev@...; aaa-dev@...; VIJI J <viji.j@...>; Faseela K <faseela.k@...>
Subject: Re: [Aaa-dev] ComponentDefinitionException: Error when instantiating bean provider of class org.opendaylight.aaa.impl.AAAShiroProvider

Rajarajan,

double check "feature:list -i" (listing installed features) after you install odl-netvirt-openstack. you are probably getting the restconf feature installed for you as it's a per-requisite for netvirt-openstack.

JamO

On 12/13/2017 09:59 PM, Rajarajan M wrote:
Hi Luis,

I have installed features one by one.

Initially I installed "odl-netvirt-openstack" and later I have installed "odl-restconf-all". I observed this issue after 2nd feature("odl-restconf-all") getting installed.

Today I will try to install both feature in single line and update you the same.

Thanks & Regards,
RajaRajan M

-----Original Message-----
From: Luis Gomez [mailto:ecelgp@...]
Sent: Thursday, December 14, 2017 4:36 AM
To: Michael Vorburger <vorburger@...>
Cc: VIJI J <viji.j@...>; aaa-dev@...;
Kitt, Stephen <skitt@...>; netconf-dev@...;
Rajarajan M <rajarajan.m@...>; Faseela K
<faseela.k@...>
Subject: Re: [Aaa-dev] ComponentDefinitionException: Error when
instantiating bean provider of class
org.opendaylight.aaa.impl.AAAShiroProvider

How are the features being installed? I am asking because since karaf 4 we do not support successive feature installation from karaf console as this can cause bundle restart and that is something most projects in ODL cannot handle today. I am not sure there is a release note for this but the workaround is to either: 1) use --no-auto-refresh in the consecutive feature install command as Michael points out, 2) list all the features you need in the karaf config boot file or 3) install all features at once in console, for example:

feature:install odl-restconf odl-netconf-mdsal odl-mdsal-apidocs
odl-clustering-test-app odl-netconf-topology

BR/Luis

On Dec 13, 2017, at 2:27 AM, Michael Vorburger <vorburger@...> wrote:

+ aaa-dev & skitt:

I've never seen this issue; I think you should open a JIRA about this, to track it.

If I had to guess, I would think what is happening here must be related to some refresh issue.. probably AAA get restarted when you do the 2nd feature installed, you could double check with feature:install -v.

But it look like it's not restartable, it's not happy - and that
"Caused by: net.sf.ehcache.ObjectExistsException: Cache tokens
already exist" error line is the interesting one; probably something
is already in the cache from the previous start, and did not get
removed on bundle stop, and so code is not expecting it to already be
there - kind of thing? (This is pure guess work; I'm not familiar
with AAA.)

The first question to decide here is: Do we want it to not restart, or do we want to make it cleanly restartable? I think the solution is the former (it should not restart; that's a mess).

You may (likely) be able to work around the problem using --no-auto-refresh in feature install.

https://jira.opendaylight.org/browse/CONTROLLER-1764 has problem which may be related. Stephen recently something related to that, but that's not in master yet. Perhaps that will fix this problem as well, when it's available.

Tx,
M.
--
Michael Vorburger, Red Hat
vorburger@... | IRC: vorburger @freenode | ~ =
http://vorburger.ch


On Wed, Dec 13, 2017 at 11:13 AM, VIJI J <viji.j@...> wrote:
Hi,



Providing karaf logs and bundle:diag for the issue.



opendaylight-user@root> feature:install odl-netvirt-openstack

opendaylight-user@root>

opendaylight-user@root>list | grep aaa

175 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-authn-api

176 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-cert

177 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-encrypt-service

178 | Active | 80 | 0.7.0.SNAPSHOT | org.opendaylight.aaa.aaa-filterchain

179 | Active | 80 | 0.7.0.SNAPSHOT | org.opendaylight.aaa.aaa-shiro

180 | Active | 80 | 0.7.0.SNAPSHOT | aaa-shiro-act

181 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-shiro-api

opendaylight-user@root>

opendaylight-user@root>feature:install odl-mdsal-apidocs

opendaylight-user@root>

opendaylight-user@root>list | grep aaa

175 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-authn-api

176 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-cert

177 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-encrypt-service

178 | Active | 80 | 0.7.0.SNAPSHOT | org.opendaylight.aaa.aaa-filterchain

179 | Failure | 80 | 0.7.0.SNAPSHOT | org.opendaylight.aaa.aaa-shiro

180 | Active | 80 | 0.7.0.SNAPSHOT | aaa-shiro-act

181 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-shiro-api

opendaylight-user@root>

opendaylight-user@root>

opendaylight-user@root>bundle:diag 179

org.opendaylight.aaa.aaa-shiro (179)

------------------------------------

Status: Failure

Blueprint

12/13/17 3:39 PM

Exception:

Error when instantiating bean provider of class
org.opendaylight.aaa.impl.AAAShiroProvider

org.osgi.service.blueprint.container.ComponentDefinitionException:
Error when instantiating bean provider of class
org.opendaylight.aaa.impl.AAAShiroProvider

at
org.apache.aries.blueprint.container.BeanRecipe.wrapAsCompDefEx(BeanR
ecipe.java:361)

at
org.apache.aries.blueprint.container.BeanRecipe.getInstanceFromStatic
Factory(BeanRecipe.java:331)

at
org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecip
e.java:280)

at
org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanR
ecipe.java:830)

at
org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRe
cipe.java:811)

at
org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.ja
va:79)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at
org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.ja
va:88)

at
org.apache.aries.blueprint.container.BlueprintRepository.createInstan
ces(BlueprintRepository.java:255)

at
org.apache.aries.blueprint.container.BlueprintRepository.createAll(Bl
ueprintRepository.java:186)

at
org.apache.aries.blueprint.container.BlueprintContainerImpl.instantia
teEagerComponents(BlueprintContainerImpl.java:724)

at
org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(Blu
eprintContainerImpl.java:411)

at
org.apache.aries.blueprint.container.BlueprintContainerImpl.run(Bluep
rintContainerImpl.java:276)

at
org.apache.aries.blueprint.container.BlueprintExtender.createContaine
r(BlueprintExtender.java:300)

at
org.apache.aries.blueprint.container.BlueprintExtender.createContaine
r(BlueprintExtender.java:269)

at
org.apache.aries.blueprint.container.BlueprintExtender.access$900(Blu
eprintExtender.java:68)

at
org.apache.aries.blueprint.container.BlueprintExtender$BlueprintConta
inerServiceImpl.createContainer(BlueprintExtender.java:602)

at
org.opendaylight.controller.blueprint.BlueprintBundleTracker.modified
Bundle(BlueprintBundleTracker.java:220)

at
org.opendaylight.controller.blueprint.BlueprintBundleTracker.addingBu
ndle(BlueprintBundleTracker.java:201)

at
org.opendaylight.controller.blueprint.BlueprintBundleTracker.addingBu
ndle(BlueprintBundleTracker.java:52)

at
org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTr
acker.java:469)

at
org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTr
acker.java:415)

at
org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.jav
a:256)

at
org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)

at
org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTrack
er.java:444)

at
org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(B
undleContextImpl.java:902)

at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventM
anager.java:230)

at
org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchr
onous(ListenerQueue.java:148)

at
org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBund
leEventPrivileged(EquinoxEventPublisher.java:165)

at
org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBund
leEvent(EquinoxEventPublisher.java:75)

at
org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBund
leEvent(EquinoxEventPublisher.java:67)

at
org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishMo
duleEvent(EquinoxContainerAdaptor.java:102)

at
org.eclipse.osgi.container.Module.publishEvent(Module.java:466)

at org.eclipse.osgi.container.Module.start(Module.java:457)

at
org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:
454)

at
org.eclipse.osgi.container.ModuleContainer.applyDelta(ModuleContainer
.java:717)

at
org.eclipse.osgi.container.ModuleContainer.resolveAndApply(ModuleCont
ainer.java:491)

at
org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.ja
va:437)

at
org.eclipse.osgi.container.ModuleContainer.refresh(ModuleContainer.ja
va:955)

at
org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEv
ent(ModuleContainer.java:1336)

at
org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEv
ent(ModuleContainer.java:1)

at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventM
anager.java:230)

at
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(Even
tManager.java:340)

Caused by: net.sf.ehcache.ObjectExistsException: Cache tokens already
exists

at
net.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java:1391)

at
net.sf.ehcache.CacheManager.addCache(CacheManager.java:1275)

at
net.sf.ehcache.CacheManager.addCache(CacheManager.java:1244)

at
org.opendaylight.aaa.impl.datastore.h2.H2TokenStore.<init>(H2TokenSto
re.java:36)

at
org.opendaylight.aaa.impl.AAAShiroProvider.<init>(AAAShiroProvider.ja
va:89)

at
org.opendaylight.aaa.impl.AAAShiroProvider.newInstance(AAAShiroProvid
er.java:172)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)

at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:62)

at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at
org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUti
ls.java:299)

at
org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.jav
a:980)

at
org.apache.aries.blueprint.container.BeanRecipe.getInstanceFromStatic
Factory(BeanRecipe.java:329)

... 41 more



Thanks,

Viji J





From: Faseela K
Sent: Wednesday, December 13, 2017 11:28 AM
To: Ryan Goulding <ryandgoulding@...>
Cc: netconf-dev@...; VIJI J <viji.j@...>;
Rajarajan M <rajarajan.m@...>; Michael Vorburger
<vorburger@...>
Subject: RE: ComponentDefinitionException: Error when instantiating
bean provider of class org.opendaylight.aaa.impl.AAAShiroProvider



+Viji, Raja, and Michael



From: Faseela K
Sent: Wednesday, December 13, 2017 12:55 AM
To: 'Ryan Goulding' <ryandgoulding@...>
Cc: 'netconf-dev@...'
<netconf-dev@...>
Subject: ComponentDefinitionException: Error when instantiating bean
provider of class org.opendaylight.aaa.impl.AAAShiroProvider



Hi,

Whenever I have two features, both of which has odl-restconf dependency, aaa does not come up properl.

I do see the below error I logs, I feel there is something wrong with the bundle refresh? Any pointers? Any one else hitting this issue?



2017-12-11 23:26:20,182 | ERROR | ffc-ac0e2b6783b3 | BlueprintContainerImpl | 13 - org.apache.aries.blueprint.core - 1.7.1 | Unable to start blueprint container for bundle org.opendaylight.aaa.shiro/0.7.0.SNAPSHOT

org.osgi.service.blueprint.container.ComponentDefinitionException:
Error when instantiating bean provider of class
org.opendaylight.aaa.impl.AAAShiroProvider

at
org.apache.aries.blueprint.container.BeanRecipe.wrapAsCompDefEx(BeanR
ecipe.java:361)[13:org.apache.aries.blueprint.core:1.7.1]

at
org.apache.aries.blueprint.container.BeanRecipe.getInstanceFromStatic
Factory(BeanRecipe.java:331)[13:org.apache.aries.blueprint.core:1.7.1
]

at
org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecip
e.java:280)[13:org.apache.aries.blueprint.core:1.7.1]

at
org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanR
ecipe.java:830)[13:org.apache.aries.blueprint.core:1.7.1]

at
org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRe
cipe.java:811)[13:org.apache.aries.blueprint.core:1.7.1]

at
org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.ja
va:79)[13:org.apache.aries.blueprint.core:1.7.1]

at
java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_92]

at
org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.ja
va:88)[13:org.apache.aries.blueprint.core:1.7.1]

at
org.apache.aries.blueprint.container.BlueprintRepository.createInstan
ces(BlueprintRepository.java:255)[13:org.apache.aries.blueprint.core:
1.7.1]

at
org.apache.aries.blueprint.container.BlueprintRepository.createAll(Bl
ueprintRepository.java:186)[13:org.apache.aries.blueprint.core:1.7.1]

at
org.apache.aries.blueprint.container.BlueprintContainerImpl.instantia
teEagerComponents(BlueprintContainerImpl.java:724)[13:org.apache.arie
s.blueprint.core:1.7.1]

at
org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(Blu
eprintContainerImpl.java:411)[13:org.apache.aries.blueprint.core:1.7.
1]

at
org.apache.aries.blueprint.container.BlueprintContainerImpl.run(Bluep
rintContainerImpl.java:276)[13:org.apache.aries.blueprint.core:1.7.1]

at
org.apache.aries.blueprint.container.BlueprintExtender.createContaine
r(BlueprintExtender.java:300)[13:org.apache.aries.blueprint.core:1.7.
1]

at
org.apache.aries.blueprint.container.BlueprintExtender.createContaine
r(BlueprintExtender.java:269)[13:org.apache.aries.blueprint.core:1.7.
1]

at
org.apache.aries.blueprint.container.BlueprintExtender.access$900(Blu
eprintExtender.java:68)[13:org.apache.aries.blueprint.core:1.7.1]

at
org.apache.aries.blueprint.container.BlueprintExtender$BlueprintConta
inerServiceImpl.createContainer(BlueprintExtender.java:602)[13:org.ap
ache.aries.blueprint.core:1.7.1]

at
org.opendaylight.controller.blueprint.BlueprintBundleTracker.modified
Bundle(BlueprintBundleTracker.java:220)[183:org.opendaylight.controll
er.blueprint:0.8.0.SNAPSHOT]

at
org.opendaylight.controller.blueprint.BlueprintBundleTracker.addingBu
ndle(BlueprintBundleTracker.java:201)[183:org.opendaylight.controller
.blueprint:0.8.0.SNAPSHOT]

at
org.opendaylight.controller.blueprint.BlueprintBundleTracker.addingBu
ndle(BlueprintBundleTracker.java:52)[183:org.opendaylight.controller.
blueprint:0.8.0.SNAPSHOT]

at
org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTr
acker.java:469)[org.osgi.core-6.0.0.jar:]

at
org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTr
acker.java:415)[org.osgi.core-6.0.0.jar:]

at
org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.jav
a:256)[org.osgi.core-6.0.0.jar:]

at
org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
[org.osgi.core-6.0.0.jar:]

at
org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTrack
er.java:444)[org.osgi.core-6.0.0.jar:]

at
org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(B
undleContextImpl.java:902)[org.eclipse.osgi-3.10.101.v20150820-1432.j
ar:]

at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventM
anager.java:230)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at
org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchr
onous(ListenerQueue.java:148)[org.eclipse.osgi-3.10.101.v20150820-143
2.jar:]

at
org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBund
leEventPrivileged(EquinoxEventPublisher.java:165)[org.eclipse.osgi-3.
10.101.v20150820-1432.jar:]

at
org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBund
leEvent(EquinoxEventPublisher.java:75)[org.eclipse.osgi-3.10.101.v201
50820-1432.jar:]

at
org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBund
leEvent(EquinoxEventPublisher.java:67)[org.eclipse.osgi-3.10.101.v201
50820-1432.jar:]

at
org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishMo
duleEvent(EquinoxContainerAdaptor.java:102)[org.eclipse.osgi-3.10.101
.v20150820-1432.jar:]

at
org.eclipse.osgi.container.Module.publishEvent(Module.java:466)[org.e
clipse.osgi-3.10.101.v20150820-1432.jar:]

at
org.eclipse.osgi.container.Module.start(Module.java:457)[org.eclipse.
osgi-3.10.101.v20150820-1432.jar:]

at
org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:
454)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at
org.eclipse.osgi.container.ModuleContainer.applyDelta(ModuleContainer
.java:717)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at
org.eclipse.osgi.container.ModuleContainer.resolveAndApply(ModuleCont
ainer.java:491)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at
org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.ja
va:437)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]



Thanks,

Faseela




_______________________________________________
aaa-dev mailing list
aaa-dev@...
https://lists.opendaylight.org/mailman/listinfo/aaa-dev
_______________________________________________
aaa-dev mailing list
aaa-dev@...
https://lists.opendaylight.org/mailman/listinfo/aaa-dev


Jamo Luhrsen <jluhrsen@...>
 

I'm not sure about this being release noted or not. Maybe raise a JIRA against
INTDIST and they can close it if we do have release notes.

Luis may know for certain.

JamO

On 12/14/2017 08:14 AM, Faseela K wrote:
Jamo,
Raja was hitting the issue for odl-netvirt-openstack + odl-mdsal-apidocs as well.
That is when he raised the concern.
However we do not see the problem when we install both the features in one shot.
Is this already release noted? Or should we raise a separate JIRA?
Thanks,
Faseela

-----Original Message-----
From: Jamo Luhrsen [mailto:jluhrsen@...]
Sent: Thursday, December 14, 2017 8:47 PM
To: Rajarajan M <rajarajan.m@...>; Luis Gomez <ecelgp@...>; Michael Vorburger <vorburger@...>
Cc: Kitt, Stephen <skitt@...>; netconf-dev@...; aaa-dev@...; VIJI J <viji.j@...>; Faseela K <faseela.k@...>
Subject: Re: [Aaa-dev] ComponentDefinitionException: Error when instantiating bean provider of class org.opendaylight.aaa.impl.AAAShiroProvider

Rajarajan,

double check "feature:list -i" (listing installed features) after you install odl-netvirt-openstack. you are probably getting the restconf feature installed for you as it's a per-requisite for netvirt-openstack.

JamO

On 12/13/2017 09:59 PM, Rajarajan M wrote:
Hi Luis,

I have installed features one by one.

Initially I installed "odl-netvirt-openstack" and later I have installed "odl-restconf-all". I observed this issue after 2nd feature("odl-restconf-all") getting installed.

Today I will try to install both feature in single line and update you the same.

Thanks & Regards,
RajaRajan M

-----Original Message-----
From: Luis Gomez [mailto:ecelgp@...]
Sent: Thursday, December 14, 2017 4:36 AM
To: Michael Vorburger <vorburger@...>
Cc: VIJI J <viji.j@...>; aaa-dev@...;
Kitt, Stephen <skitt@...>; netconf-dev@...;
Rajarajan M <rajarajan.m@...>; Faseela K
<faseela.k@...>
Subject: Re: [Aaa-dev] ComponentDefinitionException: Error when
instantiating bean provider of class
org.opendaylight.aaa.impl.AAAShiroProvider

How are the features being installed? I am asking because since karaf 4 we do not support successive feature installation from karaf console as this can cause bundle restart and that is something most projects in ODL cannot handle today. I am not sure there is a release note for this but the workaround is to either: 1) use --no-auto-refresh in the consecutive feature install command as Michael points out, 2) list all the features you need in the karaf config boot file or 3) install all features at once in console, for example:

feature:install odl-restconf odl-netconf-mdsal odl-mdsal-apidocs
odl-clustering-test-app odl-netconf-topology

BR/Luis

On Dec 13, 2017, at 2:27 AM, Michael Vorburger <vorburger@...> wrote:

+ aaa-dev & skitt:

I've never seen this issue; I think you should open a JIRA about this, to track it.

If I had to guess, I would think what is happening here must be related to some refresh issue.. probably AAA get restarted when you do the 2nd feature installed, you could double check with feature:install -v.

But it look like it's not restartable, it's not happy - and that
"Caused by: net.sf.ehcache.ObjectExistsException: Cache tokens
already exist" error line is the interesting one; probably something
is already in the cache from the previous start, and did not get
removed on bundle stop, and so code is not expecting it to already be
there - kind of thing? (This is pure guess work; I'm not familiar
with AAA.)

The first question to decide here is: Do we want it to not restart, or do we want to make it cleanly restartable? I think the solution is the former (it should not restart; that's a mess).

You may (likely) be able to work around the problem using --no-auto-refresh in feature install.

https://jira.opendaylight.org/browse/CONTROLLER-1764 has problem which may be related. Stephen recently something related to that, but that's not in master yet. Perhaps that will fix this problem as well, when it's available.

Tx,
M.
--
Michael Vorburger, Red Hat
vorburger@... | IRC: vorburger @freenode | ~ =
http://vorburger.ch


On Wed, Dec 13, 2017 at 11:13 AM, VIJI J <viji.j@...> wrote:
Hi,



Providing karaf logs and bundle:diag for the issue.



opendaylight-user@root> feature:install odl-netvirt-openstack

opendaylight-user@root>

opendaylight-user@root>list | grep aaa

175 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-authn-api

176 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-cert

177 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-encrypt-service

178 | Active | 80 | 0.7.0.SNAPSHOT | org.opendaylight.aaa.aaa-filterchain

179 | Active | 80 | 0.7.0.SNAPSHOT | org.opendaylight.aaa.aaa-shiro

180 | Active | 80 | 0.7.0.SNAPSHOT | aaa-shiro-act

181 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-shiro-api

opendaylight-user@root>

opendaylight-user@root>feature:install odl-mdsal-apidocs

opendaylight-user@root>

opendaylight-user@root>list | grep aaa

175 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-authn-api

176 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-cert

177 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-encrypt-service

178 | Active | 80 | 0.7.0.SNAPSHOT | org.opendaylight.aaa.aaa-filterchain

179 | Failure | 80 | 0.7.0.SNAPSHOT | org.opendaylight.aaa.aaa-shiro

180 | Active | 80 | 0.7.0.SNAPSHOT | aaa-shiro-act

181 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-shiro-api

opendaylight-user@root>

opendaylight-user@root>

opendaylight-user@root>bundle:diag 179

org.opendaylight.aaa.aaa-shiro (179)

------------------------------------

Status: Failure

Blueprint

12/13/17 3:39 PM

Exception:

Error when instantiating bean provider of class
org.opendaylight.aaa.impl.AAAShiroProvider

org.osgi.service.blueprint.container.ComponentDefinitionException:
Error when instantiating bean provider of class
org.opendaylight.aaa.impl.AAAShiroProvider

at
org.apache.aries.blueprint.container.BeanRecipe.wrapAsCompDefEx(BeanR
ecipe.java:361)

at
org.apache.aries.blueprint.container.BeanRecipe.getInstanceFromStatic
Factory(BeanRecipe.java:331)

at
org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecip
e.java:280)

at
org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanR
ecipe.java:830)

at
org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRe
cipe.java:811)

at
org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.ja
va:79)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at
org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.ja
va:88)

at
org.apache.aries.blueprint.container.BlueprintRepository.createInstan
ces(BlueprintRepository.java:255)

at
org.apache.aries.blueprint.container.BlueprintRepository.createAll(Bl
ueprintRepository.java:186)

at
org.apache.aries.blueprint.container.BlueprintContainerImpl.instantia
teEagerComponents(BlueprintContainerImpl.java:724)

at
org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(Blu
eprintContainerImpl.java:411)

at
org.apache.aries.blueprint.container.BlueprintContainerImpl.run(Bluep
rintContainerImpl.java:276)

at
org.apache.aries.blueprint.container.BlueprintExtender.createContaine
r(BlueprintExtender.java:300)

at
org.apache.aries.blueprint.container.BlueprintExtender.createContaine
r(BlueprintExtender.java:269)

at
org.apache.aries.blueprint.container.BlueprintExtender.access$900(Blu
eprintExtender.java:68)

at
org.apache.aries.blueprint.container.BlueprintExtender$BlueprintConta
inerServiceImpl.createContainer(BlueprintExtender.java:602)

at
org.opendaylight.controller.blueprint.BlueprintBundleTracker.modified
Bundle(BlueprintBundleTracker.java:220)

at
org.opendaylight.controller.blueprint.BlueprintBundleTracker.addingBu
ndle(BlueprintBundleTracker.java:201)

at
org.opendaylight.controller.blueprint.BlueprintBundleTracker.addingBu
ndle(BlueprintBundleTracker.java:52)

at
org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTr
acker.java:469)

at
org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTr
acker.java:415)

at
org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.jav
a:256)

at
org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)

at
org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTrack
er.java:444)

at
org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(B
undleContextImpl.java:902)

at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventM
anager.java:230)

at
org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchr
onous(ListenerQueue.java:148)

at
org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBund
leEventPrivileged(EquinoxEventPublisher.java:165)

at
org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBund
leEvent(EquinoxEventPublisher.java:75)

at
org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBund
leEvent(EquinoxEventPublisher.java:67)

at
org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishMo
duleEvent(EquinoxContainerAdaptor.java:102)

at
org.eclipse.osgi.container.Module.publishEvent(Module.java:466)

at org.eclipse.osgi.container.Module.start(Module.java:457)

at
org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:
454)

at
org.eclipse.osgi.container.ModuleContainer.applyDelta(ModuleContainer
.java:717)

at
org.eclipse.osgi.container.ModuleContainer.resolveAndApply(ModuleCont
ainer.java:491)

at
org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.ja
va:437)

at
org.eclipse.osgi.container.ModuleContainer.refresh(ModuleContainer.ja
va:955)

at
org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEv
ent(ModuleContainer.java:1336)

at
org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEv
ent(ModuleContainer.java:1)

at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventM
anager.java:230)

at
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(Even
tManager.java:340)

Caused by: net.sf.ehcache.ObjectExistsException: Cache tokens already
exists

at
net.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java:1391)

at
net.sf.ehcache.CacheManager.addCache(CacheManager.java:1275)

at
net.sf.ehcache.CacheManager.addCache(CacheManager.java:1244)

at
org.opendaylight.aaa.impl.datastore.h2.H2TokenStore.<init>(H2TokenSto
re.java:36)

at
org.opendaylight.aaa.impl.AAAShiroProvider.<init>(AAAShiroProvider.ja
va:89)

at
org.opendaylight.aaa.impl.AAAShiroProvider.newInstance(AAAShiroProvid
er.java:172)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)

at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:62)

at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at
org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUti
ls.java:299)

at
org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.jav
a:980)

at
org.apache.aries.blueprint.container.BeanRecipe.getInstanceFromStatic
Factory(BeanRecipe.java:329)

... 41 more



Thanks,

Viji J





From: Faseela K
Sent: Wednesday, December 13, 2017 11:28 AM
To: Ryan Goulding <ryandgoulding@...>
Cc: netconf-dev@...; VIJI J <viji.j@...>;
Rajarajan M <rajarajan.m@...>; Michael Vorburger
<vorburger@...>
Subject: RE: ComponentDefinitionException: Error when instantiating
bean provider of class org.opendaylight.aaa.impl.AAAShiroProvider



+Viji, Raja, and Michael



From: Faseela K
Sent: Wednesday, December 13, 2017 12:55 AM
To: 'Ryan Goulding' <ryandgoulding@...>
Cc: 'netconf-dev@...'
<netconf-dev@...>
Subject: ComponentDefinitionException: Error when instantiating bean
provider of class org.opendaylight.aaa.impl.AAAShiroProvider



Hi,

Whenever I have two features, both of which has odl-restconf dependency, aaa does not come up properl.

I do see the below error I logs, I feel there is something wrong with the bundle refresh? Any pointers? Any one else hitting this issue?



2017-12-11 23:26:20,182 | ERROR | ffc-ac0e2b6783b3 | BlueprintContainerImpl | 13 - org.apache.aries.blueprint.core - 1.7.1 | Unable to start blueprint container for bundle org.opendaylight.aaa.shiro/0.7.0.SNAPSHOT

org.osgi.service.blueprint.container.ComponentDefinitionException:
Error when instantiating bean provider of class
org.opendaylight.aaa.impl.AAAShiroProvider

at
org.apache.aries.blueprint.container.BeanRecipe.wrapAsCompDefEx(BeanR
ecipe.java:361)[13:org.apache.aries.blueprint.core:1.7.1]

at
org.apache.aries.blueprint.container.BeanRecipe.getInstanceFromStatic
Factory(BeanRecipe.java:331)[13:org.apache.aries.blueprint.core:1.7.1
]

at
org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecip
e.java:280)[13:org.apache.aries.blueprint.core:1.7.1]

at
org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanR
ecipe.java:830)[13:org.apache.aries.blueprint.core:1.7.1]

at
org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRe
cipe.java:811)[13:org.apache.aries.blueprint.core:1.7.1]

at
org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.ja
va:79)[13:org.apache.aries.blueprint.core:1.7.1]

at
java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_92]

at
org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.ja
va:88)[13:org.apache.aries.blueprint.core:1.7.1]

at
org.apache.aries.blueprint.container.BlueprintRepository.createInstan
ces(BlueprintRepository.java:255)[13:org.apache.aries.blueprint.core:
1.7.1]

at
org.apache.aries.blueprint.container.BlueprintRepository.createAll(Bl
ueprintRepository.java:186)[13:org.apache.aries.blueprint.core:1.7.1]

at
org.apache.aries.blueprint.container.BlueprintContainerImpl.instantia
teEagerComponents(BlueprintContainerImpl.java:724)[13:org.apache.arie
s.blueprint.core:1.7.1]

at
org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(Blu
eprintContainerImpl.java:411)[13:org.apache.aries.blueprint.core:1.7.
1]

at
org.apache.aries.blueprint.container.BlueprintContainerImpl.run(Bluep
rintContainerImpl.java:276)[13:org.apache.aries.blueprint.core:1.7.1]

at
org.apache.aries.blueprint.container.BlueprintExtender.createContaine
r(BlueprintExtender.java:300)[13:org.apache.aries.blueprint.core:1.7.
1]

at
org.apache.aries.blueprint.container.BlueprintExtender.createContaine
r(BlueprintExtender.java:269)[13:org.apache.aries.blueprint.core:1.7.
1]

at
org.apache.aries.blueprint.container.BlueprintExtender.access$900(Blu
eprintExtender.java:68)[13:org.apache.aries.blueprint.core:1.7.1]

at
org.apache.aries.blueprint.container.BlueprintExtender$BlueprintConta
inerServiceImpl.createContainer(BlueprintExtender.java:602)[13:org.ap
ache.aries.blueprint.core:1.7.1]

at
org.opendaylight.controller.blueprint.BlueprintBundleTracker.modified
Bundle(BlueprintBundleTracker.java:220)[183:org.opendaylight.controll
er.blueprint:0.8.0.SNAPSHOT]

at
org.opendaylight.controller.blueprint.BlueprintBundleTracker.addingBu
ndle(BlueprintBundleTracker.java:201)[183:org.opendaylight.controller
.blueprint:0.8.0.SNAPSHOT]

at
org.opendaylight.controller.blueprint.BlueprintBundleTracker.addingBu
ndle(BlueprintBundleTracker.java:52)[183:org.opendaylight.controller.
blueprint:0.8.0.SNAPSHOT]

at
org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTr
acker.java:469)[org.osgi.core-6.0.0.jar:]

at
org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTr
acker.java:415)[org.osgi.core-6.0.0.jar:]

at
org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.jav
a:256)[org.osgi.core-6.0.0.jar:]

at
org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
[org.osgi.core-6.0.0.jar:]

at
org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTrack
er.java:444)[org.osgi.core-6.0.0.jar:]

at
org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(B
undleContextImpl.java:902)[org.eclipse.osgi-3.10.101.v20150820-1432.j
ar:]

at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventM
anager.java:230)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at
org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchr
onous(ListenerQueue.java:148)[org.eclipse.osgi-3.10.101.v20150820-143
2.jar:]

at
org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBund
leEventPrivileged(EquinoxEventPublisher.java:165)[org.eclipse.osgi-3.
10.101.v20150820-1432.jar:]

at
org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBund
leEvent(EquinoxEventPublisher.java:75)[org.eclipse.osgi-3.10.101.v201
50820-1432.jar:]

at
org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBund
leEvent(EquinoxEventPublisher.java:67)[org.eclipse.osgi-3.10.101.v201
50820-1432.jar:]

at
org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishMo
duleEvent(EquinoxContainerAdaptor.java:102)[org.eclipse.osgi-3.10.101
.v20150820-1432.jar:]

at
org.eclipse.osgi.container.Module.publishEvent(Module.java:466)[org.e
clipse.osgi-3.10.101.v20150820-1432.jar:]

at
org.eclipse.osgi.container.Module.start(Module.java:457)[org.eclipse.
osgi-3.10.101.v20150820-1432.jar:]

at
org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:
454)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at
org.eclipse.osgi.container.ModuleContainer.applyDelta(ModuleContainer
.java:717)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at
org.eclipse.osgi.container.ModuleContainer.resolveAndApply(ModuleCont
ainer.java:491)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at
org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.ja
va:437)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]



Thanks,

Faseela




_______________________________________________
aaa-dev mailing list
aaa-dev@...
https://lists.opendaylight.org/mailman/listinfo/aaa-dev
_______________________________________________
aaa-dev mailing list
aaa-dev@...
https://lists.opendaylight.org/mailman/listinfo/aaa-dev


Luis Gomez
 

Yeah, I cannot find anything in current Nitrogen release notes so I will add this info in the distribution section.

On Dec 14, 2017, at 8:20 AM, Jamo Luhrsen <jluhrsen@...> wrote:

I'm not sure about this being release noted or not. Maybe raise a JIRA against
INTDIST and they can close it if we do have release notes.

Luis may know for certain.

JamO

On 12/14/2017 08:14 AM, Faseela K wrote:
Jamo,
Raja was hitting the issue for odl-netvirt-openstack + odl-mdsal-apidocs as well.
That is when he raised the concern.
However we do not see the problem when we install both the features in one shot.
Is this already release noted? Or should we raise a separate JIRA?
Thanks,
Faseela

-----Original Message-----
From: Jamo Luhrsen [mailto:jluhrsen@...]
Sent: Thursday, December 14, 2017 8:47 PM
To: Rajarajan M <rajarajan.m@...>; Luis Gomez <ecelgp@...>; Michael Vorburger <vorburger@...>
Cc: Kitt, Stephen <skitt@...>; netconf-dev@...; aaa-dev@...; VIJI J <viji.j@...>; Faseela K <faseela.k@...>
Subject: Re: [Aaa-dev] ComponentDefinitionException: Error when instantiating bean provider of class org.opendaylight.aaa.impl.AAAShiroProvider

Rajarajan,

double check "feature:list -i" (listing installed features) after you install odl-netvirt-openstack. you are probably getting the restconf feature installed for you as it's a per-requisite for netvirt-openstack.

JamO

On 12/13/2017 09:59 PM, Rajarajan M wrote:
Hi Luis,

I have installed features one by one.

Initially I installed "odl-netvirt-openstack" and later I have installed "odl-restconf-all". I observed this issue after 2nd feature("odl-restconf-all") getting installed.

Today I will try to install both feature in single line and update you the same.

Thanks & Regards,
RajaRajan M

-----Original Message-----
From: Luis Gomez [mailto:ecelgp@...]
Sent: Thursday, December 14, 2017 4:36 AM
To: Michael Vorburger <vorburger@...>
Cc: VIJI J <viji.j@...>; aaa-dev@...;
Kitt, Stephen <skitt@...>; netconf-dev@...;
Rajarajan M <rajarajan.m@...>; Faseela K
<faseela.k@...>
Subject: Re: [Aaa-dev] ComponentDefinitionException: Error when
instantiating bean provider of class
org.opendaylight.aaa.impl.AAAShiroProvider

How are the features being installed? I am asking because since karaf 4 we do not support successive feature installation from karaf console as this can cause bundle restart and that is something most projects in ODL cannot handle today. I am not sure there is a release note for this but the workaround is to either: 1) use --no-auto-refresh in the consecutive feature install command as Michael points out, 2) list all the features you need in the karaf config boot file or 3) install all features at once in console, for example:

feature:install odl-restconf odl-netconf-mdsal odl-mdsal-apidocs
odl-clustering-test-app odl-netconf-topology

BR/Luis

On Dec 13, 2017, at 2:27 AM, Michael Vorburger <vorburger@...> wrote:

+ aaa-dev & skitt:

I've never seen this issue; I think you should open a JIRA about this, to track it.

If I had to guess, I would think what is happening here must be related to some refresh issue.. probably AAA get restarted when you do the 2nd feature installed, you could double check with feature:install -v.

But it look like it's not restartable, it's not happy - and that
"Caused by: net.sf.ehcache.ObjectExistsException: Cache tokens
already exist" error line is the interesting one; probably something
is already in the cache from the previous start, and did not get
removed on bundle stop, and so code is not expecting it to already be
there - kind of thing? (This is pure guess work; I'm not familiar
with AAA.)

The first question to decide here is: Do we want it to not restart, or do we want to make it cleanly restartable? I think the solution is the former (it should not restart; that's a mess).

You may (likely) be able to work around the problem using --no-auto-refresh in feature install.

https://jira.opendaylight.org/browse/CONTROLLER-1764 has problem which may be related. Stephen recently something related to that, but that's not in master yet. Perhaps that will fix this problem as well, when it's available.

Tx,
M.
--
Michael Vorburger, Red Hat
vorburger@... | IRC: vorburger @freenode | ~ =
http://vorburger.ch


On Wed, Dec 13, 2017 at 11:13 AM, VIJI J <viji.j@...> wrote:
Hi,



Providing karaf logs and bundle:diag for the issue.



opendaylight-user@root> feature:install odl-netvirt-openstack

opendaylight-user@root>

opendaylight-user@root>list | grep aaa

175 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-authn-api

176 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-cert

177 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-encrypt-service

178 | Active | 80 | 0.7.0.SNAPSHOT | org.opendaylight.aaa.aaa-filterchain

179 | Active | 80 | 0.7.0.SNAPSHOT | org.opendaylight.aaa.aaa-shiro

180 | Active | 80 | 0.7.0.SNAPSHOT | aaa-shiro-act

181 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-shiro-api

opendaylight-user@root>

opendaylight-user@root>feature:install odl-mdsal-apidocs

opendaylight-user@root>

opendaylight-user@root>list | grep aaa

175 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-authn-api

176 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-cert

177 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-encrypt-service

178 | Active | 80 | 0.7.0.SNAPSHOT | org.opendaylight.aaa.aaa-filterchain

179 | Failure | 80 | 0.7.0.SNAPSHOT | org.opendaylight.aaa.aaa-shiro

180 | Active | 80 | 0.7.0.SNAPSHOT | aaa-shiro-act

181 | Active | 80 | 0.7.0.SNAPSHOT | ODL :: aaa :: aaa-shiro-api

opendaylight-user@root>

opendaylight-user@root>

opendaylight-user@root>bundle:diag 179

org.opendaylight.aaa.aaa-shiro (179)

------------------------------------

Status: Failure

Blueprint

12/13/17 3:39 PM

Exception:

Error when instantiating bean provider of class
org.opendaylight.aaa.impl.AAAShiroProvider

org.osgi.service.blueprint.container.ComponentDefinitionException:
Error when instantiating bean provider of class
org.opendaylight.aaa.impl.AAAShiroProvider

at
org.apache.aries.blueprint.container.BeanRecipe.wrapAsCompDefEx(BeanR
ecipe.java:361)

at
org.apache.aries.blueprint.container.BeanRecipe.getInstanceFromStatic
Factory(BeanRecipe.java:331)

at
org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecip
e.java:280)

at
org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanR
ecipe.java:830)

at
org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRe
cipe.java:811)

at
org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.ja
va:79)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at
org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.ja
va:88)

at
org.apache.aries.blueprint.container.BlueprintRepository.createInstan
ces(BlueprintRepository.java:255)

at
org.apache.aries.blueprint.container.BlueprintRepository.createAll(Bl
ueprintRepository.java:186)

at
org.apache.aries.blueprint.container.BlueprintContainerImpl.instantia
teEagerComponents(BlueprintContainerImpl.java:724)

at
org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(Blu
eprintContainerImpl.java:411)

at
org.apache.aries.blueprint.container.BlueprintContainerImpl.run(Bluep
rintContainerImpl.java:276)

at
org.apache.aries.blueprint.container.BlueprintExtender.createContaine
r(BlueprintExtender.java:300)

at
org.apache.aries.blueprint.container.BlueprintExtender.createContaine
r(BlueprintExtender.java:269)

at
org.apache.aries.blueprint.container.BlueprintExtender.access$900(Blu
eprintExtender.java:68)

at
org.apache.aries.blueprint.container.BlueprintExtender$BlueprintConta
inerServiceImpl.createContainer(BlueprintExtender.java:602)

at
org.opendaylight.controller.blueprint.BlueprintBundleTracker.modified
Bundle(BlueprintBundleTracker.java:220)

at
org.opendaylight.controller.blueprint.BlueprintBundleTracker.addingBu
ndle(BlueprintBundleTracker.java:201)

at
org.opendaylight.controller.blueprint.BlueprintBundleTracker.addingBu
ndle(BlueprintBundleTracker.java:52)

at
org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTr
acker.java:469)

at
org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTr
acker.java:415)

at
org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.jav
a:256)

at
org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)

at
org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTrack
er.java:444)

at
org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(B
undleContextImpl.java:902)

at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventM
anager.java:230)

at
org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchr
onous(ListenerQueue.java:148)

at
org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBund
leEventPrivileged(EquinoxEventPublisher.java:165)

at
org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBund
leEvent(EquinoxEventPublisher.java:75)

at
org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBund
leEvent(EquinoxEventPublisher.java:67)

at
org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishMo
duleEvent(EquinoxContainerAdaptor.java:102)

at
org.eclipse.osgi.container.Module.publishEvent(Module.java:466)

at org.eclipse.osgi.container.Module.start(Module.java:457)

at
org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:
454)

at
org.eclipse.osgi.container.ModuleContainer.applyDelta(ModuleContainer
.java:717)

at
org.eclipse.osgi.container.ModuleContainer.resolveAndApply(ModuleCont
ainer.java:491)

at
org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.ja
va:437)

at
org.eclipse.osgi.container.ModuleContainer.refresh(ModuleContainer.ja
va:955)

at
org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEv
ent(ModuleContainer.java:1336)

at
org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEv
ent(ModuleContainer.java:1)

at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventM
anager.java:230)

at
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(Even
tManager.java:340)

Caused by: net.sf.ehcache.ObjectExistsException: Cache tokens already
exists

at
net.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java:1391)

at
net.sf.ehcache.CacheManager.addCache(CacheManager.java:1275)

at
net.sf.ehcache.CacheManager.addCache(CacheManager.java:1244)

at
org.opendaylight.aaa.impl.datastore.h2.H2TokenStore.<init>(H2TokenSto
re.java:36)

at
org.opendaylight.aaa.impl.AAAShiroProvider.<init>(AAAShiroProvider.ja
va:89)

at
org.opendaylight.aaa.impl.AAAShiroProvider.newInstance(AAAShiroProvid
er.java:172)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)

at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:62)

at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at
org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUti
ls.java:299)

at
org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.jav
a:980)

at
org.apache.aries.blueprint.container.BeanRecipe.getInstanceFromStatic
Factory(BeanRecipe.java:329)

... 41 more



Thanks,

Viji J





From: Faseela K
Sent: Wednesday, December 13, 2017 11:28 AM
To: Ryan Goulding <ryandgoulding@...>
Cc: netconf-dev@...; VIJI J <viji.j@...>;
Rajarajan M <rajarajan.m@...>; Michael Vorburger
<vorburger@...>
Subject: RE: ComponentDefinitionException: Error when instantiating
bean provider of class org.opendaylight.aaa.impl.AAAShiroProvider



+Viji, Raja, and Michael



From: Faseela K
Sent: Wednesday, December 13, 2017 12:55 AM
To: 'Ryan Goulding' <ryandgoulding@...>
Cc: 'netconf-dev@...'
<netconf-dev@...>
Subject: ComponentDefinitionException: Error when instantiating bean
provider of class org.opendaylight.aaa.impl.AAAShiroProvider



Hi,

Whenever I have two features, both of which has odl-restconf dependency, aaa does not come up properl.

I do see the below error I logs, I feel there is something wrong with the bundle refresh? Any pointers? Any one else hitting this issue?



2017-12-11 23:26:20,182 | ERROR | ffc-ac0e2b6783b3 | BlueprintContainerImpl | 13 - org.apache.aries.blueprint.core - 1.7.1 | Unable to start blueprint container for bundle org.opendaylight.aaa.shiro/0.7.0.SNAPSHOT

org.osgi.service.blueprint.container.ComponentDefinitionException:
Error when instantiating bean provider of class
org.opendaylight.aaa.impl.AAAShiroProvider

at
org.apache.aries.blueprint.container.BeanRecipe.wrapAsCompDefEx(BeanR
ecipe.java:361)[13:org.apache.aries.blueprint.core:1.7.1]

at
org.apache.aries.blueprint.container.BeanRecipe.getInstanceFromStatic
Factory(BeanRecipe.java:331)[13:org.apache.aries.blueprint.core:1.7.1
]

at
org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecip
e.java:280)[13:org.apache.aries.blueprint.core:1.7.1]

at
org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanR
ecipe.java:830)[13:org.apache.aries.blueprint.core:1.7.1]

at
org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRe
cipe.java:811)[13:org.apache.aries.blueprint.core:1.7.1]

at
org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.ja
va:79)[13:org.apache.aries.blueprint.core:1.7.1]

at
java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_92]

at
org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.ja
va:88)[13:org.apache.aries.blueprint.core:1.7.1]

at
org.apache.aries.blueprint.container.BlueprintRepository.createInstan
ces(BlueprintRepository.java:255)[13:org.apache.aries.blueprint.core:
1.7.1]

at
org.apache.aries.blueprint.container.BlueprintRepository.createAll(Bl
ueprintRepository.java:186)[13:org.apache.aries.blueprint.core:1.7.1]

at
org.apache.aries.blueprint.container.BlueprintContainerImpl.instantia
teEagerComponents(BlueprintContainerImpl.java:724)[13:org.apache.arie
s.blueprint.core:1.7.1]

at
org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(Blu
eprintContainerImpl.java:411)[13:org.apache.aries.blueprint.core:1.7.
1]

at
org.apache.aries.blueprint.container.BlueprintContainerImpl.run(Bluep
rintContainerImpl.java:276)[13:org.apache.aries.blueprint.core:1.7.1]

at
org.apache.aries.blueprint.container.BlueprintExtender.createContaine
r(BlueprintExtender.java:300)[13:org.apache.aries.blueprint.core:1.7.
1]

at
org.apache.aries.blueprint.container.BlueprintExtender.createContaine
r(BlueprintExtender.java:269)[13:org.apache.aries.blueprint.core:1.7.
1]

at
org.apache.aries.blueprint.container.BlueprintExtender.access$900(Blu
eprintExtender.java:68)[13:org.apache.aries.blueprint.core:1.7.1]

at
org.apache.aries.blueprint.container.BlueprintExtender$BlueprintConta
inerServiceImpl.createContainer(BlueprintExtender.java:602)[13:org.ap
ache.aries.blueprint.core:1.7.1]

at
org.opendaylight.controller.blueprint.BlueprintBundleTracker.modified
Bundle(BlueprintBundleTracker.java:220)[183:org.opendaylight.controll
er.blueprint:0.8.0.SNAPSHOT]

at
org.opendaylight.controller.blueprint.BlueprintBundleTracker.addingBu
ndle(BlueprintBundleTracker.java:201)[183:org.opendaylight.controller
.blueprint:0.8.0.SNAPSHOT]

at
org.opendaylight.controller.blueprint.BlueprintBundleTracker.addingBu
ndle(BlueprintBundleTracker.java:52)[183:org.opendaylight.controller.
blueprint:0.8.0.SNAPSHOT]

at
org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTr
acker.java:469)[org.osgi.core-6.0.0.jar:]

at
org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTr
acker.java:415)[org.osgi.core-6.0.0.jar:]

at
org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.jav
a:256)[org.osgi.core-6.0.0.jar:]

at
org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
[org.osgi.core-6.0.0.jar:]

at
org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTrack
er.java:444)[org.osgi.core-6.0.0.jar:]

at
org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(B
undleContextImpl.java:902)[org.eclipse.osgi-3.10.101.v20150820-1432.j
ar:]

at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventM
anager.java:230)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at
org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchr
onous(ListenerQueue.java:148)[org.eclipse.osgi-3.10.101.v20150820-143
2.jar:]

at
org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBund
leEventPrivileged(EquinoxEventPublisher.java:165)[org.eclipse.osgi-3.
10.101.v20150820-1432.jar:]

at
org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBund
leEvent(EquinoxEventPublisher.java:75)[org.eclipse.osgi-3.10.101.v201
50820-1432.jar:]

at
org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBund
leEvent(EquinoxEventPublisher.java:67)[org.eclipse.osgi-3.10.101.v201
50820-1432.jar:]

at
org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishMo
duleEvent(EquinoxContainerAdaptor.java:102)[org.eclipse.osgi-3.10.101
.v20150820-1432.jar:]

at
org.eclipse.osgi.container.Module.publishEvent(Module.java:466)[org.e
clipse.osgi-3.10.101.v20150820-1432.jar:]

at
org.eclipse.osgi.container.Module.start(Module.java:457)[org.eclipse.
osgi-3.10.101.v20150820-1432.jar:]

at
org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:
454)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at
org.eclipse.osgi.container.ModuleContainer.applyDelta(ModuleContainer
.java:717)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at
org.eclipse.osgi.container.ModuleContainer.resolveAndApply(ModuleCont
ainer.java:491)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

at
org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.ja
va:437)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]



Thanks,

Faseela




_______________________________________________
aaa-dev mailing list
aaa-dev@...
https://lists.opendaylight.org/mailman/listinfo/aaa-dev
_______________________________________________
aaa-dev mailing list
aaa-dev@...
https://lists.opendaylight.org/mailman/listinfo/aaa-dev


Luis Gomez
 

On Dec 14, 2017, at 9:55 AM, Luis Gomez <ecelgp@...> wrote:

Yeah, I cannot find anything in current Nitrogen release notes so I will add this info in the distribution section.

On Dec 14, 2017, at 8:20 AM, Jamo Luhrsen <jluhrsen@...> wrote:

I'm not sure about this being release noted or not. Maybe raise a JIRA against
INTDIST and they can close it if we do have release notes.

Luis may know for certain.

JamO

On 12/14/2017 08:14 AM, Faseela K wrote:
Jamo,
Raja was hitting the issue for odl-netvirt-openstack + odl-mdsal-apidocs as well.
That is when he raised the concern.
However we do not see the problem when we install both the features in one shot.
Is this already release noted? Or should we raise a separate JIRA?
Thanks,
Faseela

-----Original Message-----
From: Jamo Luhrsen [mailto:jluhrsen@...]
Sent: Thursday, December 14, 2017 8:47 PM
To: Rajarajan M <rajarajan.m@...>; Luis Gomez <ecelgp@...>; Michael Vorburger <vorburger@...>
Cc: Kitt, Stephen <skitt@...>; netconf-dev@...; aaa-dev@...; VIJI J <viji.j@...>; Faseela K <faseela.k@...>
Subject: Re: [Aaa-dev] ComponentDefinitionException: Error when instantiating bean provider of class org.opendaylight.aaa.impl.AAAShiroProvider

Rajarajan,

double check "feature:list -i" (listing installed features) after you install odl-netvirt-openstack. you are probably getting the restconf feature installed for you as it's a per-requisite for netvirt-openstack.

JamO

On 12/13/2017 09:59 PM, Rajarajan M wrote:
Hi Luis,

   I have installed features one by one.

   Initially I installed "odl-netvirt-openstack" and later I have installed "odl-restconf-all". I observed this issue after 2nd feature("odl-restconf-all") getting installed.

    Today I will try to install both feature in single line and update you the same.

Thanks & Regards,
RajaRajan M

-----Original Message-----
From: Luis Gomez [mailto:ecelgp@...]
Sent: Thursday, December 14, 2017 4:36 AM
To: Michael Vorburger <vorburger@...>
Cc: VIJI J <viji.j@...>; aaa-dev@...;
Kitt, Stephen <skitt@...>; netconf-dev@...;
Rajarajan M <rajarajan.m@...>; Faseela K
<faseela.k@...>
Subject: Re: [Aaa-dev] ComponentDefinitionException: Error when
instantiating bean provider of class
org.opendaylight.aaa.impl.AAAShiroProvider

How are the features being installed? I am asking because since karaf 4 we do not support successive feature installation from karaf console as this can cause bundle restart and that is something most projects in ODL cannot handle today. I am not sure there is a release note for this but the workaround is to either: 1) use --no-auto-refresh in the consecutive feature install command as Michael points out, 2) list all the features you need in the karaf config boot file or 3) install all features at once in console, for example:

feature:install odl-restconf odl-netconf-mdsal odl-mdsal-apidocs
odl-clustering-test-app odl-netconf-topology

BR/Luis

On Dec 13, 2017, at 2:27 AM, Michael Vorburger <vorburger@...> wrote:

+ aaa-dev & skitt:

I've never seen this issue; I think you should open a JIRA about this, to track it.

If I had to guess, I would think what is happening here must be related to some refresh issue.. probably AAA get restarted when you do the 2nd feature installed, you could double check with feature:install -v.

But it look like it's not restartable, it's not happy - and that
"Caused by: net.sf.ehcache.ObjectExistsException: Cache tokens
already exist" error line is the interesting one; probably something
is already in the cache from the previous start, and did not get
removed on bundle stop, and so code is not expecting it to already be
there - kind of thing? (This is pure guess work; I'm not familiar
with AAA.)

The first question to decide here is: Do we want it to not restart, or do we want to make it cleanly restartable? I think the solution is the former (it should not restart; that's a mess).

You may (likely) be able to work around the problem using --no-auto-refresh in feature install.

https://jira.opendaylight.org/browse/CONTROLLER-1764 has problem which may be related. Stephen recently something related to that, but that's not in master yet. Perhaps that will fix this problem as well, when it's available.

Tx,
M.
--
Michael Vorburger, Red Hat
vorburger@... | IRC: vorburger @freenode | ~ =
http://vorburger.ch


On Wed, Dec 13, 2017 at 11:13 AM, VIJI J <viji.j@...> wrote:
Hi,



Providing karaf logs and bundle:diag for the issue.



opendaylight-user@root> feature:install odl-netvirt-openstack

opendaylight-user@root>

opendaylight-user@root>list | grep aaa

175 | Active   |  80 | 0.7.0.SNAPSHOT                      | ODL :: aaa :: aaa-authn-api

176 | Active   |  80 | 0.7.0.SNAPSHOT                      | ODL :: aaa :: aaa-cert

177 | Active   |  80 | 0.7.0.SNAPSHOT                      | ODL :: aaa :: aaa-encrypt-service

178 | Active   |  80 | 0.7.0.SNAPSHOT                      | org.opendaylight.aaa.aaa-filterchain

179 | Active   |  80 | 0.7.0.SNAPSHOT                      | org.opendaylight.aaa.aaa-shiro

180 | Active   |  80 | 0.7.0.SNAPSHOT                      | aaa-shiro-act

181 | Active   |  80 | 0.7.0.SNAPSHOT                      | ODL :: aaa :: aaa-shiro-api

opendaylight-user@root>

opendaylight-user@root>feature:install odl-mdsal-apidocs

opendaylight-user@root>

opendaylight-user@root>list | grep aaa

175 | Active      |  80 | 0.7.0.SNAPSHOT                      | ODL :: aaa :: aaa-authn-api

176 | Active      |  80 | 0.7.0.SNAPSHOT                      | ODL :: aaa :: aaa-cert

177 | Active      |  80 | 0.7.0.SNAPSHOT                      | ODL :: aaa :: aaa-encrypt-service

178 | Active      |  80 | 0.7.0.SNAPSHOT                      | org.opendaylight.aaa.aaa-filterchain

179 | Failure     |  80 | 0.7.0.SNAPSHOT                      | org.opendaylight.aaa.aaa-shiro

180 | Active      |  80 | 0.7.0.SNAPSHOT                      | aaa-shiro-act

181 | Active      |  80 | 0.7.0.SNAPSHOT                      | ODL :: aaa :: aaa-shiro-api

opendaylight-user@root>

opendaylight-user@root>

opendaylight-user@root>bundle:diag 179

org.opendaylight.aaa.aaa-shiro (179)

------------------------------------

Status: Failure

Blueprint

12/13/17 3:39 PM

Exception:

Error when instantiating bean provider of class
org.opendaylight.aaa.impl.AAAShiroProvider

org.osgi.service.blueprint.container.ComponentDefinitionException:
Error when instantiating bean provider of class
org.opendaylight.aaa.impl.AAAShiroProvider

      at
org.apache.aries.blueprint.container.BeanRecipe.wrapAsCompDefEx(BeanR
ecipe.java:361)

     at
org.apache.aries.blueprint.container.BeanRecipe.getInstanceFromStatic
Factory(BeanRecipe.java:331)

      at
org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecip
e.java:280)

      at
org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanR
ecipe.java:830)

      at
org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRe
cipe.java:811)

      at
org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.ja
va:79)

      at java.util.concurrent.FutureTask.run(FutureTask.java:266)

      at
org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.ja
va:88)

      at
org.apache.aries.blueprint.container.BlueprintRepository.createInstan
ces(BlueprintRepository.java:255)

      at
org.apache.aries.blueprint.container.BlueprintRepository.createAll(Bl
ueprintRepository.java:186)

      at
org.apache.aries.blueprint.container.BlueprintContainerImpl.instantia
teEagerComponents(BlueprintContainerImpl.java:724)

      at
org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(Blu
eprintContainerImpl.java:411)

      at
org.apache.aries.blueprint.container.BlueprintContainerImpl.run(Bluep
rintContainerImpl.java:276)

      at
org.apache.aries.blueprint.container.BlueprintExtender.createContaine
r(BlueprintExtender.java:300)

      at
org.apache.aries.blueprint.container.BlueprintExtender.createContaine
r(BlueprintExtender.java:269)

      at
org.apache.aries.blueprint.container.BlueprintExtender.access$900(Blu
eprintExtender.java:68)

      at
org.apache.aries.blueprint.container.BlueprintExtender$BlueprintConta
inerServiceImpl.createContainer(BlueprintExtender.java:602)

      at
org.opendaylight.controller.blueprint.BlueprintBundleTracker.modified
Bundle(BlueprintBundleTracker.java:220)

      at
org.opendaylight.controller.blueprint.BlueprintBundleTracker.addingBu
ndle(BlueprintBundleTracker.java:201)

      at
org.opendaylight.controller.blueprint.BlueprintBundleTracker.addingBu
ndle(BlueprintBundleTracker.java:52)

      at
org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTr
acker.java:469)

      at
org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTr
acker.java:415)

      at
org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.jav
a:256)

      at
org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)

      at
org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTrack
er.java:444)

      at
org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(B
undleContextImpl.java:902)

      at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventM
anager.java:230)

      at
org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchr
onous(ListenerQueue.java:148)

      at
org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBund
leEventPrivileged(EquinoxEventPublisher.java:165)

      at
org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBund
leEvent(EquinoxEventPublisher.java:75)

      at
org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBund
leEvent(EquinoxEventPublisher.java:67)

      at
org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishMo
duleEvent(EquinoxContainerAdaptor.java:102)

      at
org.eclipse.osgi.container.Module.publishEvent(Module.java:466)

      at org.eclipse.osgi.container.Module.start(Module.java:457)

      at
org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:
454)

      at
org.eclipse.osgi.container.ModuleContainer.applyDelta(ModuleContainer
.java:717)

      at
org.eclipse.osgi.container.ModuleContainer.resolveAndApply(ModuleCont
ainer.java:491)

      at
org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.ja
va:437)

      at
org.eclipse.osgi.container.ModuleContainer.refresh(ModuleContainer.ja
va:955)

      at
org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEv
ent(ModuleContainer.java:1336)

      at
org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEv
ent(ModuleContainer.java:1)

      at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventM
anager.java:230)

      at
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(Even
tManager.java:340)

Caused by: net.sf.ehcache.ObjectExistsException: Cache tokens already
exists

      at
net.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java:1391)

      at
net.sf.ehcache.CacheManager.addCache(CacheManager.java:1275)

      at
net.sf.ehcache.CacheManager.addCache(CacheManager.java:1244)

      at
org.opendaylight.aaa.impl.datastore.h2.H2TokenStore.<init>(H2TokenSto
re.java:36)

      at
org.opendaylight.aaa.impl.AAAShiroProvider.<init>(AAAShiroProvider.ja
va:89)

      at
org.opendaylight.aaa.impl.AAAShiroProvider.newInstance(AAAShiroProvid
er.java:172)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)

      at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:62)

      at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)

      at java.lang.reflect.Method.invoke(Method.java:498)

      at
org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUti
ls.java:299)

      at
org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.jav
a:980)

      at
org.apache.aries.blueprint.container.BeanRecipe.getInstanceFromStatic
Factory(BeanRecipe.java:329)

      ... 41 more



Thanks,

Viji J





From: Faseela K
Sent: Wednesday, December 13, 2017 11:28 AM
To: Ryan Goulding <ryandgoulding@...>
Cc: netconf-dev@...; VIJI J <viji.j@...>;
Rajarajan M <rajarajan.m@...>; Michael Vorburger
<vorburger@...>
Subject: RE: ComponentDefinitionException: Error when instantiating
bean provider of class org.opendaylight.aaa.impl.AAAShiroProvider



+Viji, Raja, and Michael



From: Faseela K
Sent: Wednesday, December 13, 2017 12:55 AM
To: 'Ryan Goulding' <ryandgoulding@...>
Cc: 'netconf-dev@...'
<netconf-dev@...>
Subject: ComponentDefinitionException: Error when instantiating bean
provider of class org.opendaylight.aaa.impl.AAAShiroProvider



Hi,

Whenever I have two features, both of which has odl-restconf dependency, aaa does not come up properl.

I do see the below error I logs, I feel there is something wrong with the bundle refresh? Any pointers? Any one else hitting this issue?



2017-12-11 23:26:20,182 | ERROR | ffc-ac0e2b6783b3 | BlueprintContainerImpl           | 13 - org.apache.aries.blueprint.core - 1.7.1 | Unable to start blueprint container for bundle org.opendaylight.aaa.shiro/0.7.0.SNAPSHOT

org.osgi.service.blueprint.container.ComponentDefinitionException:
Error when instantiating bean provider of class
org.opendaylight.aaa.impl.AAAShiroProvider

      at
org.apache.aries.blueprint.container.BeanRecipe.wrapAsCompDefEx(BeanR
ecipe.java:361)[13:org.apache.aries.blueprint.core:1.7.1]

      at
org.apache.aries.blueprint.container.BeanRecipe.getInstanceFromStatic
Factory(BeanRecipe.java:331)[13:org.apache.aries.blueprint.core:1.7.1
]

      at
org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecip
e.java:280)[13:org.apache.aries.blueprint.core:1.7.1]

      at
org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanR
ecipe.java:830)[13:org.apache.aries.blueprint.core:1.7.1]

      at
org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRe
cipe.java:811)[13:org.apache.aries.blueprint.core:1.7.1]

      at
org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.ja
va:79)[13:org.apache.aries.blueprint.core:1.7.1]

      at
java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_92]

      at
org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.ja
va:88)[13:org.apache.aries.blueprint.core:1.7.1]

      at
org.apache.aries.blueprint.container.BlueprintRepository.createInstan
ces(BlueprintRepository.java:255)[13:org.apache.aries.blueprint.core:
1.7.1]

      at
org.apache.aries.blueprint.container.BlueprintRepository.createAll(Bl
ueprintRepository.java:186)[13:org.apache.aries.blueprint.core:1.7.1]

      at
org.apache.aries.blueprint.container.BlueprintContainerImpl.instantia
teEagerComponents(BlueprintContainerImpl.java:724)[13:org.apache.arie
s.blueprint.core:1.7.1]

      at
org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(Blu
eprintContainerImpl.java:411)[13:org.apache.aries.blueprint.core:1.7.
1]

      at
org.apache.aries.blueprint.container.BlueprintContainerImpl.run(Bluep
rintContainerImpl.java:276)[13:org.apache.aries.blueprint.core:1.7.1]

      at
org.apache.aries.blueprint.container.BlueprintExtender.createContaine
r(BlueprintExtender.java:300)[13:org.apache.aries.blueprint.core:1.7.
1]

      at
org.apache.aries.blueprint.container.BlueprintExtender.createContaine
r(BlueprintExtender.java:269)[13:org.apache.aries.blueprint.core:1.7.
1]

      at
org.apache.aries.blueprint.container.BlueprintExtender.access$900(Blu
eprintExtender.java:68)[13:org.apache.aries.blueprint.core:1.7.1]

      at
org.apache.aries.blueprint.container.BlueprintExtender$BlueprintConta
inerServiceImpl.createContainer(BlueprintExtender.java:602)[13:org.ap
ache.aries.blueprint.core:1.7.1]

      at
org.opendaylight.controller.blueprint.BlueprintBundleTracker.modified
Bundle(BlueprintBundleTracker.java:220)[183:org.opendaylight.controll
er.blueprint:0.8.0.SNAPSHOT]

      at
org.opendaylight.controller.blueprint.BlueprintBundleTracker.addingBu
ndle(BlueprintBundleTracker.java:201)[183:org.opendaylight.controller
.blueprint:0.8.0.SNAPSHOT]

      at
org.opendaylight.controller.blueprint.BlueprintBundleTracker.addingBu
ndle(BlueprintBundleTracker.java:52)[183:org.opendaylight.controller.
blueprint:0.8.0.SNAPSHOT]

      at
org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTr
acker.java:469)[org.osgi.core-6.0.0.jar:]

      at
org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTr
acker.java:415)[org.osgi.core-6.0.0.jar:]

      at
org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.jav
a:256)[org.osgi.core-6.0.0.jar:]

      at
org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
[org.osgi.core-6.0.0.jar:]

      at
org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTrack
er.java:444)[org.osgi.core-6.0.0.jar:]

      at
org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(B
undleContextImpl.java:902)[org.eclipse.osgi-3.10.101.v20150820-1432.j
ar:]

      at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventM
anager.java:230)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

      at
org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchr
onous(ListenerQueue.java:148)[org.eclipse.osgi-3.10.101.v20150820-143
2.jar:]

      at
org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBund
leEventPrivileged(EquinoxEventPublisher.java:165)[org.eclipse.osgi-3.
10.101.v20150820-1432.jar:]

      at
org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBund
leEvent(EquinoxEventPublisher.java:75)[org.eclipse.osgi-3.10.101.v201
50820-1432.jar:]

      at
org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBund
leEvent(EquinoxEventPublisher.java:67)[org.eclipse.osgi-3.10.101.v201
50820-1432.jar:]

      at
org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishMo
duleEvent(EquinoxContainerAdaptor.java:102)[org.eclipse.osgi-3.10.101
.v20150820-1432.jar:]

      at
org.eclipse.osgi.container.Module.publishEvent(Module.java:466)[org.e
clipse.osgi-3.10.101.v20150820-1432.jar:]

      at
org.eclipse.osgi.container.Module.start(Module.java:457)[org.eclipse.
osgi-3.10.101.v20150820-1432.jar:]

      at
org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:
454)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

      at
org.eclipse.osgi.container.ModuleContainer.applyDelta(ModuleContainer
.java:717)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

      at
org.eclipse.osgi.container.ModuleContainer.resolveAndApply(ModuleCont
ainer.java:491)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

      at
org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.ja
va:437)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]



Thanks,

Faseela




_______________________________________________
aaa-dev mailing list
aaa-dev@...
https://lists.opendaylight.org/mailman/listinfo/aaa-dev

_______________________________________________
aaa-dev mailing list
aaa-dev@...
https://lists.opendaylight.org/mailman/listinfo/aaa-dev