Added by Garnet R. Chaney, last edited by Garnet R. Chaney on May 07, 2007  (view change)

Labels:

Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.

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)

Profit from Penny Stocks. Learn from a millionaire who shares everything! Learn from Timothy Sykes.