Open sjcorbett opened 10 years ago
i've added a bunch of tests for DSL and rebing in #1426, including (disabled) io.brooklyn.camp.brooklyn.JavaWebAppWithDslYamlRebindIntegrationTest.testJavaWebWithMemberSpecRebind()
which I think is the same error being reported here. I think the spec is the culprit, but I can't tell why.
The stack trace is useless. It would be nice to get proper trace showing the object trace but I don't see any way to hook in to XStream
to allow that.
2014-05-29 03:48:22,636 ERROR b.e.r.p.MementoFileWriter [pool-7-thread-2]: Error writing to /var/folders/q2/363yynwx5lb_qpch1km2xvr80000gn/T/1401331665142-0/entities/MmgXxXQM
java.lang.NoClassDefFoundError: com/google/inject/Module
at java.lang.Class.getDeclaredMethods0(Native Method) ~[na:1.6.0_33]
at java.lang.Class.privateGetDeclaredMethods(Class.java:2427) ~[na:1.6.0_33]
at java.lang.Class.getDeclaredMethod(Class.java:1935) ~[na:1.6.0_33]
at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.getMethod(SerializationMethodInvoker.java:161) ~[xstream-1.4.3.jar:na]
at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.getMethod(SerializationMethodInvoker.java:148) ~[xstream-1.4.3.jar:na]
at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.supportsReadObject(SerializationMethodInvoker.java:105) ~[xstream-1.4.3.jar:na]
at com.thoughtworks.xstream.converters.reflection.SerializableConverter.isSerializable(SerializableConverter.java:90) ~[xstream-1.4.3.jar:na]
at com.thoughtworks.xstream.converters.reflection.SerializableConverter.canConvert(SerializableConverter.java:86) ~[xstream-1.4.3.jar:na]
at com.thoughtworks.xstream.core.DefaultConverterLookup.lookupConverterForType(DefaultConverterLookup.java:56) ~[xstream-1.4.3.jar:na]
at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:48) ~[xstream-1.4.3.jar:na]
at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84) ~[xstream-1.4.3.jar:na]
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshallField(AbstractReflectionConverter.java:229) ~[xstream-1.4.3.jar:na]
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$2.writeField(AbstractReflectionConverter.java:208) ~[xstream-1.4.3.jar:na]
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$2.<init>(AbstractReflectionConverter.java:171) ~[xstream-1.4.3.jar:na]
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doMarshal(AbstractReflectionConverter.java:116) ~[xstream-1.4.3.jar:na]
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshal(AbstractReflectionConverter.java:72) ~[xstream-1.4.3.jar:na]
at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) ~[xstream-1.4.3.jar:na]
at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) ~[xstream-1.4.3.jar:na]
at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84) ~[xstream-1.4.3.jar:na]
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshallField(AbstractReflectionConverter.java:229) ~[xstream-1.4.3.jar:na]
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$2.writeField(AbstractReflectionConverter.java:208) ~[xstream-1.4.3.jar:na]
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$2.<init>(AbstractReflectionConverter.java:171) ~[xstream-1.4.3.jar:na]
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doMarshal(AbstractReflectionConverter.java:116) ~[xstream-1.4.3.jar:na]
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshal(AbstractReflectionConverter.java:72) ~[xstream-1.4.3.jar:na]
at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) ~[xstream-1.4.3.jar:na]
...
at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) ~[xstream-1.4.3.jar:na]
at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) ~[xstream-1.4.3.jar:na]
at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43) ~[xstream-1.4.3.jar:na]
at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:82) ~[xstream-1.4.3.jar:na]
at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37) ~[xstream-1.4.3.jar:na]
at com.thoughtworks.xstream.XStream.marshal(XStream.java:895) ~[xstream-1.4.3.jar:na]
at com.thoughtworks.xstream.XStream.marshal(XStream.java:884) ~[xstream-1.4.3.jar:na]
at com.thoughtworks.xstream.XStream.toXML(XStream.java:857) ~[xstream-1.4.3.jar:na]
at brooklyn.util.xstream.XmlSerializer.serialize(XmlSerializer.java:59) ~[classes/:na]
at brooklyn.entity.rebind.persister.XmlMementoSerializer.serialize(XmlMementoSerializer.java:86) ~[classes/:na]
at brooklyn.util.xstream.XmlSerializer.toString(XmlSerializer.java:69) ~[classes/:na]
at brooklyn.entity.rebind.persister.RetryingMementoSerializer.toString(RetryingMementoSerializer.java:30) ~[classes/:na]
at brooklyn.entity.rebind.persister.MementoFileWriter.writeNow(MementoFileWriter.java:222) ~[classes/:na]
at brooklyn.entity.rebind.persister.MementoFileWriter.access$4(MementoFileWriter.java:204) ~[classes/:na]
at brooklyn.entity.rebind.persister.MementoFileWriter$2.call(MementoFileWriter.java:150) [classes/:na]
at brooklyn.entity.rebind.persister.MementoFileWriter$2.call(MementoFileWriter.java:1) [classes/:na]
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [na:1.6.0_33]
at java.util.concurrent.FutureTask.run(FutureTask.java:138) [na:1.6.0_33]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [na:1.6.0_33]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [na:1.6.0_33]
at java.lang.Thread.run(Thread.java:680) [na:1.6.0_33]
Caused by: java.lang.ClassNotFoundException: com.google.inject.Module
at java.net.URLClassLoader$1.run(URLClassLoader.java:202) ~[na:1.6.0_33]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.6.0_33]
at java.net.URLClassLoader.findClass(URLClassLoader.java:190) ~[na:1.6.0_33]
at java.lang.ClassLoader.loadClass(ClassLoader.java:306) ~[na:1.6.0_33]
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) ~[na:1.6.0_33]
at java.lang.ClassLoader.loadClass(ClassLoader.java:247) ~[na:1.6.0_33]
... 321 common frames omitted
note that brooklyn.entity.rebind.Dumpers.logUnserializableChains(...)
(in src/test/java
) is useful for seeing the chain of references leading to the unserializable object. We could do something like that using xstream rather than standard serialization. However, I'd be very hesitant to include it in non-test code.
trying a few things. logUnserializableChains
complains about a bunch of stuff that isn't serializable but we don't really care, and some other things which it shouldn't be trying to get, but it's hard to find out what
bumping to 1.4.7, code seems a little easier to follow though no easy way to dive in and get errors. curiously it times out instead of failing with this example. and it gives me some other warnings which i can intercept, and among other things, it's letting me get some more detail of the problems:
Map at /entity/config/dynamiccluster.memberspec/brooklyn.entity.proxying.EntitySpec/config/entry[2]/com.google.common.collect.Maps_-TransformedEntriesMap/transformer/val_-function/outer-class/mgmt/catalog/catalog/classpath/classloader/parent/package2certs[{com.beust.jcommander.converters=[Ljava.security.cert.Certificate;@17f17060, brooklyn.util.xstream=[Ljava.security.cert.Certificate;@17f17060, io.brooklyn.camp.brooklyn.spi.dsl.methods=[Ljava.security.cert.Certificate;@17f17060, org.yaml.snakeyaml.events=[Ljava.security.cert.Certificate;@17f17060, brooklyn.entity.annotation=[Ljava.security.cert.Certificate;@17f17060, com.maxmind.geoip=[Ljava.security.cert.Certificate;@17f17060, ch.qos.logback.classic.spi=[Ljava.security.cert.Certificate;@17f17060, brooklyn.internal.storage.impl.inmemory=[Ljava.security.cert.Certificate;@17f17060, brooklyn.util.config=[Ljava.security.cert.Certificate;@17f17060, brooklyn.util.collections=[Ljava.security.cert.Certificate;@17f17060, ch.qos.logback.core.encoder=[Ljava.security.cert.Certificate;@17f17060, ch.qos.logback.core.pattern.color=[Ljava.security.cert.Certificate;@17f17060, com.thoughtworks.xstream.io.path=[Ljava.security.cert.Certificate;@17f17060, com.thoughtworks.xstream.io=[Ljava.security.cert.Certificate;@17f17060, org.slf4j.helpers=[Ljava.security.cert.Certificate;@17f17060, ch.qos.logback.core.status=[Ljava.security.cert.Certificate;@17f17060, ch.qos.logback.core.subst=[Ljava.security.cert.Certificate;@17f17060, org.apache.commons.lang3.builder=[Ljava.security.cert.Certificate;@17f17060, org.yaml.snakeyaml.resolver=[Ljava.security.cert.Certificate;@17f17060, freemarker.core=[Ljava.security.cert.Certificate;@17f17060, io.brooklyn.camp.spi.resolve=[Ljava.security.cert.Certificate;@17f17060, ch.qos.logback.core.spi=[Ljava.security.cert.Certificate;@17f17060, io.brooklyn.camp.brooklyn=[Ljava.security.cert.Certificate;@17f17060, brooklyn.entity.database=[Ljava.security.cert.Certificate;@17f17060, brooklyn.catalog=[Ljava.security.cert.Certificate;@17f17060, brooklyn.util.task=[Ljava.security.cert.Certificate;@17f17060, javax.annotation.meta=[Ljava.security.cert.Certificate;@17f17060, org.testng.remote=[Ljava.security.cert.Certificate;@17f17060, org.codehaus.groovy.runtime.memoize=[Ljava.security.cert.Certificate;@17f17060, com.thoughtworks.xstream.converters.enums=[Ljava.security.cert.Certificate;@17f17060, io.brooklyn.camp.brooklyn.spi.lookup=[Ljava.security.cert.Certificate;@17f17060, brooklyn.util.javalang=[Ljava.security.cert.Certificate;@17f17060, org.testng=[Ljava.security.cert.Certificate;@17f17060, brooklyn.util=[Ljava.security.cert.Certificate;@17f17060, org.testng.reporters.jq=[Ljava.security.cert.Certificate;@17f17060, org.apache.commons.lang3=[Ljava.security.cert.Certificate;@17f17060, brooklyn.entity.basic=[Ljava.security.cert.Certificate;@17f17060, ch.qos.logback.core.pattern=[Ljava.security.cert.Certificate;@17f17060, com.thoughtworks.xstream=[Ljava.security.cert.Certificate;@17f17060, org.slf4j.impl=[Ljava.security.cert.Certificate;@17f17060, groovy.lang=[Ljava.security.cert.Certificate;@17f17060, org.yaml.snakeyaml.tokens=[Ljava.security.cert.Certificate;@17f17060, com.thoughtworks.xstream.converters.reflection=[Ljava.security.cert.Certificate;@17f17060, io.brooklyn.camp.brooklyn.spi.platform=[Ljava.security.cert.Certificate;@17f17060, ch.qos.logback.core.pattern.parser=[Ljava.security.cert.Certificate;@17f17060, com.thoughtworks.xstream.io.naming=[Ljava.security.cert.Certificate;@17f17060, brooklyn.util.internal.ssh=[Ljava.security.cert.Certificate;@17f17060, org.yaml.snakeyaml.parser=[Ljava.security.cert.Certificate;@17f17060, brooklyn.internal=[Ljava.security.cert.Certificate;@17f17060, brooklyn.event.basic=[Ljava.security.cert.Certificate;@17f17060, org.testng.log=[Ljava.security.cert.Certificate;@17f17060, com.thoughtworks.xstream.converters=[Ljava.security.cert.Certificate;@17f17060, ch.qos.logback.core.sift=[Ljava.security.cert.Certificate;@17f17060, org.xmlpull.v1=[Ljava.security.cert.Certificate;@17f17060, ch.qos.logback.classic.util=[Ljava.security.cert.Certificate;@17f17060, org.codehaus.groovy.util=[Ljava.security.cert.Certificate;@17f17060, brooklyn.management.internal=[Ljava.security.cert.Certificate;@17f17060, brooklyn=[Ljava.security.cert.Certificate;@17f17060, org.testng.xml=[Ljava.security.cert.Certificate;@17f17060, io.brooklyn.camp.spi.resolve.interpret=[Ljava.security.cert.Certificate;@17f17060, brooklyn.entity=[Ljava.security.cert.Certificate;@17f17060, org.codehaus.groovy.vmplugin.v6=[Ljava.security.cert.Certificate;@17f17060, io.brooklyn.util.yaml=[Ljava.security.cert.Certificate;@17f17060, org.codehaus.groovy.vmplugin.v5=[Ljava.security.cert.Certificate;@17f17060, org.codehaus.groovy.runtime.dgmimpl=[Ljava.security.cert.Certificate;@17f17060, org.testng.internal.thread.graph=[Ljava.security.cert.Certificate;@17f17060, com.beust.jcommander.internal=[Ljava.security.cert.Certificate;@17f17060, org.codehaus.groovy.ast.expr=[Ljava.security.cert.Certificate;@17f17060, groovyjarjarasm.asm=[Ljava.security.cert.Certificate;@17f17060, com.thoughtworks.xstream.core.util=[Ljava.security.cert.Certificate;@17f17060, brooklyn.util.flags=[Ljava.security.cert.Certificate;@17f17060, ch.qos.logback.classic.boolex=[Ljava.security.cert.Certificate;@17f17060, org.testng.reporters=[Ljava.security.cert.Certificate;@17f17060, org.testng.annotations=[Ljava.security.cert.Certificate;@17f17060, brooklyn.event.feed.ssh=[Ljava.security.cert.Certificate;@17f17060, io.brooklyn.camp.brooklyn.spi.dsl.parse=[Ljava.security.cert.Certificate;@17f17060, ch.qos.logback.classic.joran.action=[Ljava.security.cert.Certificate;@17f17060, brooklyn.entity.rebind.persister=[Ljava.security.cert.Certificate;@17f17060, io.brooklyn.camp.brooklyn.spi.dsl=[Ljava.security.cert.Certificate;@17f17060, ch.qos.logback.classic.filter=[Ljava.security.cert.Certificate;@17f17060, brooklyn.entity.effector=[Ljava.security.cert.Certificate;@17f17060, ch.qos.logback.core=[Ljava.security.cert.Certificate;@17f17060, brooklyn.management.ha=[Ljava.security.cert.Certificate;@17f17060, ch.qos.logback.core.pattern.util=[Ljava.security.cert.Certificate;@17f17060, com.thoughtworks.xstream.converters.collections=[Ljava.security.cert.Certificate;@17f17060, com.google.common.util.concurrent=[Ljava.security.cert.Certificate;@17f17060, brooklyn.internal.storage=[Ljava.security.cert.Certificate;@17f17060, brooklyn.policy=[Ljava.security.cert.Certificate;@17f17060, brooklyn.entity.drivers.downloads=[Ljava.security.cert.Certificate;@17f17060, brooklyn.config.render=[Ljava.security.cert.Certificate;@17f17060, org.codehaus.groovy=[Ljava.security.cert.Certificate;@17f17060, com.google.common.cache=[Ljava.security.cert.Certificate;@17f17060, com.google.common.primitives=[Ljava.security.cert.Certificate;@17f17060, com.google.common.reflect=[Ljava.security.cert.Certificate;@17f17060, brooklyn.util.pool=[Ljava.security.cert.Certificate;@17f17060, javax.annotation=[Ljava.security.cert.Certificate;@17f17060, com.beust.jcommander.validators=[Ljava.security.cert.Certificate;@17f17060, ch.qos.logback.core.boolex=[Ljava.security.cert.Certificate;@17f17060, ch.qos.logback.core.joran.action=[Ljava.security.cert.Certificate;@17f17060, ch.qos.logback.core.filter=[Ljava.security.cert.Certificate;@17f17060, io.brooklyn.camp.spi.collection=[Ljava.security.cert.Certificate;@17f17060, org.yaml.snakeyaml.scanner=[Ljava.security.cert.Certificate;@17f17060, groovy.sql=[Ljava.security.cert.Certificate;@17f17060, com.thoughtworks.xstream.mapper=[Ljava.security.cert.Certificate;@17f17060, org.testng.internal.annotations=[Ljava.security.cert.Certificate;@17f17060, com.thoughtworks.xstream.io.xml=[Ljava.security.cert.Certificate;@17f17060, org.codehaus.groovy.reflection=[Ljava.security.cert.Certificate;@17f17060, brooklyn.entity.group=[Ljava.security.cert.Certificate;@17f17060, ch.qos.logback.classic.selector=[Ljava.security.cert.Certificate;@17f17060, brooklyn.event.feed.function=[Ljava.security.cert.Certificate;@17f17060, bsh=[Ljava.security.cert.Certificate;@17f17060, org.codehaus.groovy.runtime.typehandling=[Ljava.security.cert.Certificate;@17f17060, brooklyn.location.basic=[Ljava.security.cert.Certificate;@17f17060, brooklyn.util.math=[Ljava.security.cert.Certificate;@17f17060, ch.qos.logback.core.joran.util=[Ljava.security.cert.Certificate;@17f17060, brooklyn.entity.rebind=[Ljava.security.cert.Certificate;@17f17060, org.yaml.snakeyaml=[Ljava.security.cert.Certificate;@17f17060, org.slf4j=[Ljava.security.cert.Certificate;@17f17060, brooklyn.management.usage=[Ljava.security.cert.Certificate;@17f17060, brooklyn.util.time=[Ljava.security.cert.Certificate;@17f17060, com.thoughtworks.xstream.converters.basic=[Ljava.security.cert.Certificate;@17f17060, com.google.common.io=[Ljava.security.cert.Certificate;@17f17060, brooklyn.event=[Ljava.security.cert.Certificate;@17f17060, brooklyn.entity.basic.lifecycle=[Ljava.security.cert.Certificate;@17f17060, ch.qos.logback.classic.pattern.color=[Ljava.security.cert.Certificate;@17f17060, brooklyn.util.task.ssh=[Ljava.security.cert.Certificate;@17f17060, brooklyn.entity.proxy.nginx=[Ljava.security.cert.Certificate;@17f17060, ch.qos.logback.classic.joran=[Ljava.security.cert.Certificate;@17f17060, brooklyn.entity.webapp.jboss=[Ljava.security.cert.Certificate;@17f17060, io.brooklyn.camp.commontypes=[Ljava.security.cert.Certificate;@17f17060, org.codehaus.groovy.runtime.powerassert=[Ljava.security.cert.Certificate;@17f17060, org.yaml.snakeyaml.reader=[Ljava.security.cert.Certificate;@17f17060, ch.qos.logback.core.rolling.helper=[Ljava.security.cert.Certificate;@17f17060, brooklyn.util.os=[Ljava.security.cert.Certificate;@17f17060, ch.qos.logback.core.rolling=[Ljava.security.cert.Certificate;@17f17060, brooklyn.util.internal=[Ljava.security.cert.Certificate;@17f17060, ch.qos.logback.classic.encoder=[Ljava.security.cert.Certificate;@17f17060, ch.qos.logback.classic=[Ljava.security.cert.Certificate;@17f17060, com.thoughtworks.xstream.converters.extended=[Ljava.security.cert.Certificate;@17f17060, ch.qos.logback.core.joran=[Ljava.security.cert.Certificate;@17f17060, com.google.common.base=[Ljava.security.cert.Certificate;@17f17060, brooklyn.util.exceptions=[Ljava.security.cert.Certificate;@17f17060, org.codehaus.groovy.runtime.metaclass=[Ljava.security.cert.Certificate;@17f17060, org.codehaus.groovy.ast.stmt=[Ljava.security.cert.Certificate;@17f17060, groovy.io=[Ljava.security.cert.Certificate;@17f17060, com.google.common.collect=[Ljava.security.cert.Certificate;@17f17060, brooklyn.util.text=[Ljava.security.cert.Certificate;@17f17060, brooklyn.enricher.basic=[Ljava.security.cert.Certificate;@17f17060, io.brooklyn.camp=[Ljava.security.cert.Certificate;@17f17060, com.thoughtworks.xstream.core=[Ljava.security.cert.Certificate;@17f17060, freemarker.template.utility=[Ljava.security.cert.Certificate;@17f17060, org.testng.internal.invokers=[Ljava.security.cert.Certificate;@17f17060, io.brooklyn.camp.spi.instantiate=[Ljava.security.cert.Certificate;@17f17060, ch.qos.logback.classic.sift=[Ljava.security.cert.Certificate;@17f17060, brooklyn.config=[Ljava.security.cert.Certificate;@17f17060, org.yaml.snakeyaml.composer=[Ljava.security.cert.Certificate;@17f17060, brooklyn.management=[Ljava.security.cert.Certificate;@17f17060, brooklyn.location.cloud=[Ljava.security.cert.Certificate;@17f17060, io.brooklyn.camp.spi.pdp=[Ljava.security.cert.Certificate;@17f17060, brooklyn.location=[Ljava.security.cert.Certificate;@17f17060, brooklyn.test.entity=[Ljava.security.cert.Certificate;@17f17060, brooklyn.entity.proxy=[Ljava.security.cert.Certificate;@17f17060, org.codehaus.groovy.runtime.dgmimpl.arrays=[Ljava.security.cert.Certificate;@17f17060, brooklyn.entity.webapp=[Ljava.security.cert.Certificate;@17f17060, org.yaml.snakeyaml.representer=[Ljava.security.cert.Certificate;@17f17060, org.yaml.snakeyaml.nodes=[Ljava.security.cert.Certificate;@17f17060, io.brooklyn.camp.spi=[Ljava.security.cert.Certificate;@17f17060, org.testng.internal=[Ljava.security.cert.Certificate;@17f17060, org.testng.internal.thread=[Ljava.security.cert.Certificate;@17f17060, org.slf4j.spi=[Ljava.security.cert.Certificate;@17f17060, brooklyn.util.stream=[Ljava.security.cert.Certificate;@17f17060, brooklyn.util.task.system.internal=[Ljava.security.cert.Certificate;@17f17060, ch.qos.logback.core.helpers=[Ljava.security.cert.Certificate;@17f17060, org.codehaus.groovy.runtime.callsite=[Ljava.security.cert.Certificate;@17f17060, ch.qos.logback.classic.pattern=[Ljava.security.cert.Certificate;@17f17060, com.thoughtworks.xstream.security=[Ljava.security.cert.Certificate;@17f17060, org.codehaus.groovy.reflection.stdclasses=[Ljava.security.cert.Certificate;@17f17060, org.codehaus.groovy.runtime=[Ljava.security.cert.Certificate;@17f17060, freemarker.template=[Ljava.security.cert.Certificate;@17f17060, brooklyn.event.feed.http=[Ljava.security.cert.Certificate;@17f17060, brooklyn.entity.database.mysql=[Ljava.security.cert.Certificate;@17f17060, brooklyn.util.mutex=[Ljava.security.cert.Certificate;@17f17060, brooklyn.policy.basic=[Ljava.security.cert.Certificate;@17f17060, org.yaml.snakeyaml.util=[Ljava.security.cert.Certificate;@17f17060, freemarker.cache=[Ljava.security.cert.Certificate;@17f17060, brooklyn.mementos=[Ljava.security.cert.Certificate;@17f17060, brooklyn.location.geo=[Ljava.security.cert.Certificate;@17f17060, brooklyn.entity.rebind.dto=[Ljava.security.cert.Certificate;@17f17060, brooklyn.entity.proxying=[Ljava.security.cert.Certificate;@17f17060, brooklyn.enricher=[Ljava.security.cert.Certificate;@17f17060, brooklyn.util.net=[Ljava.security.cert.Certificate;@17f17060, ch.qos.logback.core.recovery=[Ljava.security.cert.Certificate;@17f17060, brooklyn.util.guava=[Ljava.security.cert.Certificate;@17f17060, brooklyn.event.feed=[Ljava.security.cert.Certificate;@17f17060, brooklyn.entity.drivers=[Ljava.security.cert.Certificate;@17f17060, ch.qos.logback.core.joran.event=[Ljava.security.cert.Certificate;@17f17060, ch.qos.logback.core.joran.conditional=[Ljava.security.cert.Certificate;@17f17060, groovy.util=[Ljava.security.cert.Certificate;@17f17060, brooklyn.entity.java=[Ljava.security.cert.Certificate;@17f17060, ch.qos.logback.core.util=[Ljava.security.cert.Certificate;@17f17060, org.codehaus.groovy.control=[Ljava.security.cert.Certificate;@17f17060, brooklyn.catalog.internal=[Ljava.security.cert.Certificate;@17f17060, io.brooklyn.camp.brooklyn.spi.creation=[Ljava.security.cert.Certificate;@17f17060, org.yaml.snakeyaml.constructor=[Ljava.security.cert.Certificate;@17f17060, com.google.common.net=[Ljava.security.cert.Certificate;@17f17060, org.codehaus.groovy.classgen.asm=[Ljava.security.cert.Certificate;@17f17060, brooklyn.entity.trait=[Ljava.security.cert.Certificate;@17f17060, com.beust.jcommander=[Ljava.security.cert.Certificate;@17f17060, org.testng.remote.strprotocol=[Ljava.security.cert.Certificate;@17f17060, org.codehaus.groovy.vmplugin=[Ljava.security.cert.Certificate;@17f17060, org.testng.collections=[Ljava.security.cert.Certificate;@17f17060, brooklyn.entity.software=[Ljava.security.cert.Certificate;@17f17060, groovy.time=[Ljava.security.cert.Certificate;@17f17060, org.codehaus.groovy.ast=[Ljava.security.cert.Certificate;@17f17060, brooklyn.internal.storage.impl=[Ljava.security.cert.Certificate;@17f17060, ch.qos.logback.core.joran.spi=[Ljava.security.cert.Certificate;@17f17060, org.codehaus.groovy.runtime.wrappers=[Ljava.security.cert.Certificate;@17f17060, ch.qos.logback.classic.turbo=[Ljava.security.cert.Certificate;@17f17060, org.yaml.snakeyaml.error=[Ljava.security.cert.Certificate;@17f17060, brooklyn.entity.group.zoneaware=[Ljava.security.cert.Certificate;@17f17060, org.testng.log4testng=[Ljava.security.cert.Certificate;@17f17060, org.testng.internal.collections=[Ljava.security.cert.Certificate;@17f17060}] modified while serializing; trying alternate technique
i've added an xstream Converter
which intercepts attempts to serialize managementContext instances. that makes the test pass, though with some concerning but very useful output:
<transformer class="com.google.common.collect.Maps$7">
<val_-function class="io.brooklyn.camp.brooklyn.spi.creation.BrooklynComponentTemplateResolver$1">
<outer-class>
<mgmt class="brooklyn.test.entity.LocalManagementContextForTests">default-management-context</mgmt>
this is inside the java system properties config key
the more i look at this it seems we need the mgmt there, or else some clever way it gets known/injected later (ThreadLocals?) so the initial hack of a ManagementContextConverter
feels like the right thing
@aledsage wdyt?
Brooklyn can't persist entities that have MapConfigKeys with BrooklynComponentTemplateResolver values because they have a reference to a LocalManagementContext, which makes everything go haywire.
An example failing blueprint is:
Comment from @aledsage in brooklyncentral: