New topics: Your Pet, IOU, Baby IQ, The Poisons, Birther II, Games, Future Power

Trying out the documentation theme?

Skip to end of metadata
Go to start of metadata

Encountered this while trying to pull objects out of the Bandana database for Confluence:

com.thoughtworks.xstream.converters.reflection.ObjectAccessException: Could not get field class java.lang.reflect.Field.developerKey : null
at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:110)
caused by: java.lang.IllegalArgumentException
at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(Unknown Source)

Solution seems to be to create a fresh XStream object just before using fromXML.

References

Here is more of the error:

Stack Trace: [hide] 

com.thoughtworks.xstream.converters.reflection.ObjectAccessException: Could not get field class java.lang.reflect.Field.developerKey : null
	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:110)
	at com.thoughtworks.xstream.converters.reflection.ReflectionConverter.marshal(ReflectionConverter.java:44)
	at com.thoughtworks.xstream.core.ReferenceByXPathMarshaller.convertAnother(ReferenceByXPathMarshaller.java:36)
	at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:46)
	at com.thoughtworks.xstream.core.ReferenceByXPathMarshallingStrategy.marshal(ReferenceByXPathMarshallingStrategy.java:17)
	at com.thoughtworks.xstream.XStream.marshal(XStream.java:489)
	at com.thoughtworks.xstream.XStream.marshal(XStream.java:479)
	at com.thoughtworks.xstream.XStream.toXML(XStream.java:464)
	at com.atlassian.confluence.extra.amazon.EditDevKeyAction.setAmazonInformation(EditDevKeyAction.java:43)
	at com.atlassian.confluence.extra.amazon.EditDevKeyAction.execute(EditDevKeyAction.java:120)
	at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:168)
	at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35)
	at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
	at com.atlassian.confluence.util.LoggingContextInterceptor.intercept(LoggingContextInterceptor.java:48)

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.