Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Reserializing a lenient fallback DefaultListableBeanFactory causes an error [SPR-17508] #22040
In #20321 the deserialization of
This causes later reserializations [and they may appear, since the class implements
Maybe the desired ID (which could not be looked up in the static map
// Lenient fallback: dummy factory in case of original factory not found... DefaultListableBeanFactory factory = new DefaultListableBeanFactory(); // make the factory effectively serializable factory.setSerializationId(this.id); return factory;
But perhaps this causes undesired side-effects because other dead references to the same factory will become alive when they are deserialized in later calls (they will find the registered dummy factory).
This is actually happening in our software when opening our web application, using an old session containing an
We are using the
Juergen Hoeller commented
Using a dummy factory with