1
votes

I am having an issue with the inbound channel adapter and the whole application failing if the local directory does not exist, although I have auto-create-local-directory set to true. It seems to be failing in the very beginning when creating the bean. What can I do to make it either create the directory or at least not fail?

Thanks a lot.

1

1 Answers

1
votes

Well, you should share config and StackTrace as well.

Having auto-create-local-directory="true" and directory does not exist can tell me that your OS user doesn't have permission to create that directory. Just because FileReadingMessageSource:

protected void onInit() {
    Assert.notNull(directory, "'directory' must not be null");
    if (!this.directory.exists() && this.autoCreateDirectory) {
        this.directory.mkdirs();
    }
    Assert.isTrue(this.directory.exists(),
            "Source directory [" + directory + "] does not exist.");

in the very beginning when creating the bean.