-
Bug
-
Resolution: Fixed
-
P4
-
5.0
-
b63
-
x86, sparc
-
linux, solaris_2.6, solaris_10, windows_2003
Name: ygR10224 Date: 07/18/2003
Filed By : SPB JCK team (###@###.###)
JDK : java full version "1.5.0-beta-b10"
JCK : 1.5
Platform[s] : Solaris
switch/Mode :
JCK test owner : http://javaweb.eng/jct/sqe/JCK-tck/usr/owners.jto
Failing Test [s] : N/A
Problem description
===================
In spite of the javax.management.relation.RelationNotification implementing
the java.io.Serializable interface it can't be serialized.
Minimized test:
===============
------- Test.java -------
import java.io.*;
import javax.management.*;
import javax.management.relation.*;
public class Test {
public static void main(String[] args) throws Exception {
javax.management.ObjectName relobj = new javax.management.ObjectName("domain:key=value");
java.util.List nrv = new java.util.ArrayList();
java.util.List orv = new java.util.ArrayList();
nrv.add(new javax.management.ObjectName("domain1:key1=value1"));
orv.add(new javax.management.ObjectName("domain2:key2=value2"));
RelationNotification obj = new javax.management.relation.RelationNotification(
javax.management.relation.RelationNotification.RELATION_BASIC_UPDATE,
new javax.management.relation.RelationService(true),
1L, 2L, "message", "relationId", "relationTypeName",
relobj, "roleName", nrv, orv);
ObjectOutputStream oos = new ObjectOutputStream(
new FileOutputStream("RelationNotification.ser"));
oos.writeObject(obj);
oos.close();
}
}
------- end-of-Test.java -------
Minimized test output:
======================
<gyi@helmet(pts/13).268> java Test
Exception in thread "main" java.io.NotSerializableException: javax.management.relation.RelationService
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)
at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:367)
at javax.management.Notification.writeObject(Notification.java:371)
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:324)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:809)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1296)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
at Test.main(Test.java:21)
Specific Machine Info:
=====================
SunOS helmet 5.8 Generic_108528-14 sun4u sparc SUNW,Ultra-2
======================================================================
Filed By : SPB JCK team (###@###.###)
JDK : java full version "1.5.0-beta-b10"
JCK : 1.5
Platform[s] : Solaris
switch/Mode :
JCK test owner : http://javaweb.eng/jct/sqe/JCK-tck/usr/owners.jto
Failing Test [s] : N/A
Problem description
===================
In spite of the javax.management.relation.RelationNotification implementing
the java.io.Serializable interface it can't be serialized.
Minimized test:
===============
------- Test.java -------
import java.io.*;
import javax.management.*;
import javax.management.relation.*;
public class Test {
public static void main(String[] args) throws Exception {
javax.management.ObjectName relobj = new javax.management.ObjectName("domain:key=value");
java.util.List nrv = new java.util.ArrayList();
java.util.List orv = new java.util.ArrayList();
nrv.add(new javax.management.ObjectName("domain1:key1=value1"));
orv.add(new javax.management.ObjectName("domain2:key2=value2"));
RelationNotification obj = new javax.management.relation.RelationNotification(
javax.management.relation.RelationNotification.RELATION_BASIC_UPDATE,
new javax.management.relation.RelationService(true),
1L, 2L, "message", "relationId", "relationTypeName",
relobj, "roleName", nrv, orv);
ObjectOutputStream oos = new ObjectOutputStream(
new FileOutputStream("RelationNotification.ser"));
oos.writeObject(obj);
oos.close();
}
}
------- end-of-Test.java -------
Minimized test output:
======================
<gyi@helmet(pts/13).268> java Test
Exception in thread "main" java.io.NotSerializableException: javax.management.relation.RelationService
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)
at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:367)
at javax.management.Notification.writeObject(Notification.java:371)
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:324)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:809)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1296)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
at Test.main(Test.java:21)
Specific Machine Info:
=====================
SunOS helmet 5.8 Generic_108528-14 sun4u sparc SUNW,Ultra-2
======================================================================