Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5513B11F3E for ; Mon, 25 Aug 2014 07:54:58 +0000 (UTC) Received: (qmail 86765 invoked by uid 500); 25 Aug 2014 07:54:58 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 86731 invoked by uid 500); 25 Aug 2014 07:54:57 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 86722 invoked by uid 99); 25 Aug 2014 07:54:57 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Aug 2014 07:54:57 +0000 Date: Mon, 25 Aug 2014 07:54:57 +0000 (UTC) From: "Claus Ibsen (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (CAMEL-7663) SFTP consumers cannot be triggered by Quartz2 scheduler with JDBC trigger persistence: NotSerializableException MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAMEL-7663?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Claus Ibsen reassigned CAMEL-7663: ---------------------------------- Assignee: Claus Ibsen > SFTP consumers cannot be triggered by Quartz2 scheduler with JDBC trigger persistence: NotSerializableException > --------------------------------------------------------------------------------------------------------------- > > Key: CAMEL-7663 > URL: https://issues.apache.org/jira/browse/CAMEL-7663 > Project: Camel > Issue Type: Improvement > Components: camel-core, camel-ftp, camel-quartz2 > Affects Versions: 2.13.1 > Environment: Quartz 2.2.1 with JDBC JobStore > Reporter: Steffen Ryll > Assignee: Claus Ibsen > Fix For: 2.14.0, Future > > > I configured a setup with an SFTP consumer like this in Spring DSL: > {code} > > {code} > Note: q2scheduler refers to an instance of QuartzScheduledPollConsumerScheduler that I set have up with my Cron pattern. > Starting up the Camel context fails with a NotSerializableException as soon as I switch Quartz from a RAMJobStore to a JDBCJobStore. > The following exception gets thrown: > {code} > org.quartz.JobPersistenceException: Couldn't store job: Unable to serialize JobDataMap for insertion into database because the value of property 'task' is not serializable: org.apache.camel.component.file.remote.SftpConsumer [See nested exception: java.io.NotSerializableException: Unable to serialize JobDataMap for insertion into database because the value of property 'task' is not serializable: org.apache.camel.component.file.remote.SftpConsumer] > at org.quartz.impl.jdbcjobstore.JobStoreSupport.storeJob(JobStoreSupport.java:1115) > at org.quartz.impl.jdbcjobstore.JobStoreSupport$2.executeVoid(JobStoreSupport.java:1062) > at org.quartz.impl.jdbcjobstore.JobStoreSupport$VoidTransactionCallback.execute(JobStoreSupport.java:3703) > at org.quartz.impl.jdbcjobstore.JobStoreSupport$VoidTransactionCallback.execute(JobStoreSupport.java:3701) > at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3787) > at org.quartz.impl.jdbcjobstore.JobStoreTX.executeInLock(JobStoreTX.java:93) > at org.quartz.impl.jdbcjobstore.JobStoreSupport.storeJobAndTrigger(JobStoreSupport.java:1058) > at org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:886) > at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:249) > at org.apache.camel.pollconsumer.quartz2.QuartzScheduledPollConsumerScheduler.doStart(QuartzScheduledPollConsumerScheduler.java:174) > at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) > at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74) > at org.apache.camel.impl.ScheduledPollConsumer.doStart(ScheduledPollConsumer.java:499) > at org.apache.camel.component.file.GenericFileConsumer.doStart(GenericFileConsumer.java:640) > at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) > at org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:2042) > at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRouteConsumers(DefaultCamelContext.java:2336) > at org.apache.camel.impl.DefaultCamelContext.doStartRouteConsumers(DefaultCamelContext.java:2272) > at org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:2202) > at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:1981) > at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1851) > at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1683) > at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) > at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1651) > at org.apache.camel.component.servletlistener.CamelServletContextListener.contextInitialized(CamelServletContextListener.java:179) > Truncated WebLogic classes.... > Caused by: java.io.NotSerializableException: Unable to serialize JobDataMap for insertion into database because the value of property 'task' is not serializable: org.apache.camel.component.file.remote.SftpConsumer > at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeJobData(StdJDBCDelegate.java:3083) > at org.quartz.impl.jdbcjobstore.oracle.OracleDelegate.insertJobDetail(OracleDelegate.java:154) > at org.quartz.impl.jdbcjobstore.JobStoreSupport.storeJob(JobStoreSupport.java:1112) > ... 65 more > {code} > That implies, that a File consumer will fail in such a scenario as well, not only an SFTP consumer. > Given that the documentation http://camel.apache.org/file2.html advertises Quartz2 support for polling scheduling, we were expecting that this really works. > For us, this is kind of tragic, as we wanted to use Quartz2's clustering capabilities to make the SFTP consumer fit for use in a (Weblogic) cluster. > Looking at GenericFileConsumer, it seems at least non-trivial to make all the fields in SftpConsumer's class hierarchy serializable. -- This message was sent by Atlassian JIRA (v6.2#6252)