You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2015/08/21 08:30:45 UTC
[jira] [Updated] (CAMEL-9094) Can't use custom FTPParser on OSGI
[ https://issues.apache.org/jira/browse/CAMEL-9094?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated CAMEL-9094:
-------------------------------
Priority: Minor (was: Major)
> Can't use custom FTPParser on OSGI
> ----------------------------------
>
> Key: CAMEL-9094
> URL: https://issues.apache.org/jira/browse/CAMEL-9094
> Project: Camel
> Issue Type: Bug
> Components: camel-ftp
> Affects Versions: 2.15.2
> Reporter: Tom Cunningham
> Priority: Minor
> Fix For: Future
>
>
> Using a custom ftp entry parser on OSGI results in an exception because of the use of Class.forName in commons-net DefaultFTPFileEntryParserFactory :
> {code}
> org.apache.commons.net.ftp.parser.ParserInitializationException: Unknown parser type: com.example.CustomFTPEntryParser
>
> at org.apache.commons.net.ftp.parser.DefaultFTPFileEntryParserFactory.createFileEntryParser(DefaultFTPFileEntryParserFactory.java:166)[commons-net:commons-net:3.3]
> at org.apache.commons.net.ftp.parser.DefaultFTPFileEntryParserFactory.createFileEntryParser(DefaultFTPFileEntryParserFactory.java:202)[commons-net:commons-net:3.3]
> at org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:3246)[commons-net:commons-net:3.3]
> at org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient.java:2930)[commons-net:commons-net:3.3]
> at org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient.java:2977)[commons-net:commons-net:3.3]
> at org.apache.camel.component.file.remote.FtpOperations.listFiles(FtpOperations.java:779)[org.apache.camel:camel-ftp:2.12.0.redhat-611433]
> at org.apache.camel.component.file.remote.FtpConsumer.doPollDirectory(FtpConsumer.java:91)[org.apache.camel:camel-ftp:2.12.0.redhat-611433]
> at org.apache.camel.component.file.remote.FtpConsumer.pollDirectory(FtpConsumer.java:53)[org.apache.camel:camel-ftp:2.12.0.redhat-611433]
> at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:117)[org.apache.camel:camel-core:2.12.0.redhat-611433 com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.4]
> at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:187)[org.apache.camel:camel-core:2.12.0.redhat-611433 com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.4]
> at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:114)[org.apache.camel:camel-core:2.12.0.redhat-611433 com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.4]
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_10]
> at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)[:1.7.0_10]
> at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)[:1.7.0_10]
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)[:1.7.0_10]
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)[:1.7.0_10]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_10]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_10]
> at java.lang.Thread.run(Thread.java:722)[:1.7.0_10]
> {code}
> Camel can work around this by creating a ParserFactory that is used if Camel is being used in an OSGI environment that simply extends the DefaultFTPFileEntryParserFactory and uses the Camel class resolver rather than Class.forName.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)