Project: mule
Issue MULE-7591: Mule fails to start if UntilSuccessful has a persistent object store with stored events
Consider the attached application. The mule event is persisted successfully when entering the until-successful block but upon an unexpected restart of the mule instance, the message could not be de-serialized again and an error in the logger is displayed with the following line: ERROR 2014-05-07 19:02:19,572 [WrapperListener_start_runner] org.mule.util.store.PartitionedPersistentObjectStore: Could not restore partition under directory /Users/juancavallotti/Documents/MuleEE/EE/mule342/.mule/objectstores/objectstore/d036c03b-d630-11e3-a6c7-ef75e8a7e5bc This happens because when the object store is open, it tries to cache the keys. Because the MuleEvent has a reference to its owning flow construct, a circular reference is created since the deserialized event tries to fetch the flow construct which triggered its loading. Steps to reproduce: Run the attached app and an ActiveMQ instance. Stop activeMQ place a non-empty file in /tmp/test/inbound/1 (you may configure a more convenient folder). stop mule start activemq start mule Observe the logger line Observe that the message that should have been recovered from the persistent object store is not delivered to the broker. Expected behavior: Persistent object store should lazily cache its entry upon its first use. Workaround: Temporal workaround until this gets fixed is to set the lazy-init property to true in the spring bean that creates the object store
Story points: 3