春季啓動應用程序獲得了入站SFTP適配器造成的:java.lang.IllegalArgumentException異常:evaluationContext不能爲空
錯誤與名製作豆「sftpMessageSource_DebitNotification_SE」在com.canaldigital.tsi.bank.xml定義的錯誤。 config.BankFtpListner:調用init方法失敗;嵌套異常是java.lang.IllegalArgumentException:evaluationContext不能爲null org.springframework.beans.factory.BeanCreationException:在com.canaldigital.tsi.bank.xml.config.BankFtpListner中定義名稱爲'sftpMessageSource_DebitNotification_SE'的Bean時創建錯誤:調用初始化方法失敗;嵌套的例外是java.lang.IllegalArgumentException異常:evaluationContext不能爲空 在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1578) 在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory。 doCreateBean(AbstractAutowireCapableBeanFactory.java:545) 在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) 在org.springframework.beans.factory.support.AbstractBeanFactory $ 1.getObject(AbstractBeanFactory.java :306) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactor y.doGetBean(AbstractBeanFactory.java:302) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory。的java:772) 在org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839) 在org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538) 在org.springframework。 boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:766) at org.springframework.boot.SpringAppli cation.createAndRefreshContext(SpringApplication.java:361) 在org.springframework.boot.SpringApplication.run(SpringApplication.java:307) 在org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:134) 在com.canaldigital.tsi.core.CoreRunner.run(CoreRunner.java:29) at com.canaldigital.tsi.bank.xml.App.main(App.java:18) 引起:java.lang.IllegalArgumentException: evaluationContext不能以犧牲org.springframework.util.Assert.notNull(Assert.java:115) 爲空 在org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer.afterPropertiesSet(AbstractInboundFileSynchronizer.java:154) 在組織.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchro nizingMessageSource.afterPropertiesSet(AbstractInboundFileSynchronizingMessageSource.java:151) 在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1637) 在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory。 Java的:1574) ...... 16多個
public SessionFactory<LsEntry> sftpSessionFactory_listener() {
DefaultSftpSessionFactory factory = new DefaultSftpSessionFactory();
System.out.println("sftp host is::" + env.getProperty("sftp.host"));
factory.setPrivateKey(sftpKeyResourceAdapter());
factory.setHost(env.getProperty("sftp.host"));
factory.setUser(env.getProperty("sftp.username"));
factory.setPort(Integer.valueOf(env.getProperty("sftp.serverPort")));
logger.debug("SFTP Session:::"+factory.getSession().isOpen());
return new CachingSessionFactory<LsEntry>(factory);
}
public SftpInboundFileSynchronizer sftpInboundFileSynchronizer_DebitNotification_SE() {
SftpInboundFileSynchronizer debitFileSynchronizer = new SftpInboundFileSynchronizer(sftpSessionFactory_listener());
logger.debug("sftpInboundFileSynchronizer_DebitNotification_SE Starts");
debitFileSynchronizer.setDeleteRemoteFiles(true);
try {
debitFileSynchronizer.setRemoteDirectory(remot);
CompositeFileListFilter<LsEntry> debitFilters = new CompositeFileListFilter<>();
debitFilters.addFilter(new AcceptOnceFileListFilter());
debitFilters.addFilter(new SftpSimplePatternFileListFilter(ibs2BankConfigDAO.getApplicationConfiguration().get(
"SE_CAMT_054d_FILE_NAME_PATTERN")));
debitFilters.addFilter(lastModifiedFileFilter());
debitFileSynchronizer.setFilter(debitFilters);
} catch (IBS2BankException e) {
logger.error("Error creating sftpInboundFileSynchronizer_DebitNotification_SE::" + e.getMessage());
} catch (Exception e) {
logger.debug("Error is:::"+e.getMessage());
}
return debitFileSynchronizer;
}
@InboundChannelAdapter(value = "bankRequestListenerDebitNotification_SE", poller = @Poller(fixedDelay = "10000"))
@Bean
public MessageSource<File> sftpMessageSource_DebitNotification_SE() {
logger.debug("sftpMessageSource_DebitNotification_SE Starts");
SftpInboundFileSynchronizingMessageSource source = new SftpInboundFileSynchronizingMessageSource(
sftpInboundFileSynchronizer_DebitNotification_SE());
logger.debug("sftpMessageSource_DebitNotification_SE Starts1");
source.setAutoCreateLocalDirectory(true);
source.setLocalDirectory(new File("/ibs2bank/Temp_Download/Nordea/CAMT054D/SE"));
logger.debug("sftpMessageSource_DebitNotification_SE Starts2");
logger.debug("sftpMessageSource_DebitNotification_SE Starts3");
source.setLocalFilter(new AcceptOnceFileListFilter<File>());
logger.debug("sftpMessageSource_DebitNotification_SE Starts4");
return source;
}
@Bean
public PollableChannel bankRequestListenerDebitNotification_SE() {
return new QueueChannel();
}
任何人遇到此問題仍然無法找出原因 –
您的問題不包含問題。相當悖論。 –