why Apache Camel file to sftp route fails
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
I am new to Camel. I read the basics and managed to do simple file to file route. When I tried from file to sftp. It failed.
For testing, I have windows 10 as host os and mint Linux as guest os. I can access from win to linux by sftp client. So I have no issue with the access between host an guest. I tried the following code:-
public class App
{
public static void main(Stringargs) throws Exception {
CamelContext camelContext = new DefaultCamelContext();
try {
camelContext.addRoutes(new FtpRouteBuilder());
camelContext.start();
Thread.sleep(200000);
// do other stuff...
}catch (Exception e){
System.out.printf("ex: "+e.getMessage());
}
finally {
camelContext.stop();
}
}
}
public class FtpRouteBuilder extends RouteBuilder {
@Override
public void configure() throws Exception {
try{
from("file:c:/temp/input/")
.to("sftp://sftpuser@192.168.10.54/?password=dev&passiveMode=true");
}catch (Exception ex){
System.out.printf("ex: "+ex.getMessage());
}
}
}
When I tried this code. I got the following exception:-
Failed to create route route1 at: >>>
To[sftp://sftpuser@192.168.10.54/?password=dev&passiveMode=true] <<<
in route: Route(route1)[[From[file:c:/temp/input/]] ->
[To[sftp://sftp... because of Failed to resolve endpoint:
sftp://sftpuser@192.168.10.54/?passiveMode=true&password=dev due to:
No component found with scheme: sftp18/11/24 17:50:30 INFO
impl.DefaultCamelContext: Apache Camel 2.15.1 (CamelContext: camel-1)
uptime 0.296 seconds
What is wrong and how to fix it?
java file apache-camel sftp
add a comment |
I am new to Camel. I read the basics and managed to do simple file to file route. When I tried from file to sftp. It failed.
For testing, I have windows 10 as host os and mint Linux as guest os. I can access from win to linux by sftp client. So I have no issue with the access between host an guest. I tried the following code:-
public class App
{
public static void main(Stringargs) throws Exception {
CamelContext camelContext = new DefaultCamelContext();
try {
camelContext.addRoutes(new FtpRouteBuilder());
camelContext.start();
Thread.sleep(200000);
// do other stuff...
}catch (Exception e){
System.out.printf("ex: "+e.getMessage());
}
finally {
camelContext.stop();
}
}
}
public class FtpRouteBuilder extends RouteBuilder {
@Override
public void configure() throws Exception {
try{
from("file:c:/temp/input/")
.to("sftp://sftpuser@192.168.10.54/?password=dev&passiveMode=true");
}catch (Exception ex){
System.out.printf("ex: "+ex.getMessage());
}
}
}
When I tried this code. I got the following exception:-
Failed to create route route1 at: >>>
To[sftp://sftpuser@192.168.10.54/?password=dev&passiveMode=true] <<<
in route: Route(route1)[[From[file:c:/temp/input/]] ->
[To[sftp://sftp... because of Failed to resolve endpoint:
sftp://sftpuser@192.168.10.54/?passiveMode=true&password=dev due to:
No component found with scheme: sftp18/11/24 17:50:30 INFO
impl.DefaultCamelContext: Apache Camel 2.15.1 (CamelContext: camel-1)
uptime 0.296 seconds
What is wrong and how to fix it?
java file apache-camel sftp
1
Seems that you're missing the ftp libraries (camel-ftp
). Check the component's page to see what dependency to add: people.apache.org/~dkulp/camel/ftp2.html
– ernest_k
Nov 24 '18 at 16:59
Thanks, could you pls check my answer and tell me how to fix the warning.
– masiboo
Nov 24 '18 at 17:47
Check the javadocs here: camel.apache.org/maven/current/camel-core/apidocs/org/apache/… . It seems that it's a flag you set on your camel context. If you have a different error following this, please post it on a different question
– ernest_k
Nov 24 '18 at 17:55
add a comment |
I am new to Camel. I read the basics and managed to do simple file to file route. When I tried from file to sftp. It failed.
For testing, I have windows 10 as host os and mint Linux as guest os. I can access from win to linux by sftp client. So I have no issue with the access between host an guest. I tried the following code:-
public class App
{
public static void main(Stringargs) throws Exception {
CamelContext camelContext = new DefaultCamelContext();
try {
camelContext.addRoutes(new FtpRouteBuilder());
camelContext.start();
Thread.sleep(200000);
// do other stuff...
}catch (Exception e){
System.out.printf("ex: "+e.getMessage());
}
finally {
camelContext.stop();
}
}
}
public class FtpRouteBuilder extends RouteBuilder {
@Override
public void configure() throws Exception {
try{
from("file:c:/temp/input/")
.to("sftp://sftpuser@192.168.10.54/?password=dev&passiveMode=true");
}catch (Exception ex){
System.out.printf("ex: "+ex.getMessage());
}
}
}
When I tried this code. I got the following exception:-
Failed to create route route1 at: >>>
To[sftp://sftpuser@192.168.10.54/?password=dev&passiveMode=true] <<<
in route: Route(route1)[[From[file:c:/temp/input/]] ->
[To[sftp://sftp... because of Failed to resolve endpoint:
sftp://sftpuser@192.168.10.54/?passiveMode=true&password=dev due to:
No component found with scheme: sftp18/11/24 17:50:30 INFO
impl.DefaultCamelContext: Apache Camel 2.15.1 (CamelContext: camel-1)
uptime 0.296 seconds
What is wrong and how to fix it?
java file apache-camel sftp
I am new to Camel. I read the basics and managed to do simple file to file route. When I tried from file to sftp. It failed.
For testing, I have windows 10 as host os and mint Linux as guest os. I can access from win to linux by sftp client. So I have no issue with the access between host an guest. I tried the following code:-
public class App
{
public static void main(Stringargs) throws Exception {
CamelContext camelContext = new DefaultCamelContext();
try {
camelContext.addRoutes(new FtpRouteBuilder());
camelContext.start();
Thread.sleep(200000);
// do other stuff...
}catch (Exception e){
System.out.printf("ex: "+e.getMessage());
}
finally {
camelContext.stop();
}
}
}
public class FtpRouteBuilder extends RouteBuilder {
@Override
public void configure() throws Exception {
try{
from("file:c:/temp/input/")
.to("sftp://sftpuser@192.168.10.54/?password=dev&passiveMode=true");
}catch (Exception ex){
System.out.printf("ex: "+ex.getMessage());
}
}
}
When I tried this code. I got the following exception:-
Failed to create route route1 at: >>>
To[sftp://sftpuser@192.168.10.54/?password=dev&passiveMode=true] <<<
in route: Route(route1)[[From[file:c:/temp/input/]] ->
[To[sftp://sftp... because of Failed to resolve endpoint:
sftp://sftpuser@192.168.10.54/?passiveMode=true&password=dev due to:
No component found with scheme: sftp18/11/24 17:50:30 INFO
impl.DefaultCamelContext: Apache Camel 2.15.1 (CamelContext: camel-1)
uptime 0.296 seconds
What is wrong and how to fix it?
java file apache-camel sftp
java file apache-camel sftp
asked Nov 24 '18 at 16:56
masiboomasiboo
1,37032662
1,37032662
1
Seems that you're missing the ftp libraries (camel-ftp
). Check the component's page to see what dependency to add: people.apache.org/~dkulp/camel/ftp2.html
– ernest_k
Nov 24 '18 at 16:59
Thanks, could you pls check my answer and tell me how to fix the warning.
– masiboo
Nov 24 '18 at 17:47
Check the javadocs here: camel.apache.org/maven/current/camel-core/apidocs/org/apache/… . It seems that it's a flag you set on your camel context. If you have a different error following this, please post it on a different question
– ernest_k
Nov 24 '18 at 17:55
add a comment |
1
Seems that you're missing the ftp libraries (camel-ftp
). Check the component's page to see what dependency to add: people.apache.org/~dkulp/camel/ftp2.html
– ernest_k
Nov 24 '18 at 16:59
Thanks, could you pls check my answer and tell me how to fix the warning.
– masiboo
Nov 24 '18 at 17:47
Check the javadocs here: camel.apache.org/maven/current/camel-core/apidocs/org/apache/… . It seems that it's a flag you set on your camel context. If you have a different error following this, please post it on a different question
– ernest_k
Nov 24 '18 at 17:55
1
1
Seems that you're missing the ftp libraries (
camel-ftp
). Check the component's page to see what dependency to add: people.apache.org/~dkulp/camel/ftp2.html– ernest_k
Nov 24 '18 at 16:59
Seems that you're missing the ftp libraries (
camel-ftp
). Check the component's page to see what dependency to add: people.apache.org/~dkulp/camel/ftp2.html– ernest_k
Nov 24 '18 at 16:59
Thanks, could you pls check my answer and tell me how to fix the warning.
– masiboo
Nov 24 '18 at 17:47
Thanks, could you pls check my answer and tell me how to fix the warning.
– masiboo
Nov 24 '18 at 17:47
Check the javadocs here: camel.apache.org/maven/current/camel-core/apidocs/org/apache/… . It seems that it's a flag you set on your camel context. If you have a different error following this, please post it on a different question
– ernest_k
Nov 24 '18 at 17:55
Check the javadocs here: camel.apache.org/maven/current/camel-core/apidocs/org/apache/… . It seems that it's a flag you set on your camel context. If you have a different error following this, please post it on a different question
– ernest_k
Nov 24 '18 at 17:55
add a comment |
1 Answer
1
active
oldest
votes
Thanks to ernest_k for pointing out the missing library. I added:-
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-ftp</artifactId>
<version>2.15.1</version>
</dependency>
public class FtpRouteBuilder extends RouteBuilder {
@Override
public void configure() throws Exception {
try{
from("file:c:/temp/input/")
..streamCaching()
.to("sftp://sftpuser@192.168.10.54:/sftpuser/?password=dev");
}catch (Exception ex){
System.out.printf("ex: "+ex.getMessage());
}
}
}
It is fixed and the main point to note that the sftp URI. It works.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53460405%2fwhy-apache-camel-file-to-sftp-route-fails%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks to ernest_k for pointing out the missing library. I added:-
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-ftp</artifactId>
<version>2.15.1</version>
</dependency>
public class FtpRouteBuilder extends RouteBuilder {
@Override
public void configure() throws Exception {
try{
from("file:c:/temp/input/")
..streamCaching()
.to("sftp://sftpuser@192.168.10.54:/sftpuser/?password=dev");
}catch (Exception ex){
System.out.printf("ex: "+ex.getMessage());
}
}
}
It is fixed and the main point to note that the sftp URI. It works.
add a comment |
Thanks to ernest_k for pointing out the missing library. I added:-
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-ftp</artifactId>
<version>2.15.1</version>
</dependency>
public class FtpRouteBuilder extends RouteBuilder {
@Override
public void configure() throws Exception {
try{
from("file:c:/temp/input/")
..streamCaching()
.to("sftp://sftpuser@192.168.10.54:/sftpuser/?password=dev");
}catch (Exception ex){
System.out.printf("ex: "+ex.getMessage());
}
}
}
It is fixed and the main point to note that the sftp URI. It works.
add a comment |
Thanks to ernest_k for pointing out the missing library. I added:-
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-ftp</artifactId>
<version>2.15.1</version>
</dependency>
public class FtpRouteBuilder extends RouteBuilder {
@Override
public void configure() throws Exception {
try{
from("file:c:/temp/input/")
..streamCaching()
.to("sftp://sftpuser@192.168.10.54:/sftpuser/?password=dev");
}catch (Exception ex){
System.out.printf("ex: "+ex.getMessage());
}
}
}
It is fixed and the main point to note that the sftp URI. It works.
Thanks to ernest_k for pointing out the missing library. I added:-
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-ftp</artifactId>
<version>2.15.1</version>
</dependency>
public class FtpRouteBuilder extends RouteBuilder {
@Override
public void configure() throws Exception {
try{
from("file:c:/temp/input/")
..streamCaching()
.to("sftp://sftpuser@192.168.10.54:/sftpuser/?password=dev");
}catch (Exception ex){
System.out.printf("ex: "+ex.getMessage());
}
}
}
It is fixed and the main point to note that the sftp URI. It works.
edited Nov 24 '18 at 17:58
ernest_k
25k43151
25k43151
answered Nov 24 '18 at 17:46
masiboomasiboo
1,37032662
1,37032662
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53460405%2fwhy-apache-camel-file-to-sftp-route-fails%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Seems that you're missing the ftp libraries (
camel-ftp
). Check the component's page to see what dependency to add: people.apache.org/~dkulp/camel/ftp2.html– ernest_k
Nov 24 '18 at 16:59
Thanks, could you pls check my answer and tell me how to fix the warning.
– masiboo
Nov 24 '18 at 17:47
Check the javadocs here: camel.apache.org/maven/current/camel-core/apidocs/org/apache/… . It seems that it's a flag you set on your camel context. If you have a different error following this, please post it on a different question
– ernest_k
Nov 24 '18 at 17:55