Adriano Teixeira de Souza created WFLY-14285:
------------------------------------------------
Summary: Serialization Errors with EJB over HTTP
Key: WFLY-14285
URL:
https://issues.redhat.com/browse/WFLY-14285
Project: WildFly
Issue Type: Bug
Affects Versions: 21.0.2.Final
Reporter: Adriano Teixeira de Souza
Assignee: Brian Stansberry
Attachments: serialization-wf-21-0-2.txt
{{We are testing our application for upgrade to las version of Wildfly (21.0.2) and on the
ejb client over http in a standalone client application we are facing many serialization
errors that doesn't have on previous versions (20.0.1 and before)}}
{{The errors is some times like this:}}
{{Caused by: java.lang.ClassCastException: Cannot cast java.lang.Class to
java.util.Date}}
{{ at java.lang.Class.cast(Class.java:3605)}}
{{ at
org.jboss.marshalling.reflect.SerializableField.setObject(SerializableField.java:342)}}
{{ at
org.jboss.marshalling.river.RiverUnmarshaller.readFields(RiverUnmarshaller.java:1864)}}
{{ at
org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1778)}}
{{ at
org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1406)}}
{{...}}
{{Caused by: an exception which occurred:}}
{{ in field
com.my.company.common.entities.PesagemRodoviariaImagem.dataHoraCapturaImagem}}
{{some times like this:}}
{{}}
{{Caused by: java.io.StreamCorruptedException: Unexpected byte found when reading an
object: 224}}
{{ at
org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:839)}}
{{ at
org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:231)}}
{{ at
org.jboss.marshalling.river.RiverUnmarshaller.readFields(RiverUnmarshaller.java:1864)}}{{Caused
by: an exception which occurred:}}
{{ in field
com.my.company.common.entities.PesagemRodoviariaImagem.dataHoraCapturaImagem}}
and some times like this
{{java.io.StreamCorruptedException: ID_CLEAR_CLASS_CACHE token in the middle of stream
processing}}
{{ at
org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:823)}}
{{ at
org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:231)}}{{Caused
by: an exception which occurred:}}
{{ in field
com.my.company.common.entities.PesagemRodoviariaImagem.dataHoraCapturaImagem}}
A complete stacktrace is attached.
the class PesagemRodoviariaImage is like this
{{package com.my.company;}}{{import java.util.Date;}}{{import javax.persistence.Entity;}}
{{import javax.persistence.FetchType;}}
{{import javax.persistence.GeneratedValue;}}
{{import javax.persistence.GenerationType;}}
{{import javax.persistence.Id;}}
{{import javax.persistence.JoinColumn;}}
{{import javax.persistence.ManyToOne;}}
{{import javax.persistence.SequenceGenerator;}}
{{import javax.persistence.Temporal;}}
{{import javax.persistence.TemporalType;}}
{{import javax.persistence.Transient;}}{{@Entity}}
{{public class PesagemRodoviariaImagem extends AbstractEntity{}}{{private static final
long serialVersionUID = 4181136886458805429L;}}{{@Id}}
{{ @SequenceGenerator(allocationSize = 1, name =
"PESAGEMRODOVIARIAIMAGEM_IDPESAGEMRODOVIARIAIMAGEM", sequenceName =
"IDPESAGEMRODOVIARIAIMAGEM")}}
{{ @GeneratedValue(strategy = GenerationType.SEQUENCE, generator =
"PESAGEMRODOVIARIAIMAGEM_IDPESAGEMRODOVIARIAIMAGEM")}}
{{ private Long idPesagemRodoviariaImagem;}}{{@ManyToOne(fetch = FetchType.LAZY)}}
{{ @JoinColumn(name = "IDPESO")}}
{{ private Peso peso;}}{{private String caminho;}}{{@ManyToOne(fetch = FetchType.LAZY)}}
{{ @JoinColumn(name = "IDCONFIGURACAOFTP")}}
{{ private ConfiguracaoFTP configuracaoFTP ;}}{{@ManyToOne(fetch = FetchType.LAZY)}}
{{ @JoinColumn(name = "IDCAMERA")}}
{{ private Camera camera;}}{{(a)Temporal(TemporalType.TIMESTAMP)}}
{{ private Date dataHoraCapturaImagem;}}{{@Transient}}
{{ private byte[] conteudoArquivo;}}
{{... get and sets}}
--
This message was sent by Atlassian Jira
(v8.13.1#813001)