You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SameServerEntity e = addChild(EntitySpec.create(SameServerEntity.class)
.displayName("Entity")
.configure(SameServerEntity.PROVISIONING_PROPERTIES, ImmutableMap.<String, Object>of(
"templateBuilder", new PortableTemplateBuilder()
.os64Bit(true)
.minCores(2)
.minRam(8192))));
I launched Brooklyn launched with --persist auto.
XStream throws this exception when serialising the entity:
2014-04-08 16:05:20,023 WARN Error serializing memento (attempt 1 of 5) for BasicEntityMemento{type=brooklyn.entity.basic.SameServerEntityImpl, id=YquHYAHr}; expected sometimes if attribute value modified
com.thoughtworks.xstream.converters.ConversionException: Could not call sun.net.www.http.KeepAliveCache.writeObject() : Could not call sun.net.www.http.ClientVector.writeObject() : null
---- Debugging information ----
message : Could not call sun.net.www.http.ClientVector.writeObject()
cause-exception : java.io.NotSerializableException
cause-message : null
-------------------------------
message : Could not call sun.net.www.http.KeepAliveCache.writeObject()
cause-exception : com.thoughtworks.xstream.converters.ConversionException
cause-message : Could not call sun.net.www.http.ClientVector.writeObject() : null
-------------------------------
at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callWriteObject(SerializationMethodInvoker.java:140) ~[xstream-1.4.3.jar:na]
Caused by: com.thoughtworks.xstream.converters.ConversionException: Could not call sun.net.www.http.ClientVector.writeObject() : null
---- Debugging information ----
message : Could not call sun.net.www.http.ClientVector.writeObject()
cause-exception : java.io.NotSerializableException
cause-message : null
-------------------------------
at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callWriteObject(SerializationMethodInvoker.java:140) ~[xstream-1.4.3.jar:na]
Caused by: java.io.NotSerializableException: null
at sun.net.www.http.ClientVector.writeObject(KeepAliveCache.java:285) ~[na:1.7.0_51]
The PortableTemplateBuilder object keeps a reference to a Jclouds ComputeService. A long way down the serialisation chain this causes a Thread to be serialised, which causes XStream to fail.
My workaround has been to swap the template builder with direct configuration of the properties:
I had an entity configured thus:
I launched Brooklyn launched with --persist auto.
XStream throws this exception when serialising the entity:
The PortableTemplateBuilder object keeps a reference to a Jclouds ComputeService. A long way down the serialisation chain this causes a Thread to be serialised, which causes XStream to fail.
My workaround has been to swap the template builder with direct configuration of the properties:
The text was updated successfully, but these errors were encountered: