[Hawkular-dev] Inventory - /entity/{path}/treeHash - Cannot cast BaseEnvironments$Single to Synced$Single

Lukas Krejci lkrejci at redhat.com
Thu Sep 15 09:59:27 EDT 2016


It's a poorly handled error condition.

Not all entity types support tree hashes. Only those tha can be synced also 
have a tree hash (because tree hash is used to minimize the number of updates 
we need to do).

You can only sync a feed and anything underneath it - resources, metrics, 
resource types, metric types, operation types and data.

Environments are not syncable (at least now) and so you cannot obtain a 
treeHash of them.

That said, you should get a more comprehensible error message than the above. 
Would you mind creating an issue for that at 
https://issues.jboss.org/secure/CreateIssue!default.jspa?
selectedProjectId=12315923

Hope this helps,

Lukas

On Wednesday, September 14, 2016 4:22:11 PM CEST Gareth Healy wrote:
> I am using the inventory "entity" API - Day1 of using it, so might be a
> silly mistake.
> 
> Using services v0.0.12.Final which has v0.18.0Final of inventory.
> 
> I am able to create and get an entity, but when i try to get the treeHash,
> i get a cast exception.
> 
> Server log:
> 
>    - https://gist.github.com/garethahealy/e5004563be11cbc55ea6fcf1bb2907d6
> 
> Client log:
> 
>    - https://gist.github.com/garethahealy/e397df61965df7b766b41a30a3f33ca2
> 
> This a bug? or am i doing something wrong?
> 
> Cheers.


-- 
Lukas Krejci


More information about the hawkular-dev mailing list