cquezel opened a new issue, #2085:
URL: https://github.com/apache/fury/issues/2085

   ### Search before asking
   
   - [x] I had searched in the [issues](https://github.com/apache/fury/issues) 
and found no similar issues.
   
   
   ### Version
   
   Fury 0.10.0 
   Open JDK 21
   Windows 
   
   ### Component(s)
   
   Java
   
   ### Minimal reproduce step
   
   I am very sorry but I cannot reproduce this using a simple unit test. It is 
a long data import process which is ultimately serialized in a 1,2 GB object on 
disk. I hope the stack trace can provide a sufficient hint at the problem.
   
   This is the Fury code 
   
        private static <T> void écrireFury(FileOutputStream fos, T objet) 
throws IOException {
                Fury fury = Fury.builder().withLanguage(Language.JAVA)
                        .requireClassRegistration(false)
                        .withRefTracking(true)
                        .build();
                byte[] bytes = fury.serialize(objet);           
                fos.write(bytes);
        }
   
   To replace the Java:
   
        private static <T> void écrireJava(FileOutputStream fos, T objet) 
throws FileNotFoundException, IOException {
                try (ObjectOutput oos = new ObjectOutputStream(fos)) {
                        oos.writeObject(objet);
                }
        }
   
   
   ### What did you expect to see?
   
   A successful serialization to disk.
   
   ### What did you see instead?
   
   
   Caused by: java.lang.ClassCastException: class 
myproject.modelecompletimpl.GroupeRéguliersImpl cannot be cast to class 
myproject.modelecompletimpl.ModuleImpl 
(myproject.modelecompletimpl.GroupeRéguliersImpl and 
myproject.modelecompletimpl.ModuleImpl are in module 
myproject.modelecompletimpl of loader 'app')
        at 
myproject.modelecompletimpl.ModuleImplFuryRefCodec_0.write(ModuleImplFuryRefCodec_0.java:1743)
 ~[?:?]
        at 
myproject.modelecompletimpl.NoeudsQuiFontRéférenceAuCatalogueImplFuryRefCodec_0.writeChunk$(NoeudsQuiFontRéférenceAuCatalogueImplFuryRefCodec_0.java:193)
 ~[?:?]
        at 
myproject.modelecompletimpl.NoeudsQuiFontRéférenceAuCatalogueImplFuryRefCodec_0.writeFields1$(NoeudsQuiFontRéférenceAuCatalogueImplFuryRefCodec_0.java:228)
 ~[?:?]
        at 
myproject.modelecompletimpl.NoeudsQuiFontRéférenceAuCatalogueImplFuryRefCodec_0.write(NoeudsQuiFontRéférenceAuCatalogueImplFuryRefCodec_0.java:463)
 ~[?:?]
        at 
[email protected]/org.apache.fury.Fury.writeNonRef(Fury.java:479) 
~[fury-core-0.10.0.jar:?]
        at 
[email protected]/org.apache.fury.serializer.ArraySerializers$ObjectArraySerializer.write(ArraySerializers.java:106)
 ~[fury-core-0.10.0.jar:?]
        at 
[email protected]/org.apache.fury.serializer.ArraySerializers$ObjectArraySerializer.write(ArraySerializers.java:43)
 ~[fury-core-0.10.0.jar:?]
        ... a thousand more lines
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [ ] I'm willing to submit a PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to