ahgittin commented on pull request #1172:
URL: https://github.com/apache/brooklyn-server/pull/1172#issuecomment-839159180
now if in a `bean-with-type` you reference a class which isn't
deserializable, instead of the cryptic
```
org.apache.brooklyn.util.exceptions.PropagatedRuntimeException:
brooklyn-bom-yaml bundle installation error: brooklyn-bom-bundle bundle
installation error: Bundle BasicManagedBundle{symbolicName=testSomeArtifact,
version=1, format=brooklyn-bom-bundle, url=null} failed installation: Error
installing catalog items from BOM in testSomeArtifact [176] (with specified BOM
text): Failed to install testSomeArtifact:1, types
[BasicRegisteredType[brooklyn.test.ExecuteSomeArtifact:1;testSomeArtifact:1;bean-with-type]]
gave errors; 3 errors including: Unable to transform definition of
brooklyn.test.ExecuteSomeArtifact; 2 errors including: bean-with-type plan
creation error: JsonMappingException: Cannot find a (Map) Key deserializer for
type [simple type, class org.apache.brooklyn.config.ConfigKey<java.lang.Object>]
at [Source: (String)"{"type":"brooklyn.test.ExecuteSomeArtifact"}"; line:
1, column: 9]
```
you get the significantly more helpful (truly!):
```
org.apache.brooklyn.util.exceptions.PropagatedRuntimeException:
brooklyn-bom-yaml bundle installation error: brooklyn-bom-bundle bundle
installation error: Bundle BasicManagedBundle{symbolicName=testSomeArtifact,
version=1, format=brooklyn-bom-bundle, url=null} failed installation: Error
installing catalog items from BOM in testSomeArtifact [176] (with specified BOM
text): Failed to install testSomeArtifact:1, types
[BasicRegisteredType[brooklyn.test.ExecuteSomeArtifact:1;testSomeArtifact:1;bean-with-type]]
gave errors; 3 errors including: Unable to transform definition of
brooklyn.test.ExecuteSomeArtifact; 2 errors including: bean-with-type plan
creation error: JsonMappingException: Cannot find a (Map) Key deserializer for
type [simple type, class org.apache.brooklyn.config.ConfigKey<java.lang.Object>]
at [Source: (String)"{"type":"brooklyn.test.ExecuteSomeArtifact"}"; line:
1, column: 9], processing class
org.apache.brooklyn.core.location.AbstractLocation$BasicConfigurationSupport,
processing class org.apache.brooklyn.location.ssh.SshMachineLocation,
processing class brooklyn.test.ExecuteSomeArtifact
```
letting us know that the field of type `SshMachineLocation` inside
`ExecuteSomeArtifact` is what is causing the problem
(once we knew that, the solution was easy, mark it transient)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]