Open jltnf54 opened 6 years ago
Please explain what you mean by "subclass aggregate"? What are your hierarchies of aggregate and event classes?
Example:
class MyAgregate extends RefelectiveMutableCommandProcessingAggrgate
And
Interface MyEvent extends Event
It work fine on the initial aggregaterepository.save()
But loading
aggregaterepository.find(identifier)
It fails to retrieve the apply method on the aggregate and cannot be passed to apply(MyEvent) since the signatures do not match, when retrieving the events from eventuate local dB events table
That's very strange. Are you using some tool/framework that manipulates class loaders, e.g. live reloading framework?
On Wed, Jun 27, 2018 at 11:59 AM, jltnf54 notifications@github.com wrote:
It work fine on the initial aggregaterepository.save()
But loading
aggregaterepository.find(identifier)
It fails to retrieve the apply method on the aggregate and cannot be passed to apply(MyEvent) since the signatures do not match, when retrieving the events from eventuate local dB events table
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/eventuate-clients/eventuate-client-java/issues/10#issuecomment-400792884, or mute the thread https://github.com/notifications/unsubscribe-auth/AAPB2hvwxwjK5wpp4m3JV_aoxYDBsh0Jks5uA9YdgaJpZM4U6Mq9 .
-- Learn microservices - http://learn.microservices.io Microservices application platform http://eventuate.io Consulting and training http://chrisrichardson.net
no
i can send my maven dependencies.
I think i found the issue. It is spring boot dev tools
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
once i removed this it works now
I believe that Spring Boot DevTools does something with class loaders that results in a MethodNotFoundException.
On Wed, Jun 27, 2018 at 12:45 PM, jltnf54 notifications@github.com wrote:
I think i found the issue. It is spring boot dev tools
org.springframework.boot spring-boot-devtools true
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/eventuate-clients/eventuate-client-java/issues/10#issuecomment-400806283, or mute the thread https://github.com/notifications/unsubscribe-auth/AAPB2gFxGnq1bKv70nsgaq0uRuKc4DOxks5uA-D1gaJpZM4U6Mq9 .
-- Learn microservices - http://learn.microservices.io Microservices application platform http://eventuate.io Consulting and training http://chrisrichardson.net
The following method fails to call apply on an subclass aggregate.
NoSuchMethodException is thrown when you have:
public void apply(Myevent event) {}
when loading an aggregate or saving and aggregate with previous events.