Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bus error?



Hi,

I'm trying to serialize a couple of class information with XStream (8,490 classes altogether).

Something along these lines:

<code>

for ( Iterator anIterator = someClasses.iterator(); anIterator.hasNext(); )
{
Class aClass = (Class) anIterator.next();


aMap.put( aClass.getName() + , aClass );
aMap.put( aClass.getName() + ".fields", Arrays.asList( aClass.getDeclaredFields() ) );
aMap.put( aClass.getName() + ".constructors", Arrays.asList( aClass.getDeclaredConstructors() ) );
aMap.put( aClass.getName() + ".methods", Arrays.asList( aClass.getDeclaredMethods() ) );
aMap.put( aClass.getName() + ".interfaces", Arrays.asList( aClass.getInterfaces() ) );
}


aWriter = new BufferedWriter( new FileWriter( "xstream.xml" ) );
XStream().toXML( aMap, aWriter );
aWriter.close();

</code>

1,183 classes and 5.5 MB later, the JVM consistently dies with a "606 Bus error" (tack trace)...

The last thing written out looks like the following:

<java.lang.reflect.Field>
<clazz>java.io.ObjectStreamClass</clazz>
<slot>18</slot>
<name>reflFactory</name>
<type>sun.reflect.ReflectionFactory</type>
<modifiers>26</modifiers>
<fieldAccessor class="sun.reflect.UnsafeStaticObjectFieldAccessorImpl


Class number 1,184 should be java.util.AbstractMap, but I doubt that's the one creating problems.

Any ideas what could be going on?

TIA.

Cheers,

PA.

P.S.

System Version:	Mac OS X 10.3.7 (7S215)
Kernel Version:	Darwin 7.7.0

% java -version
java version "1.4.2_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3)
Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode)

P.P.S.

~/Library/Logs/JavaNativeCrash_pid606.log

Current Java thread:
at java.lang.Class.getName0(Native Method)
at java.lang.Class.getName(Class.java:480)
at com.thoughtworks.xstream.core.DefaultClassMapper.lookupName(Unknown Source)
at com.thoughtworks.xstream.converters.reflection.ReflectionConverter$1.vis it(Unknown Source)
at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvide r.visitSerializableFields(Unknown Source)
at com.thoughtworks.xstream.converters.reflection.ReflectionConverter.marsh al(Unknown Source)
at com.thoughtworks.xstream.core.ReferenceByXPathMarshaller.convertAnother( Unknown Source)
at com.thoughtworks.xstream.converters.reflection.ReflectionConverter$1.vis it(Unknown Source)
at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvide r.visitSerializableFields(Unknown Source)
at com.thoughtworks.xstream.converters.reflection.ReflectionConverter.marsh al(Unknown Source)
at com.thoughtworks.xstream.core.ReferenceByXPathMarshaller.convertAnother( Unknown Source)
at com.thoughtworks.xstream.converters.collections.AbstractCollectionConver ter.writeItem(Unknown Source)
at com.thoughtworks.xstream.converters.collections.ArrayConverter.marshal(U nknown Source)
at com.thoughtworks.xstream.core.ReferenceByXPathMarshaller.convertAnother( Unknown Source)
at com.thoughtworks.xstream.converters.reflection.ReflectionConverter$1.vis it(Unknown Source)
at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvide r.visitSerializableFields(Unknown Source)
at com.thoughtworks.xstream.converters.reflection.ReflectionConverter.marsh al(Unknown Source)
at com.thoughtworks.xstream.core.ReferenceByXPathMarshaller.convertAnother( Unknown Source)
at com.thoughtworks.xstream.converters.collections.AbstractCollectionConver ter.writeItem(Unknown Source)
at com.thoughtworks.xstream.converters.collections.MapConverter.marshal(Unk nown Source)
at com.thoughtworks.xstream.core.ReferenceByXPathMarshaller.convertAnother( Unknown Source)
at com.thoughtworks.xstream.core.TreeMarshaller.start(Unknown Source)
at com.thoughtworks.xstream.core.ReferenceByXPathMarshallingStrategy.marsha l(Unknown Source)
at com.thoughtworks.xstream.XStream.marshal(Unknown Source)
at com.thoughtworks.xstream.XStream.toXML(Unknown Source)




_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.