brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Heneveld (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (BROOKLYN-539) ClassCastExceptions on rebind (trying to persist catalog items)
Date Fri, 22 Sep 2017 12:25:00 GMT

    [ https://issues.apache.org/jira/browse/BROOKLYN-539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16176335#comment-16176335
] 

Alex Heneveld commented on BROOKLYN-539:
----------------------------------------

Correct, there is no need to persist types that come from bundles.  Persistence of catalog
is only needed for legacy items.

Curious why it is (now) trying to persist this (and others).

> ClassCastExceptions on rebind (trying to persist catalog items)
> ---------------------------------------------------------------
>
>                 Key: BROOKLYN-539
>                 URL: https://issues.apache.org/jira/browse/BROOKLYN-539
>             Project: Brooklyn
>          Issue Type: Bug
>            Reporter: Aled Sage
>
> With bleeding edge 0.12.0-SNAPSHOT, I started Brooklyn (in Karaf mode), then stopped
it and restarted it again.
> On rebind, I see exceptions like that below many times in the info log. I think it's
logged once per item in the catalog.
> {noformat}
> 2017-09-20T11:42:36,406 WARN  122 o.a.b.c.m.r.PersistenceExceptionHandlerImpl [FelixStartLevel]
Problem persisting (ignoring): generate memento for CATALOG_ITEM org.apache.brooklyn.core.typereg.RegisteredTypes$CatalogItemFromRegisteredType
> (pr-128-top-level:1.0.0)
> java.lang.ClassCastException: org.apache.brooklyn.core.typereg.RegisteredTypes$CatalogItemFromRegisteredType
cannot be cast to org.apache.brooklyn.core.objs.BrooklynObjectInternal
>         at org.apache.brooklyn.core.mgmt.rebind.PeriodicDeltaChangeListener.persistNowInternal(PeriodicDeltaChangeListener.java:454)
[122:org.apache.brooklyn.core:0.12.0.SNAPSHOT]
>         at org.apache.brooklyn.core.mgmt.rebind.PeriodicDeltaChangeListener.persistNowSafely(PeriodicDeltaChangeListener.java:379)
[122:org.apache.brooklyn.core:0.12.0.SNAPSHOT]
>         at org.apache.brooklyn.core.mgmt.rebind.PeriodicDeltaChangeListener.persistNowSafely(PeriodicDeltaChangeListener.java:373)
[122:org.apache.brooklyn.core:0.12.0.SNAPSHOT]
>         at org.apache.brooklyn.core.mgmt.rebind.RebindManagerImpl.forcePersistNow(RebindManagerImpl.java:476)
[122:org.apache.brooklyn.core:0.12.0.SNAPSHOT]
>         at org.apache.brooklyn.launcher.common.BasicLauncher.persist(BasicLauncher.java:434)
[126:org.apache.brooklyn.launcher-common:0.12.0.SNAPSHOT]
>         at org.apache.brooklyn.launcher.common.BasicLauncher.startPartTwo(BasicLauncher.java:426)
[126:org.apache.brooklyn.launcher-common:0.12.0.SNAPSHOT]
>         at org.apache.brooklyn.launcher.osgi.OsgiLauncherImpl.startOsgi(OsgiLauncherImpl.java:116)
[333:org.apache.brooklyn.karaf-init:0.12.0.SNAPSHOT]
>         at Proxy5b14e94c_cf63_4a4e_a22b_a2fdda9c9134.startOsgi(Unknown Source) [?:?]
>         at org.apache.brooklyn.launcher.osgi.start.OsgiLauncherCompleter.init(OsgiLauncherCompleter.java:36)
[335:org.apache.brooklyn.karaf-start:0.12.0.SNAPSHOT]
>         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)
[15:org.apache.aries.blueprint.core:1.8.2]
>         at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:980)
[15:org.apache.aries.blueprint.core:1.8.2]
>         at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:736)
[15:org.apache.aries.blueprint.core:1.8.2]
>         at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:848)
[15:org.apache.aries.blueprint.core:1.8.2]
>         at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:811)
[15:org.apache.aries.blueprint.core:1.8.2]
>         at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)
[15:org.apache.aries.blueprint.core:1.8.2]
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
>         at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)
[15:org.apache.aries.blueprint.core:1.8.2]
>         at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:255)
[15:org.apache.aries.blueprint.core:1.8.2]
>         at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:186)
[15:org.apache.aries.blueprint.core:1.8.2]
>         at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:704)
[15:org.apache.aries.blueprint.core:1.8.2]
>         at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:410)
[15:org.apache.aries.blueprint.core:1.8.2]
>         at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:275)
[15:org.apache.aries.blueprint.core:1.8.2]
>         at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:300)
[15:org.apache.aries.blueprint.core:1.8.2]
>         at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:269)
[15:org.apache.aries.blueprint.core:1.8.2]
>         at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:265)
[15:org.apache.aries.blueprint.core:1.8.2]
>         at org.apache.aries.blueprint.container.BlueprintExtender.modifiedBundle(BlueprintExtender.java:255)
[15:org.apache.aries.blueprint.core:1.8.2]
>         at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:500)
[15:org.apache.aries.blueprint.core:1.8.2]
>         at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:433)
[15:org.apache.aries.blueprint.core:1.8.2]
>         at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.track(BundleHookBundleTracker.java:725)
[15:org.apache.aries.blueprint.core:1.8.2]
>         at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.bundleChanged(BundleHookBundleTracker.java:463)
[15:org.apache.aries.blueprint.core:1.8.2]
>         at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$BundleEventHook.event(BundleHookBundleTracker.java:422)
[15:org.apache.aries.blueprint.core:1.8.2]
>         at org.apache.felix.framework.util.SecureAction.invokeBundleEventHook(SecureAction.java:1179)
[?:?]
>         at org.apache.felix.framework.EventDispatcher.createWhitelistFromHooks(EventDispatcher.java:730)
[?:?]
>         at org.apache.felix.framework.EventDispatcher.fireBundleEvent(EventDispatcher.java:485)
[?:?]
>         at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4563) [?:?]
>         at org.apache.felix.framework.Felix.startBundle(Felix.java:2173) [?:?]
>         at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1372) [?:?]
>         at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
[?:?]
>         at java.lang.Thread.run(Thread.java:748) [?:?]
> {noformat}
> I added a breakpoint to find out where it was requesting that the offending item be persisted.
The {{CatalogTypes$CatalogItemFromRegistredType}} instance is wrapping a {{BasicRegisteredType[org.apache.brooklyn.entity.group.QuarantineGroup:5.0.0-SNAPSHOT;null]}}.
Stacktrace below:
> {noformat}
> Daemon Thread [brooklyn-execmanager-i4bfeoG9-0] (Suspended (breakpoint at line 125 in
PeriodicDeltaChangeListener$DeltaCollector))	
> 	owns: PeriodicDeltaChangeListener  (id=284)	
> 	owns: Object  (id=285)	
> 	PeriodicDeltaChangeListener$DeltaCollector.add(BrooklynObject) line: 125	
> 	PeriodicDeltaChangeListener.onChanged(BrooklynObject) line: 541	
> 	PeriodicDeltaChangeListener.onManaged(BrooklynObject) line: 516	
> 	RebindManagerImpl$SafeChangeListener.onManaged(BrooklynObject) line: 643	
> 	BasicBrooklynCatalog.reset(CatalogDto, boolean) line: 233	
> 	BasicBrooklynCatalog.reset(CatalogDto) line: 191	
> 	BasicBrooklynCatalog.reset(Collection<CatalogItem<?,?>>) line: 244	
> 	CatalogInitialization.populateCatalogImpl(BasicBrooklynCatalog, boolean, boolean, Collection<CatalogItem<?,?>>)
line: 228	
> 	CatalogInitialization.populateCatalog(ManagementNodeState, boolean, boolean, Collection<CatalogItem<?,?>>)
line: 199	
> 	InitialFullRebindIteration(RebindIteration).installBundlesAndRebuildCatalog() line:
473	
> 	InitialFullRebindIteration(RebindIteration).doRun() line: 255	
> 	InitialFullRebindIteration.doRun() line: 69	
> 	InitialFullRebindIteration(RebindIteration).run() line: 282	
> 	RebindManagerImpl.rebindImpl(ClassLoader, RebindExceptionHandler, ManagementNodeState)
line: 575	
> 	RebindManagerImpl$3.call() line: 525	
> 	RebindManagerImpl$3.call() line: 523	
> 	BasicExecutionManager$SubmissionCallable<T>.call() line: 529	
> 	FutureTask<V>.run() line: 266	
> 	ThreadPoolExecutor.runWorker(ThreadPoolExecutor$Worker) line: 1149	
> 	ThreadPoolExecutor$Worker.run() line: 624	
> 	Thread.run() line: 748	
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message