Github user rdowner commented on the pull request:
https://github.com/apache/incubator-brooklyn/pull/1018#issuecomment-155745923
@neykov I saw a problem if I modified `LocalManagementContext.getConfig()`
to do the resolution. If this method returns something that is not the original
`configMap` - even if it is an identical copy (such as by replacing the method
body with `return BrooklynProperties.Factory.newEmpty().addFrom(configMap);`)
then I got this exception during launch:
```
2015-11-11 11:10:20,534 WARN Error importing catalog from
classpath:/brooklyn/default.catalog.bom:
org.apache.brooklyn.util.exceptions.CompoundRuntimeException: Could not resolve
item server, 2 errors including: Transformer for Brooklyn OASIS CAMP
interpreter gave an error creating this plan: No CAMP Platform is registered
with this Brooklyn management context.
org.apache.brooklyn.util.exceptions.CompoundRuntimeException: Could not
resolve item server, 2 errors including: Transformer for Brooklyn OASIS CAMP
interpreter gave an error creating this plan: No CAMP Platform is registered
with this Brooklyn management context.
at
org.apache.brooklyn.util.exceptions.Exceptions.create(Exceptions.java:306)
~[org.apache.brooklyn-brooklyn-utils-common-0.9.0-SNAPSHOT.jar:0.9.0-SNAPSHOT]
Caused by: java.lang.IllegalStateException: Transformer for Brooklyn OASIS
CAMP interpreter gave an error creating this plan: No CAMP Platform is
registered with this Brooklyn management context.
at
org.apache.brooklyn.util.guava.IllegalStateExceptionSupplier.get(IllegalStateExceptionSupplier.java:52)
~[org.apache.brooklyn-brooklyn-utils-common-0.9.0-SNAPSHOT.jar:0.9.0-SNAPSHOT]
Caused by: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException:
at
org.apache.brooklyn.util.exceptions.Exceptions.create(Exceptions.java:298)
~[org.apache.brooklyn-brooklyn-utils-common-0.9.0-SNAPSHOT.jar:0.9.0-SNAPSHOT]
Caused by: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException:
Transformer for Brooklyn OASIS CAMP interpreter gave an error creating this
plan: No CAMP Platform is registered with this Brooklyn management context.
at
org.apache.brooklyn.core.plan.PlanToSpecFactory.attemptWithLoaders(PlanToSpecFactory.java:110)
~[org.apache.brooklyn-brooklyn-core-0.9.0-SNAPSHOT.jar:0.9.0-SNAPSHOT]
Caused by: java.lang.IllegalStateException: No CAMP Platform is registered
with this Brooklyn management context.
at
org.apache.brooklyn.camp.brooklyn.spi.creation.CampUtils.getCampPlatform(CampUtils.java:217)
~[org.apache.brooklyn-brooklyn-camp-0.9.0-SNAPSHOT.jar:0.9.0-SNAPSHOT]
```
Interestingly if I modify the method to use a MemoizedSupplier - meaning
that it will consistently return the same object - the error disappears. This
suggests that there is something that gets upset if `getConfig()` returns a
different object, even if the contents are the same.
[A thought occurs to me. Is something *modifying* the config object that is
returned?]
---
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.
---