GitHub user aledsage opened a pull request:

    https://github.com/apache/brooklyn-server/pull/253

    catalog-classes.bom: don’t specify bundle id/version

    As discussed with @neykov and @Graeme-Miller 
    
    Previously the `catalog-classes.bom` included the Brooklyn version number 
in which the bundles are to be found. This works well when installing and using 
Brooklyn, but these bundle version numbers make their way into the persisted 
state.
    
    After upgrading Brooklyn and restarting, it uses the existing persisted 
state. The bundle with the old Brooklyn version is not in this new karaf 
install, so it fails with the exception below:
    
    ```
    14:30:50,959 WARN  102 internal.CatalogInitialization [nager-HYVJ5hka-0] 
Error populating catalog (rethrowing): java.lang.IllegalStateException: Bundle 
from null failed to install: Bundle CatalogBundleDto{symbolicName=or
    g.apache.brooklyn.core, version=0.10.0.20160711_1846, url=null} not 
previously registered, but URL is empty.
    java.lang.IllegalStateException: Bundle from null failed to install: Bundle 
CatalogBundleDto{symbolicName=org.apache.brooklyn.core, 
version=0.10.0.20160711_1846, url=null} not previously registered, but URL is 
empty.
            at 
org.apache.brooklyn.core.mgmt.ha.OsgiManager.registerBundle(OsgiManager.java:122)[102:org.apache.brooklyn.core:0.10.0.20160712_1338]
            at 
org.apache.brooklyn.core.catalog.internal.CatalogUtils.installLibraries(CatalogUtils.java:160)[102:org.apache.brooklyn.core:0.10.0.20160712_1338]
            at 
org.apache.brooklyn.core.catalog.internal.CatalogDo.loadCatalogItems(CatalogDo.java:138)[102:org.apache.brooklyn.core:0.10.0.20160712_1338]
            at 
org.apache.brooklyn.core.catalog.internal.CatalogDo.loadThisCatalog(CatalogDo.java:115)[102:org.apache.brooklyn.core:0.10.0.20160712_1338]
            at 
org.apache.brooklyn.core.catalog.internal.CatalogDo.load(CatalogDo.java:98)[102:org.apache.brooklyn.core:0.10.0.20160712_1338]
            at 
org.apache.brooklyn.core.catalog.internal.BasicBrooklynCatalog.reset(BasicBrooklynCatalog.java:140)[102:org.apache.brooklyn.core:0.10.0.20160712_1338]
            at 
org.apache.brooklyn.core.catalog.internal.BasicBrooklynCatalog.reset(BasicBrooklynCatalog.java:127)[102:org.apache.brooklyn.core:0.10.0.20160712_1338]
            at 
org.apache.brooklyn.core.catalog.internal.BasicBrooklynCatalog.reset(BasicBrooklynCatalog.java:177)[102:org.apache.brooklyn.core:0.10.0.20160712_1338]
            at 
org.apache.brooklyn.core.catalog.internal.CatalogInitialization.populateCatalogImpl(CatalogInitialization.java:228)[102:org.apache.brooklyn.core:0.10.0.20160712_1338]
            at 
org.apache.brooklyn.core.catalog.internal.CatalogInitialization.populateCatalog(CatalogInitialization.java:199)[102:org.apache.brooklyn.core:0.10.0.20160712_1338]
            at 
org.apache.brooklyn.core.mgmt.rebind.RebindIteration.rebuildCatalog(RebindIteration.java:423)[102:org.apache.brooklyn.core:0.10.0.20160712_1338]
            at 
org.apache.brooklyn.core.mgmt.rebind.RebindIteration.doRun(RebindIteration.java:239)[102:org.apache.brooklyn.core:0.10.0.20160712_1338]
            at 
org.apache.brooklyn.core.mgmt.rebind.InitialFullRebindIteration.doRun(InitialFullRebindIteration.java:69)[102:org.apache.brooklyn.core:0.10.0.20160712_1338]
            at 
org.apache.brooklyn.core.mgmt.rebind.RebindIteration.run(RebindIteration.java:266)[102:org.apache.brooklyn.core:0.10.0.20160712_1338]
            at 
org.apache.brooklyn.core.mgmt.rebind.RebindManagerImpl.rebindImpl(RebindManagerImpl.java:558)[102:org.apache.brooklyn.core:0.10.0.20160712_1338]
            at 
org.apache.brooklyn.core.mgmt.rebind.RebindManagerImpl$3.call(RebindManagerImpl.java:508)[102:org.apache.brooklyn.core:0.10.0.20160712_1338]
            at 
org.apache.brooklyn.core.mgmt.rebind.RebindManagerImpl$3.call(RebindManagerImpl.java:506)[102:org.apache.brooklyn.core:0.10.0.20160712_1338]
            at 
org.apache.brooklyn.util.core.task.BasicExecutionManager$SubmissionCallable.call(BasicExecutionManager.java:519)[102:org.apache.brooklyn.core:0.10.0.20160712_1338]
            at 
java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_91]
            at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_91]
            at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_91]
            at java.lang.Thread.run(Thread.java:745)[:1.8.0_91]
    Caused by: java.lang.IllegalStateException: Bundle 
CatalogBundleDto{symbolicName=org.apache.brooklyn.core, 
version=0.10.0.20160711_1846, url=null} not previously registered, but URL is 
empty.
            at 
org.apache.brooklyn.core.mgmt.ha.OsgiManager.checkBundleInstalledThrowIfInconsistent(OsgiManager.java:168)[102:org.apache.brooklyn.core:0.10.0.20160712_1338]
            at 
org.apache.brooklyn.core.mgmt.ha.OsgiManager.registerBundle(OsgiManager.java:113)[102:org.apache.brooklyn.core:0.10.0.20160712_1338]
            ... 21 more
    ```


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/aledsage/brooklyn-server 
fix/catalog-classes-not-specify-bundle-version

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/brooklyn-server/pull/253.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #253
    
----
commit 06df559eb743d6b3fc97b27a4ba21616d7202121
Author: Aled Sage <[email protected]>
Date:   2016-07-12T19:08:57Z

    catalog-classes.bom: don’t specify bundle id/version

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to