ForbiddenClassException SerializableProxy

I used the last version of axon 4.5.11, i get the below error in this ligne when i update the status of a file, but the error doesn’t occure the first time

AggregateLifecycle.apply(new StatusUpdatedEvent(evt.externalId, evt.fileId, StatusEnum.SENDED));

when i delete the database the error doesn’t occure, do you know the cause of this error or any idea that can help ?

com.thoughtworks.xstream.security.ForbiddenClassException: org.hibernate.proxy.pojo.bytebuddy.SerializableProxy
at com.thoughtworks.xstream.security.NoTypePermission.allows(NoTypePermission.java:26)
at com.thoughtworks.xstream.mapper.SecurityMapper.realClass(SecurityMapper.java:74)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:125)
at com.thoughtworks.xstream.mapper.CachingMapper.realClass(CachingMapper.java:47)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:420)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:277)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:74)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:72)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:68)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:499)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:425)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:277)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:74)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:72)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:68)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:499)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:425)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:277)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:74)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:72)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:68)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:52)
at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:136)
at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1421)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1399)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1284)
at org.axonframework.serialization.xml.XStreamSerializer.doDeserialize(XStreamSerializer.java:141)
at org.axonframework.serialization.AbstractXStreamSerializer.deserialize(AbstractXStreamSerializer.java:160)
at org.axonframework.serialization.LazyDeserializingObject.getObject(LazyDeserializingObject.java:102)
at org.axonframework.serialization.SerializedMessage.getPayload(SerializedMessage.java:77)
at org.axonframework.messaging.MessageDecorator.getPayload(MessageDecorator.java:56)
at org.axonframework.messaging.annotation.PayloadParameterResolver.resolveParameterValue(PayloadParameterResolver.java:41)
at org.axonframework.messaging.annotation.AnnotatedMessageHandlingMember.resolveParameterValues(AnnotatedMessageHandlingMember.java:168)
at org.axonframework.messaging.annotation.AnnotatedMessageHandlingMember.handle(AnnotatedMessageHandlingMember.java:144)
at org.axonframework.messaging.annotation.AnnotatedHandlerInspector$NoMoreInterceptors.handle(AnnotatedHandlerInspector.java:372)
at org.axonframework.modelling.command.inspection.AnnotatedAggregateMetaModelFactory$AnnotatedAggregateModel.lambda$doPublish$17(AnnotatedAggregateMetaModelFactory.java:565)
at java.util.Optional.ifPresent(Optional.java:159)
at org.axonframework.modelling.command.inspection.AnnotatedAggregateMetaModelFactory$AnnotatedAggregateModel.doPublish(AnnotatedAggregateMetaModelFactory.java:562)
at org.axonframework.modelling.command.inspection.AnnotatedAggregateMetaModelFactory$AnnotatedAggregateModel.publish(AnnotatedAggregateMetaModelFactory.java:557)
at org.axonframework.modelling.command.inspection.AnnotatedAggregate.publish(AnnotatedAggregate.java:378)
at org.axonframework.eventsourcing.EventSourcedAggregate.publish(EventSourcedAggregate.java:253)
at java.util.Iterator.forEachRemaining(Iterator.java:116)
at org.axonframework.eventsourcing.EventSourcedAggregate.lambda$initializeState$0(EventSourcedAggregate.java:284)
at org.axonframework.modelling.command.inspection.AnnotatedAggregate.lambda$execute$2(AnnotatedAggregate.java:349)
at org.axonframework.modelling.command.AggregateLifecycle.lambda$execute$0(AggregateLifecycle.java:189)
at org.axonframework.messaging.Scope.executeWithResult(Scope.java:111)
at org.axonframework.modelling.command.AggregateLifecycle.execute(AggregateLifecycle.java:188)
at org.axonframework.modelling.command.inspection.AnnotatedAggregate.execute(AnnotatedAggregate.java:349)
at org.axonframework.eventsourcing.EventSourcedAggregate.initializeState(EventSourcedAggregate.java:281)
at org.axonframework.eventsourcing.EventSourcingRepository.doLoadWithLock(EventSourcingRepository.java:131)
at org.axonframework.eventsourcing.EventSourcingRepository.doLoadWithLock(EventSourcingRepository.java:52)
at org.axonframework.modelling.command.LockingRepository.doLoad(LockingRepository.java:128)
at org.axonframework.modelling.command.LockingRepository.doLoad(LockingRepository.java:56)
at org.axonframework.modelling.command.AbstractRepository.lambda$load$4(AbstractRepository.java:122)
at java.util.HashMap.computeIfAbsent(HashMap.java:1127)
at org.axonframework.modelling.command.AbstractRepository.load(AbstractRepository.java:121)
at org.axonframework.modelling.command.AggregateAnnotationCommandHandler$AggregateCommandHandler.handle(AggregateAnnotationCommandHandler.java:460)
at org.axonframework.modelling.command.AggregateAnnotationCommandHandler$AggregateCommandHandler.handle(AggregateAnnotationCommandHandler.java:449)
at org.axonframework.modelling.command.AggregateAnnotationCommandHandler.handle(AggregateAnnotationCommandHandler.java:172)
at org.axonframework.modelling.command.AggregateAnnotationCommandHandler.handle(AggregateAnnotationCommandHandler.java:60)
at org.axonframework.messaging.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:57)
at org.axonframework.messaging.interceptors.CorrelationDataInterceptor.handle(CorrelationDataInterceptor.java:65)
at org.axonframework.messaging.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:55)
at org.axonframework.messaging.unitofwork.DefaultUnitOfWork.executeWithResult(DefaultUnitOfWork.java:74)
at org.axonframework.commandhandling.SimpleCommandBus.handle(SimpleCommandBus.java:177)
at org.axonframework.commandhandling.SimpleCommandBus.doDispatch(SimpleCommandBus.java:143)
at org.axonframework.commandhandling.SimpleCommandBus.dispatch(SimpleCommandBus.java:111)
at org.axonframework.commandhandling.gateway.AbstractCommandGateway.send(AbstractCommandGateway.java:75)
at org.axonframework.commandhandling.gateway.DefaultCommandGateway.send(DefaultCommandGateway.java:73)
at org.axonframework.commandhandling.gateway.DefaultCommandGateway.sendAndWait(DefaultCommandGateway.java:90)

What Java version are you using?

Please also take a look at Getting xstream dependency exception since it might be related…