Hi Dale,
Dale Ellis wrote:
> Thanks Jorg for your help...
>
> Just run that line you asked for....
>
> C:\Users\dale.ellis.SKY>java -cp
> M:\com\thoughtworks\xstream\xstream\1.4.5\xstream-1.4.5.jar
> com.thoughtworks.xstream.core.JVM XStream JVM diagnostics
> java.specification.version: 1.6 java.specification.vendor: Sun
> Microsystems Inc. java.specification.name: Java Platform API Specification
> java.vm.vendor: Sun Microsystems Inc.
> java.vendor: Sun Microsystems Inc.
> java.vm.name: Java HotSpot(TM) 64-Bit Server VM
> Version: 1.6
> XStream support for enhanced Mode: true
> Supports AWT: true
> Supports Swing: true
> Supports SQL: true
> Standard StAX XMLInputFactory:
> com.sun.xml.internal.stream.XMLInputFactoryImpl Standard StAX
> XMLOutputFactory: com.sun.xml.internal.stream.XMLOutputFactoryImpl
> Optimized TreeSet.addAll: true Optimized TreeMap.putAll: true
> Can parse UTC date format: true
> Reverse field order detected (only if JVM class itself has been compiled):
> false
It claims that the compareTo methods of your objects should not be called at
deserialization. Can you confirm this?
> I just tried the IS references mode, not exactly sure what I was doing,
> but seemed to generate the xml with ids instead of the xpath's so guess it
> worked ok
>
> xStream.setMode(XStream.ID_REFERENCES);
> xStream.aliasSystemAttribute("xstreamId", "xstreamId");
xStream.aliasSystemAttribute("xid", "id");
Just to give XStream's attribute 'id' a different name to avoid any clashes
with your if element.
> Still have the same issue though, stripping out the <id>'s freezes for
> fromXml() still :o(
s/stripping out/keeping/ ??
> Any other suggestions?, I'm going to have a look through the xstream
> documentation to try get a better understanding of whats going on, I'm
> wondering if I can write a custom converter to strip out id values, all
> objects with the id extend AbstractEntity so maybe I can do something with
> that.
Is it with any XML that you deserialize or just with this special one? Can
you try to minimize the objects in your graph to get a minimal number of
objects where this effect happens? When XStream hangs and you stop your
application in the debugger, what's the stack trace i.e. where does it hang?
- Jörg
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email