commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chaitanya Mutyala (JIRA)" <j...@apache.org>
Subject [jira] Commented: (COLLECTIONS-272) Anyone know why the Comparators aren't Serializable?
Date Fri, 19 Oct 2007 00:08:50 GMT

    [ https://issues.apache.org/jira/browse/COLLECTIONS-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12536080
] 

Chaitanya Mutyala commented on COLLECTIONS-272:
-----------------------------------------------

I notice in the code that all other comparator classes are made serializable except the TransformingComparator
class. Could there be a reason why?


>  Anyone know why the Comparators aren't Serializable?
> -----------------------------------------------------
>
>                 Key: COLLECTIONS-272
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-272
>             Project: Commons Collections
>          Issue Type: Improvement
>          Components: Comparator
>            Reporter: Chaitanya Mutyala
>             Fix For: Generics
>
>
> the comparator classes should be serializable. I use the comparator classes in my beans
and cannot make them serializable because of this inconvenience. 
> This is the error when i try to access my beans over an RMI
> java.rmi.UnmarshalException: error unmarshalling return; nested exception is: 
> 	java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: org.apache.commons.collections.comparators.TransformingComparator
> 	at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:157)
> 	at com.sun.jmx.remote.internal.PRef.invoke(Unknown Source)
> 	at javax.management.remote.rmi.RMIConnectionImpl_Stub.invoke(Unknown Source)
> 	at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.invoke(RMIConnector.java:972)
> 	at com.tablus.tem.auto.policy.ClientMBean.doOper(ClientMBean.java:101)
> 	at com.tablus.tem.auto.policy.ClientMBean.run(ClientMBean.java:69)
> 	at com.tablus.tem.auto.policy.ClientMBean.main(ClientMBean.java:145)
> Caused by: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException:
org.apache.commons.collections.comparators.TransformingComparator
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1309)
> 	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
> 	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
> 	at java.util.TreeSet.readObject(TreeSet.java:478)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:585)
> 	at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946)
> 	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
> 	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
> 	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
> 	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
> 	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
> 	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
> 	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
> 	at java.util.HashMap.readObject(HashMap.java:1066)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:585)
> 	at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946)
> 	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
> 	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
> 	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
> 	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
> 	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
> 	at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:290)
> 	at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:139)
> 	... 6 more
> Caused by: java.io.NotSerializableException: org.apache.commons.collections.comparators.TransformingComparator
> 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
> 	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
> 	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
> 	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
> 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
> 	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
> 	at java.util.TreeSet.writeObject(TreeSet.java:458)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:585)
> 	at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:917)
> 	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1339)
> 	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
> 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
> 	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
> 	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
> 	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
> 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
> 	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
> 	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
> 	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
> 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
> 	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
> 	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
> 	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
> 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
> 	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
> 	at java.util.HashMap.writeObject(HashMap.java:1038)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:585)
> 	at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:917)
> 	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1339)
> 	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
> 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
> 	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
> 	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
> 	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
> 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
> 	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
> 	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
> 	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
> 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
> 	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
> 	at sun.rmi.server.UnicastRef.marshalValue(UnicastRef.java:258)
> 	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:304)
> 	at sun.rmi.transport.Transport$1.run(Transport.java:153)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
> 	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
> 	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
> 	at java.lang.Thread.run(Thread.java:595)
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message