-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
None
-
None
-
DataGrid Sprint #30
The below schema results in the following exception:
Schema:
message EntryVersion { oneof version { NumericVersion numeric = 1; ClusteredVersion clustered = 2; } // optional NumericVersion numeric = 1; // optional ClusteredVersion clustered = 2; } message NumericVersion { required int64 version = 1; } message ClusteredVersion { required int64 version = 1; required int32 topology = 2; }
Exception:
java.lang.IllegalArgumentException: Declared field type is not a message or an enum : numeric
It seems this is caused because the type for the field "numeric" is null in the associated FieldDescriptor object that is retrieved in the writeObject impl.
If the oneof label is replaced with the commented optional fields, the marshallers work as expected.
[IPROTO-63] writeObject throws IllegalArgumentException with oneof label
Fix Version/s | Original: 5.0.2.Final [ 12425785 ] |
Fix Version/s | New: 5.0.2.Final [ 12425785 ] | |
Fix Version/s | Original: 5.0.1.Final [ 12424458 ] |
Fix Version/s | New: 5.0.1.Final [ 12424458 ] | |
Fix Version/s | Original: 5.0.0.Final [ 12342556 ] |
Workflow | Original: GIT Pull Request with Triage workflow [ 12911615 ] | New: OJA-WF-BG [ 24889464 ] |
Status | Original: Coding In Progress [ 3 ] | New: In Progress [ 10018 ] |
Assignee | Original: Adrian Nistor [ anistor ] | New: Fabio Massimo Ercoli [ fercoli@redhat.com ] |
Fix Version/s | New: 5.0.0.Final [ 12342556 ] | |
Fix Version/s | Original: 4.4.0.Beta4 [ 12355538 ] |
Fix Version/s | New: 4.4.0.Beta4 [ 12355538 ] | |
Fix Version/s | Original: 4.4.0.Beta3 [ 12354770 ] |
Fix Version/s | New: 4.4.0.Beta3 [ 12354770 ] | |
Fix Version/s | Original: 4.4.0.Beta2 [ 12354595 ] |
Fix Version/s | New: 4.4.0.Beta2 [ 12354595 ] | |
Fix Version/s | Original: 4.4.0.Beta1 [ 12354260 ] |
Fix Version/s | New: 4.4.0.Beta1 [ 12354260 ] | |
Fix Version/s | Original: 4.4.0.Alpha6 [ 12352853 ] |
Fix Version/s | New: 4.4.0.Alpha6 [ 12352853 ] | |
Fix Version/s | Original: 4.4.0.Alpha5 [ 12352852 ] |
Fix Version/s | New: 4.4.0.Alpha5 [ 12352852 ] | |
Fix Version/s | Original: 4.4.0.Alpha4 [ 12351829 ] |
Fix Version/s | New: 4.4.0.Alpha4 [ 12351829 ] | |
Fix Version/s | Original: 4.4.0.Alpha3 [ 12351485 ] |
Fix Version/s | New: 4.4.0.Alpha3 [ 12351485 ] | |
Fix Version/s | Original: 4.4.0.Alpha2 [ 12351481 ] |
Fix Version/s | New: 4.4.0.Alpha2 [ 12351481 ] | |
Fix Version/s | Original: 4.4.0.Alpha1 [ 12345279 ] |
Fix Version/s | New: 4.4.0.Alpha1 [ 12345279 ] | |
Fix Version/s | Original: 4.3.3.Final [ 12344594 ] |
Fix Version/s | New: 4.3.3.Final [ 12344594 ] | |
Fix Version/s | Original: 4.3.2.Final [ 12343550 ] |
Fix Version/s | New: 4.3.2.Final [ 12343550 ] | |
Fix Version/s | Original: 4.3.1.Final [ 12343286 ] |
Fix Version/s | Original: 4.3.0.Alpha14 [ 12342982 ] |
Fix Version/s | New: 4.3.1.Final [ 12343286 ] | |
Fix Version/s | Original: 4.3.0.Final [ 12337419 ] |
Fix Version/s | New: 4.3.0.Alpha14 [ 12342982 ] | |
Fix Version/s | Original: 4.3.0.Alpha13 [ 12342954 ] |
Fix Version/s | New: 4.3.0.Alpha13 [ 12342954 ] | |
Fix Version/s | Original: 4.3.0.Alpha12 [ 12342803 ] |
Fix Version/s | New: 4.3.0.Alpha12 [ 12342803 ] | |
Fix Version/s | Original: 4.3.0.Alpha11 [ 12342680 ] |
Fix Version/s | New: 4.3.0.Alpha11 [ 12342680 ] | |
Fix Version/s | Original: 4.3.0.Alpha10 [ 12342560 ] |
Fix Version/s | New: 4.3.0.Alpha10 [ 12342560 ] | |
Fix Version/s | Original: 4.3.0.Alpha9 [ 12342269 ] |
Fix Version/s | New: 4.3.0.Alpha9 [ 12342269 ] | |
Fix Version/s | Original: 4.3.0.Alpha8 [ 12342223 ] |
Sprint | New: DataGrid Sprint #30 [ 8842 ] |
Rank | New: Ranked lower |
Fix Version/s | New: 4.3.0.Alpha8 [ 12342223 ] |
Fix Version/s | New: 4.3.0.Final [ 12337419 ] |
Status | Original: Open [ 1 ] | New: Coding In Progress [ 3 ] |
Assignee | New: Adrian Nistor [ anistor ] |
Status | Original: New [ 10016 ] | New: Open [ 1 ] |
Description |
Original:
The below schema results in the following exception: Schema: {code:java} message EntryVersion { oneof version { NumericVersion numeric = 1; ClusteredVersion clustered = 2; } // optional NumericVersion numeric = 1; // optional ClusteredVersion clustered = 2; } message NumericVersion { required int64 version = 1; } message ClusteredVersion { required int64 version = 1; required int32 topology = 2; } {code} Exception: {code:java} java.lang.IllegalArgumentException: Declared field type is not a message or an enum : numeric {code} It seems this is caused because the type for the field "numeric" is null in the associated FieldDescriptor object that is retrieved in the [writeObject impl|https://github.com/infinispan/protostream/blob/master/core/src/main/java/org/infinispan/protostream/impl/ProtoStreamWriterImpl.java#L452-L470]. |
New:
The below schema results in the following exception: Schema: {code:java} message EntryVersion { oneof version { NumericVersion numeric = 1; ClusteredVersion clustered = 2; } // optional NumericVersion numeric = 1; // optional ClusteredVersion clustered = 2; } message NumericVersion { required int64 version = 1; } message ClusteredVersion { required int64 version = 1; required int32 topology = 2; } {code} Exception: {code:java} java.lang.IllegalArgumentException: Declared field type is not a message or an enum : numeric {code} It seems this is caused because the type for the field "numeric" is null in the associated FieldDescriptor object that is retrieved in the [writeObject impl|https://github.com/infinispan/protostream/blob/master/core/src/main/java/org/infinispan/protostream/impl/ProtoStreamWriterImpl.java#L452-L470]. If the oneof label is replaced with the commented optional fields, the marshallers work as expected. |