0

I am using apache-servicemix-4.3.1-fuse-01-15 and I am doing hot deployment.

I have placed one blueprint xml inside deploy folder of service-mix as shown below

<blueprint
xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
 <camelContext xmlns="http://camel.apache.org/schema/blueprint">
    <route>
        <from uri="file://D:/apache-servicemix-4.3.1-fuse-01-15/apache-servicemix-4.3.1-fuse-01-15/source/?recursive=true" /><!--sample path of source folder-->
        <to uri="file:////192.168.68.215/Fuse"/><!--sample path of destination folder-->
    </route>
</camelContext>
</blueprint>

As you can see I want to transfer files to another computer from my local pc.But in the log it is giving following error, though I have acess to the path mentioned in to.

Caused by: java.io.FileNotFoundException: \\192.168.68.215\Fuse\core_logs-12012012\core-logs_20110908 - Copy - Copy (4)\core-logs_20110908.log (The system cannot find the path specified)

If I replace the IP with my local directory path, it is working fine.

I am curious to know what went wrong here.

Shall I use ftp,sftps or ftp. Is it the case that what I am doing will never work.Do I need to mentioned username and password.

рüффп
  • 5,172
  • 34
  • 67
  • 113
C4CodeE4Exe
  • 3,840
  • 8
  • 39
  • 46

2 Answers2

0

If you want to transfer files between computers, you would need to use a protocol that supports that such as:

  1. file
  2. ftp
  3. scp

As you use windows, you can use the file system by setting up a network shared connection from your computer to the remote computer. eg mount the remote computer as if it was a local drive (eg H: or any free letter). Eg basically if you can get it working so you can see the remote computer using the Windows File Explorer. Hint: The file component in Camel uses Java's java.io.File API. So whatever you can get working with that, is supported then.

FTP would require the other computer to have a FTP server.

SCP is often not supported on Windows, and you would need to install software to support that.

Claus Ibsen
  • 56,060
  • 7
  • 50
  • 65
  • Thanks.. @Claus. I will try the File option because I do not want to install FTP server on destination machines. – C4CodeE4Exe Sep 27 '12 at 09:17
  • I have mapped the drive from My Computer--> Map Network Drive. But it is throwing same error? any insight what could have caused this? – C4CodeE4Exe Sep 27 '12 at 09:49
  • You need to map the drive to a letter, eg H:\ or what free letter you have. – Claus Ibsen Sep 27 '12 at 16:30
  • Yes. I did that, now it looks like , but still it is not able to transfer files.It says that Server not found.Would you please provide me any working example web-link. – C4CodeE4Exe Sep 27 '12 at 16:56
  • I am still getting this error Caused by: java.io.FileNotFoundException: Z:\core.log.1 (The system cannot find the path specified). – C4CodeE4Exe Oct 04 '12 at 07:39
0

i am not sure if camel file component which is using java's file api can do this out of the box . But if you are hell bent on using a camel route for doing this , you can write a custom bean in the part which takes in the file/filepath and copies it to the remote machine via sftp or scp as claus mentioned

if it is a linux machine you can easily do sftp/scp via jsch , check the examples

if its a window machine you can setup a ftp server and use apache commons VFS

sanre6
  • 797
  • 2
  • 11
  • 28