Thanks for responding Rossen,
Well, I have a Spring Webflow configuration with a custom conversation manager using a custom conversation reopository to store conversations with spring mongo db.
Code:
class CustomConversation implements Conversation {
...
public void unlock() {
lock.unlock();
lockCount--;
if (lockCount == 0) {
if (!ended) {
repository.saveConversation(this);
}
CustomConversationHolder.removeConversation(getId());
}
}
...
Code:
@Repository
public class CustomConversationRepository implements ConversationRepository {
...
public void saveConversation(Conversation conversation) {
logger.debug("Saving conversation: " + conversation);
mongoTemplate.save(conversation);
}
...
I didn't do anything else in special, just storing the conversations (I did not manipulate Flow Execution objects). I get a NPE when I start the flow. Digging into the source code I realized of the symptom described above. The 'messagesMemento' object gets created all by the Spring Web Flow framework, and at some point it stores an entry in its map containing a null key, and that is not possible to be stored in mongodb.
I hope that explains better.
Thanks,
Marco