camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Continuation of NPE for FTP endpoint
Date Mon, 02 Jan 2012 09:39:18 GMT
Hi

You have 2 slashes on the FTP starting path, eg you have //
ftp://user@service.example.com//?

Is that on purpose?


On Thu, Dec 29, 2011 at 5:14 PM, David Wynter <david_wynter@yahoo.com> wrote:
> Sorry about that, web browser based email client, sometime I send it prematurely.
>
> Here is the trace from my ftp get endpoint NPE
>
> pool-1-thread-1 DEBUG impl.DefaultComponent - Creating endpoint uri=[ftp://user@service.example.com//?binary=true&fileName=equity_desc.enc.out&noop=true&passiveMode=true&password=somepassword],
path=[user@service.example.com//], parameters=[{binary=true, fileName=equity_desc.enc.out,
noop=true, passiveMode=true, password=somepassword}]
> pool-1-thread-1 DEBUG impl.DefaultCamelContext - ftp://user@service.example.com//?binary=true&fileName=equity_desc.enc.out&noop=true&passiveMode=true&password=somepassword
converted to endpoint: Endpoint[ftp://user@service.example.com//?binary=true&fileName=equity_desc.enc.out&noop=true&passiveMode=true&password=******]
by component: org.apache.camel.component.file.remote.FtpComponent@3c214a7a
> pool-1-thread-1 DEBUG impl.DefaultComponent - Creating endpoint uri=[file:///C:/SecMaster/vendor_files/bbg_ps_enc/?fileExist=Override],
path=[/C:/SecMaster/vendor_files/bbg_ps_enc/], parameters=[{fileExist=Override}]
> pool-1-thread-1 DEBUG converter.DefaultTypeConverter - Promoting fallback type converter
as a known type converter to convert from: org.apache.camel.component.file.GenericFileExist
to: java.lang.String for the fallback converter: org.apache.camel.impl.converter.EnumTypeConverter@5705013c
> pool-1-thread-1 DEBUG impl.DefaultCamelContext - file:///C:/SecMaster/vendor_files/bbg_ps_enc/?fileExist=Override
converted to endpoint: Endpoint[file:///C:/SecMaster/vendor_files/bbg_ps_enc/?fileExist=Override]
by component: org.apache.camel.component.file.FileComponent@2b619bca
> pool-1-thread-1 DEBUG processor.DefaultChannel - Initialize channel for target: 'To[file:/C:/SecMaster/vendor_files/bbg_ps_enc/?fileExist=Override]'
> pool-1-thread-1 DEBUG impl.DefaultCamelContext - Warming up route id: route2 having autoStartup=true
> pool-1-thread-1 DEBUG impl.RouteService - Starting services on route: route2
> pool-1-thread-1 DEBUG remote.FtpEndpoint - Created FTPClient [connectTimeout: 10000,
soTimeout: 0, dataTimeout: 30000]: org.apache.commons.net.ftp.FTPClient@1c1681c
> pool-1-thread-1 DEBUG impl.DefaultExecutorServiceStrategy - Created new scheduled thread
pool for source: FtpConsumer[ftp://user@service.example.com//?binary=true&fileName=equity_desc.enc.out&noop=true&passiveMode=true&password=******]
with name: ftp://user@service.example.com//?binary=true&fileName=equity_desc.enc.out&noop=true&passiveMode=true&password=somepassword.
[poolSize=1]. -> java.util.concurrent.ScheduledThreadPoolExecutor@4f36836c
> pool-1-thread-1 INFO  remote.FtpEndpoint - Endpoint is configured with noop=true so
forcing endpoint to be idempotent as well
> pool-1-thread-1 INFO  remote.FtpEndpoint - Using default memory based idempotent repository
with cache max size: 1000
> pool-1-thread-1 DEBUG impl.RouteService - Starting child service on route: route2 ->
Instrumentation:route[UnitOfWork(Channel[sendTo(Endpoint[file:///C:/SecMaster/vendor_files/bbg_ps_enc/?fileExist=Override])])]
> pool-1-thread-1 DEBUG file.GenericFileProducer - Starting producer: Producer[file:///C:/SecMaster/vendor_files/bbg_ps_enc/?fileExist=Override]
> pool-1-thread-1 DEBUG impl.ProducerCache - Adding to producer cache with key: Endpoint[file:///C:/SecMaster/vendor_files/bbg_ps_enc/?fileExist=Override]
for producer: Producer[file:///C:/SecMaster/vendor_files/bbg_ps_enc/?fileExist=Override]
> pool-1-thread-1 DEBUG processor.DefaultErrorHandler - Redelivery enabled: false on error
handler: DefaultErrorHandler[TraceInterceptor[To[file:/C:/SecMaster/vendor_files/bbg_ps_enc/?fileExist=Override]]]
> pool-1-thread-1 DEBUG impl.RouteService - Starting child service on route: route2 ->
UnitOfWork(Channel[sendTo(Endpoint[file:///C:/SecMaster/vendor_files/bbg_ps_enc/?fileExist=Override])])
> pool-1-thread-1 DEBUG impl.RouteService - Starting child service on route: route2 ->
Channel[sendTo(Endpoint[file:///C:/SecMaster/vendor_files/bbg_ps_enc/?fileExist=Override])]
> pool-1-thread-1 DEBUG impl.RouteService - Starting child service on route: route2 ->
sendTo(Endpoint[file:///C:/SecMaster/vendor_files/bbg_ps_enc/?fileExist=Override])
> pool-1-thread-1 DEBUG impl.DefaultCamelContext - Route: route2 >>> EventDrivenConsumerRoute[Endpoint[ftp://user@service.example.com//?binary=true&fileName=equity_desc.enc.out&noop=true&passiveMode=true&password=******]
-> Instrumentation:route[UnitOfWork(Channel[sendTo(Endpoint[file:///C:/SecMaster/vendor_files/bbg_ps_enc/?fileExist=Override])])]]
> pool-1-thread-1 DEBUG impl.DefaultCamelContext - Starting consumer (order: 1002) on route:
route2
> pool-1-thread-1 DEBUG remote.FtpConsumer - Starting consumer: FtpConsumer[ftp://user@service.example.com//?binary=true&fileName=equity_desc.enc.out&noop=true&passiveMode=true&password=******]
> pool-1-thread-1 DEBUG impl.ScheduledPollConsumer - Scheduling poll (fixed delay) with
initialDelay: 1000, delay: 500 (milliseconds) for: Endpoint[ftp://user@service.example.com//?binary=true&fileName=equity_desc.enc.out&noop=true&passiveMode=true&password=******]
> pool-1-thread-1 DEBUG remote.FtpEndpoint - Parameters for Generic file process strategy
{readLock=none, noop=true, readLockTimeout=20000, readLockCheckInterval=5000}
> pool-1-thread-1 DEBUG remote.FtpEndpoint - Using Generic file process strategy: org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy@73e373de
> pool-1-thread-1 INFO  impl.DefaultCamelContext - Route: route2 started and consuming
from: Endpoint[ftp://user@service.example.com//?binary=true&fileName=equity_desc.enc.out&noop=true&passiveMode=true&password=******]
> pool-1-thread-1 DEBUG processor.DefaultChannel - Initialize channel for target: 'To[file:/C:/SecMaster/vendor_files/bbg_ps_enc/?fileExist=Override]'
> pool-1-thread-1 DEBUG impl.DefaultCamelContext - Warming up route id: route2 having autoStartup=true
> pool-1-thread-1 DEBUG impl.RouteService - Starting services on route: route2
> pool-1-thread-1 DEBUG remote.FtpEndpoint - Created FTPClient [connectTimeout: 10000,
soTimeout: 0, dataTimeout: 30000]: org.apache.commons.net.ftp.FTPClient@59cc2f42
> pool-1-thread-1 DEBUG impl.DefaultExecutorServiceStrategy - Created new scheduled thread
pool for source: FtpConsumer[ftp://user@service.example.com//?binary=true&fileName=equity_desc.enc.out&noop=true&passiveMode=true&password=******]
with name: ftp://user@service.example.com//?binary=true&fileName=equity_desc.enc.out&noop=true&passiveMode=true&password=somepassword.
[poolSize=1]. -> java.util.concurrent.ScheduledThreadPoolExecutor@78e941c2
> pool-1-thread-1 DEBUG impl.RouteService - Starting child service on route: route2 ->
Instrumentation:route[UnitOfWork(Channel[sendTo(Endpoint[file:///C:/SecMaster/vendor_files/bbg_ps_enc/?fileExist=Override])])]
> pool-1-thread-1 DEBUG file.GenericFileProducer - Starting producer: Producer[file:///C:/SecMaster/vendor_files/bbg_ps_enc/?fileExist=Override]
> pool-1-thread-1 DEBUG impl.ProducerCache - Adding to producer cache with key: Endpoint[file:///C:/SecMaster/vendor_files/bbg_ps_enc/?fileExist=Override]
for producer: Producer[file:///C:/SecMaster/vendor_files/bbg_ps_enc/?fileExist=Override]
> pool-1-thread-1 DEBUG processor.DefaultErrorHandler - Redelivery enabled: false on error
handler: DefaultErrorHandler[TraceInterceptor[To[file:/C:/SecMaster/vendor_files/bbg_ps_enc/?fileExist=Override]]]
> pool-1-thread-1 DEBUG impl.RouteService - Starting child service on route: route2 ->
UnitOfWork(Channel[sendTo(Endpoint[file:///C:/SecMaster/vendor_files/bbg_ps_enc/?fileExist=Override])])
> pool-1-thread-1 DEBUG impl.RouteService - Starting child service on route: route2 ->
Channel[sendTo(Endpoint[file:///C:/SecMaster/vendor_files/bbg_ps_enc/?fileExist=Override])]
> pool-1-thread-1 DEBUG impl.RouteService - Starting child service on route: route2 ->
sendTo(Endpoint[file:///C:/SecMaster/vendor_files/bbg_ps_enc/?fileExist=Override])
> pool-1-thread-1 DEBUG impl.DefaultCamelContext - Route: route2 >>> EventDrivenConsumerRoute[Endpoint[ftp://user@service.example.com//?binary=true&fileName=equity_desc.enc.out&noop=true&passiveMode=true&password=******]
-> Instrumentation:route[UnitOfWork(Channel[sendTo(Endpoint[file:///C:/SecMaster/vendor_files/bbg_ps_enc/?fileExist=Override])])]]
> pool-1-thread-1 DEBUG impl.DefaultCamelContext - Starting consumer (order: 1003) on route:
route2
> pool-1-thread-1 DEBUG remote.FtpConsumer - Starting consumer: FtpConsumer[ftp://user@service.example.com//?binary=true&fileName=equity_desc.enc.out&noop=true&passiveMode=true&password=******]
> pool-1-thread-1 DEBUG impl.ScheduledPollConsumer - Scheduling poll (fixed delay) with
initialDelay: 1000, delay: 500 (milliseconds) for: Endpoint[ftp://user@service.example.com//?binary=true&fileName=equity_desc.enc.out&noop=true&passiveMode=true&password=******]
> pool-1-thread-1 INFO  impl.DefaultCamelContext - Route: route2 started and consuming
from: Endpoint[ftp://user@service.example.com//?binary=true&fileName=equity_desc.enc.out&noop=true&passiveMode=true&password=******]
>
> ...
>
> Camel (camel-1) thread #2 - ftp://user@service.example.com// WARN  remote.RemoteFilePollingConsumerPollStrategy
- Consumer FtpConsumer[ftp://user@service.example.com//?binary=true&fileName=equity_desc.enc.out&noop=true&passiveMode=true&password=******]
could not poll endpoint: Endpoint[ftp://user@service.example.com//?binary=true&fileName=equity_desc.enc.out&noop=true&passiveMode=true&password=******]
caused by: null
> java.lang.NullPointerException
> at java.io.File.<init>(Unknown Source)
> at org.apache.camel.component.file.GenericFile.getParent(GenericFile.java:277)
> at org.apache.camel.component.file.GenericFile.populateHeaders(GenericFile.java:139)
> at org.apache.camel.component.file.remote.RemoteFile.populateHeaders(RemoteFile.java:38)
> at org.apache.camel.component.file.GenericFile.bindToExchange(GenericFile.java:115)
> at org.apache.camel.component.file.remote.RemoteFileEndpoint.createExchange(RemoteFileEndpoint.java:62)
> at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:120)
> at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:138)
> at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:90)
> at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
> at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown Source)
> at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(Unknown
Source)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(Unknown
Source)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
> Camel (camel-1) thread #3 - ftp://user@service.example.com// DEBUG remote.FtpConsumer
- Took 1.606 seconds to poll: /



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message