
Originally Posted by
Javaid Bolaky
Hi Eric,
Importing a xml file from a jar file works for me.
Did you do
<import resource="classpath:/fwl/localization/ssh_key_tx3.private" />
by any chance?
try specifying classpath:
Sorry for the delay in my response. I'm not importing it as a resource as such as the object is expecting a resource name as a parameter, and it in turn is loading the resource:
Code:
<bean id="sftpSessionFactory"
class="org.springframework.integration.sftp.session.DefaultSftpSessionFactory">
<property name="host" value="localhost" />
<property name="privateKey" value="classpath:fwl/localization/ssh_key_tx3.private" />
<property name="port" value="22" />
<property name="user" value="fwl" />
</bean>
DefaultSftpSessionFactory then does the following:
Code:
String prvfile = this.privateKey.getFile().getAbsolutePath()
which it then tries to read as:
Code:
file=new File(prvfile);
fis=new FileInputStream(prvfile);
And then throws an error that the file cannot be found.
Any thoughts?
Tx,
Eric