You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Lydie <lp...@completegenomics.com> on 2014/03/20 23:31:22 UTC

sql component and delay

Hello,

I am trying to pull data from  a database and mark rows as processed :


This is working
I am trying to use a specific delay in between each poll:

?consumer.onConsume={{sql.oracle.markPart}} ?consumer.delay=5000


How can I do both?
I tried:



It does not work.
I also try to use direct: but then I have an empty body when for my choice.


Any idea?


Thank you,


Lydie

I



--
View this message in context: http://camel.465427.n5.nabble.com/sql-component-and-delay-tp5749161.html
Sent from the Camel - Users mailing list archive at Nabble.com.

RE: sql component and delay

Posted by Lydie <lp...@completegenomics.com>.
Thank you it is working!

From: Andrew Thorburn [via Camel] [mailto:ml-node+s465427n5749298h89@n5.nabble.com]
Sent: Monday, March 24, 2014 4:20 PM
To: Lydie Prevost
Subject: Re: sql component and delay

It should be "&amp;consumer.delay=5000". Since you're using XML, you'll
need to escape the & character.

- Andrew


On Tue, Mar 25, 2014 at 12:08 PM, Lydie <[hidden email]</user/SendEmail.jtp?type=node&node=5749298&i=0>>wrote:

> When I do that:
>                     <from
>
>  uri="sql:{{sql.oracle.selectPull2}}?consumer.onConsume={{sql.oracle.markProcessed}}&consumer.delay=5000"
> />
>
> I get the following error:
>
> org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
> Line 78 in XML document from class path resource
> [META-INF/spring/camel-context.xml] is invalid; nested exception is
> org.xml.sax.SAXParseException; lineNumber: 78; columnNumber: 103; The
> reference to entity "consumer.delay" must end with the ';' delimiter.
>                at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
>                at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
>                at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
>                at
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)
>                at
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)
>                at
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)
>                at
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:243)
>                at
> org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:127)
>                at
> org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:93)
>                at
> org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:131)
>                at
> org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:530)
>                at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:444)
>                at
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
>                at
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
>                at
> com.cgi.horizon.integration.TestHorizonIntegration.createApplicationContext(TestHorizonIntegration.java:40)
>                at
> org.apache.camel.test.spring.CamelSpringTestSupport.doCreateApplicationContext(CamelSpringTestSupport.java:89)
>                at
> org.apache.camel.test.spring.CamelSpringTestSupport.doPreSetup(CamelSpringTestSupport.java:79)
>                at
> org.apache.camel.test.junit4.CamelTestSupport.setUp(CamelTestSupport.java:216)
>                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
>                at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown
> Source)
>                at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
> Source)
>                at java.lang.reflect.Method.invoke(Unknown Source)
>                at
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
>                at
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>                at
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
>                at
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
>                at
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
>                at
> org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
>                at org.junit.rules.RunRules.evaluate(RunRules.java:20)
>                at
> org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
>                at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
>                at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
>                at
> org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
>                at
> org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
>                at
> org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
>                at
> org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
>                at
> org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
>                at
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
>                at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
>                at
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
>                at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>                at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
>                at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
>                at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
>                at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
> Caused by: org.xml.sax.SAXParseException; lineNumber: 78; columnNumber:
> 103; The reference to entity "consumer.delay" must end with the ';'
> delimiter.
>                at
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown
> Source)
>                at
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown
> Source)
>                at
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown
> Source)
>                at
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown
> Source)
>                at
> com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown
> Source)
>                at
> com.sun.org.apache.xerces.internal.impl.XMLScanner.scanAttributeValue(Unknown
> Source)
>                at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanAttribute(Unknown
> Source)
>                at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
> Source)
>                at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown
> Source)
>                at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown
> Source)
>                at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown
> Source)
>                at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
> Source)
>                at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
> Source)
>                at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
> Source)
>                at
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
>                at
> com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
>                at
> com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown
> Source)
>                at
> org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)
>                at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388)
>                ... 44 more
>
>
>
> Same thing with :
>                     <from
>
>  uri="sql:{{sql.oracle.selectPull2}}?consumer.onConsume={{sql.oracle.markProcessed}}&consumer.delay=5000;"
> />
> Any idea?
>
>
> Lydie
>
>
>
>
>
> From: Claus Ibsen-2 [via Camel] [mailto:
> [hidden email]</user/SendEmail.jtp?type=node&node=5749298&i=1>]
> Sent: Friday, March 21, 2014 12:10 AM
> To: Lydie Prevost
> Subject: Re: sql component and delay
>
> Hi
>
> If you want to use 2 or more options, then use & to separate them,
> just as uri parameters you see in the web browser address bar etc.
>
> See more details at
> http://camel.apache.org/how-do-i-configure-endpoints.html
>
> So it should be
>
> ?consumer.onConsume={{sql.oracle.markPart}}&consumer.delay=5000
>
>
> On Thu, Mar 20, 2014 at 11:31 PM, Lydie <[hidden
> email]</user/SendEmail.jtp?type=node&node=5749170&i=0>> wrote:
>
> > Hello,
> >
> > I am trying to pull data from  a database and mark rows as processed :
> >
> >
> > This is working
> > I am trying to use a specific delay in between each poll:
> >
> > ?consumer.onConsume={{sql.oracle.markPart}} ?consumer.delay=5000
> >
> >
> > How can I do both?
> > I tried:
> >
> >
> >
> > It does not work.
> > I also try to use direct: but then I have an empty body when for my
> choice.
> >
> >
> > Any idea?
> >
> >
> > Thank you,
> >
> >
> > Lydie
> >
> > I
> >
> >
> >
> > --
> > View this message in context:
> http://camel.465427.n5.nabble.com/sql-component-and-delay-tp5749161.html
> > Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> Email: [hidden email]</user/SendEmail.jtp?type=node&node=5749170&i=1>
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
> Make your Camel applications look hawt, try: http://hawt.io
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/sql-component-and-delay-tp5749161p5749170.html
> To unsubscribe from sql component and delay, click here<
> >.
> NAML<
> http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> >
>
> ________________________________
>
> The contents of this e-mail and any attachments are confidential and only
> for use by the intended recipient. Any unauthorized use, distribution or
> copying of this message is strictly prohibited. If you are not the intended
> recipient please inform the sender immediately by reply e-mail and delete
> this message from your system. Thank you for your co-operation.
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/sql-component-and-delay-tp5749161p5749297.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

________________________________
If you reply to this email, your message will be added to the discussion below:
http://camel.465427.n5.nabble.com/sql-component-and-delay-tp5749161p5749298.html
To unsubscribe from sql component and delay, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5749161&code=bHByZXZvc3RAY29tcGxldGVnZW5vbWljcy5jb218NTc0OTE2MXwxNjI1NjE1Mjg2>.
NAML<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>

________________________________

The contents of this e-mail and any attachments are confidential and only for use by the intended recipient. Any unauthorized use, distribution or copying of this message is strictly prohibited. If you are not the intended recipient please inform the sender immediately by reply e-mail and delete this message from your system. Thank you for your co-operation.




--
View this message in context: http://camel.465427.n5.nabble.com/sql-component-and-delay-tp5749161p5749299.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: sql component and delay

Posted by Andrew Thorburn <nz...@gmail.com>.
It should be "&amp;consumer.delay=5000". Since you're using XML, you'll
need to escape the & character.

- Andrew


On Tue, Mar 25, 2014 at 12:08 PM, Lydie <lp...@completegenomics.com>wrote:

> When I do that:
>                     <from
>
>  uri="sql:{{sql.oracle.selectPull2}}?consumer.onConsume={{sql.oracle.markProcessed}}&consumer.delay=5000"
> />
>
> I get the following error:
>
> org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
> Line 78 in XML document from class path resource
> [META-INF/spring/camel-context.xml] is invalid; nested exception is
> org.xml.sax.SAXParseException; lineNumber: 78; columnNumber: 103; The
> reference to entity "consumer.delay" must end with the ';' delimiter.
>                at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
>                at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
>                at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
>                at
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)
>                at
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)
>                at
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)
>                at
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:243)
>                at
> org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:127)
>                at
> org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:93)
>                at
> org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:131)
>                at
> org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:530)
>                at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:444)
>                at
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
>                at
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
>                at
> com.cgi.horizon.integration.TestHorizonIntegration.createApplicationContext(TestHorizonIntegration.java:40)
>                at
> org.apache.camel.test.spring.CamelSpringTestSupport.doCreateApplicationContext(CamelSpringTestSupport.java:89)
>                at
> org.apache.camel.test.spring.CamelSpringTestSupport.doPreSetup(CamelSpringTestSupport.java:79)
>                at
> org.apache.camel.test.junit4.CamelTestSupport.setUp(CamelTestSupport.java:216)
>                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
>                at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown
> Source)
>                at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
> Source)
>                at java.lang.reflect.Method.invoke(Unknown Source)
>                at
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
>                at
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>                at
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
>                at
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
>                at
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
>                at
> org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
>                at org.junit.rules.RunRules.evaluate(RunRules.java:20)
>                at
> org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
>                at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
>                at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
>                at
> org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
>                at
> org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
>                at
> org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
>                at
> org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
>                at
> org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
>                at
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
>                at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
>                at
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
>                at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>                at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
>                at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
>                at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
>                at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
> Caused by: org.xml.sax.SAXParseException; lineNumber: 78; columnNumber:
> 103; The reference to entity "consumer.delay" must end with the ';'
> delimiter.
>                at
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown
> Source)
>                at
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown
> Source)
>                at
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown
> Source)
>                at
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown
> Source)
>                at
> com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown
> Source)
>                at
> com.sun.org.apache.xerces.internal.impl.XMLScanner.scanAttributeValue(Unknown
> Source)
>                at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanAttribute(Unknown
> Source)
>                at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
> Source)
>                at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown
> Source)
>                at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown
> Source)
>                at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown
> Source)
>                at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
> Source)
>                at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
> Source)
>                at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
> Source)
>                at
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
>                at
> com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
>                at
> com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown
> Source)
>                at
> org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)
>                at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388)
>                ... 44 more
>
>
>
> Same thing with :
>                     <from
>
>  uri="sql:{{sql.oracle.selectPull2}}?consumer.onConsume={{sql.oracle.markProcessed}}&consumer.delay=5000;"
> />
> Any idea?
>
>
> Lydie
>
>
>
>
>
> From: Claus Ibsen-2 [via Camel] [mailto:
> ml-node+s465427n5749170h21@n5.nabble.com]
> Sent: Friday, March 21, 2014 12:10 AM
> To: Lydie Prevost
> Subject: Re: sql component and delay
>
> Hi
>
> If you want to use 2 or more options, then use & to separate them,
> just as uri parameters you see in the web browser address bar etc.
>
> See more details at
> http://camel.apache.org/how-do-i-configure-endpoints.html
>
> So it should be
>
> ?consumer.onConsume={{sql.oracle.markPart}}&consumer.delay=5000
>
>
> On Thu, Mar 20, 2014 at 11:31 PM, Lydie <[hidden
> email]</user/SendEmail.jtp?type=node&node=5749170&i=0>> wrote:
>
> > Hello,
> >
> > I am trying to pull data from  a database and mark rows as processed :
> >
> >
> > This is working
> > I am trying to use a specific delay in between each poll:
> >
> > ?consumer.onConsume={{sql.oracle.markPart}} ?consumer.delay=5000
> >
> >
> > How can I do both?
> > I tried:
> >
> >
> >
> > It does not work.
> > I also try to use direct: but then I have an empty body when for my
> choice.
> >
> >
> > Any idea?
> >
> >
> > Thank you,
> >
> >
> > Lydie
> >
> > I
> >
> >
> >
> > --
> > View this message in context:
> http://camel.465427.n5.nabble.com/sql-component-and-delay-tp5749161.html
> > Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> Email: [hidden email]</user/SendEmail.jtp?type=node&node=5749170&i=1>
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
> Make your Camel applications look hawt, try: http://hawt.io
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/sql-component-and-delay-tp5749161p5749170.html
> To unsubscribe from sql component and delay, click here<
> http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5749161&code=bHByZXZvc3RAY29tcGxldGVnZW5vbWljcy5jb218NTc0OTE2MXwxNjI1NjE1Mjg2
> >.
> NAML<
> http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> >
>
> ________________________________
>
> The contents of this e-mail and any attachments are confidential and only
> for use by the intended recipient. Any unauthorized use, distribution or
> copying of this message is strictly prohibited. If you are not the intended
> recipient please inform the sender immediately by reply e-mail and delete
> this message from your system. Thank you for your co-operation.
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/sql-component-and-delay-tp5749161p5749297.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

RE: sql component and delay

Posted by Lydie <lp...@completegenomics.com>.
When I do that:
                    <from
                           uri="sql:{{sql.oracle.selectPull2}}?consumer.onConsume={{sql.oracle.markProcessed}}&consumer.delay=5000" />

I get the following error:

org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 78 in XML document from class path resource [META-INF/spring/camel-context.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 78; columnNumber: 103; The reference to entity "consumer.delay" must end with the ';' delimiter.
               at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
               at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
               at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
               at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)
               at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)
               at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)
               at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:243)
               at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:127)
               at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:93)
               at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:131)
               at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:530)
               at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:444)
               at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
               at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
               at com.cgi.horizon.integration.TestHorizonIntegration.createApplicationContext(TestHorizonIntegration.java:40)
               at org.apache.camel.test.spring.CamelSpringTestSupport.doCreateApplicationContext(CamelSpringTestSupport.java:89)
               at org.apache.camel.test.spring.CamelSpringTestSupport.doPreSetup(CamelSpringTestSupport.java:79)
               at org.apache.camel.test.junit4.CamelTestSupport.setUp(CamelTestSupport.java:216)
               at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
               at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
               at java.lang.reflect.Method.invoke(Unknown Source)
               at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
               at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
               at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
               at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
               at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
               at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
               at org.junit.rules.RunRules.evaluate(RunRules.java:20)
               at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
               at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
               at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
               at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
               at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
               at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
               at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
               at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
               at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
               at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
               at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
               at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
               at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
               at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
               at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
               at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: org.xml.sax.SAXParseException; lineNumber: 78; columnNumber: 103; The reference to entity "consumer.delay" must end with the ';' delimiter.
               at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
               at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)
               at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
               at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
               at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source)
               at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanAttributeValue(Unknown Source)
               at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanAttribute(Unknown Source)
               at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
               at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
               at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
               at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
               at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
               at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
               at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
               at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
               at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
               at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
               at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)
               at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388)
               ... 44 more



Same thing with :
                    <from
                           uri="sql:{{sql.oracle.selectPull2}}?consumer.onConsume={{sql.oracle.markProcessed}}&consumer.delay=5000;" />
Any idea?


Lydie





From: Claus Ibsen-2 [via Camel] [mailto:ml-node+s465427n5749170h21@n5.nabble.com]
Sent: Friday, March 21, 2014 12:10 AM
To: Lydie Prevost
Subject: Re: sql component and delay

Hi

If you want to use 2 or more options, then use & to separate them,
just as uri parameters you see in the web browser address bar etc.

See more details at
http://camel.apache.org/how-do-i-configure-endpoints.html

So it should be

?consumer.onConsume={{sql.oracle.markPart}}&consumer.delay=5000


On Thu, Mar 20, 2014 at 11:31 PM, Lydie <[hidden email]</user/SendEmail.jtp?type=node&node=5749170&i=0>> wrote:

> Hello,
>
> I am trying to pull data from  a database and mark rows as processed :
>
>
> This is working
> I am trying to use a specific delay in between each poll:
>
> ?consumer.onConsume={{sql.oracle.markPart}} ?consumer.delay=5000
>
>
> How can I do both?
> I tried:
>
>
>
> It does not work.
> I also try to use direct: but then I have an empty body when for my choice.
>
>
> Any idea?
>
>
> Thank you,
>
>
> Lydie
>
> I
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/sql-component-and-delay-tp5749161.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



--
Claus Ibsen
-----------------
Red Hat, Inc.
Email: [hidden email]</user/SendEmail.jtp?type=node&node=5749170&i=1>
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Make your Camel applications look hawt, try: http://hawt.io

________________________________
If you reply to this email, your message will be added to the discussion below:
http://camel.465427.n5.nabble.com/sql-component-and-delay-tp5749161p5749170.html
To unsubscribe from sql component and delay, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5749161&code=bHByZXZvc3RAY29tcGxldGVnZW5vbWljcy5jb218NTc0OTE2MXwxNjI1NjE1Mjg2>.
NAML<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>

________________________________

The contents of this e-mail and any attachments are confidential and only for use by the intended recipient. Any unauthorized use, distribution or copying of this message is strictly prohibited. If you are not the intended recipient please inform the sender immediately by reply e-mail and delete this message from your system. Thank you for your co-operation.




--
View this message in context: http://camel.465427.n5.nabble.com/sql-component-and-delay-tp5749161p5749297.html
Sent from the Camel - Users mailing list archive at Nabble.com.

RE: sql component and delay

Posted by Lydie <lp...@completegenomics.com>.
Thank you!

From: Claus Ibsen-2 [via Camel] [mailto:ml-node+s465427n5749170h21@n5.nabble.com]
Sent: Friday, March 21, 2014 12:10 AM
To: Lydie Prevost
Subject: Re: sql component and delay

Hi

If you want to use 2 or more options, then use & to separate them,
just as uri parameters you see in the web browser address bar etc.

See more details at
http://camel.apache.org/how-do-i-configure-endpoints.html

So it should be

?consumer.onConsume={{sql.oracle.markPart}}&consumer.delay=5000


On Thu, Mar 20, 2014 at 11:31 PM, Lydie <[hidden email]</user/SendEmail.jtp?type=node&node=5749170&i=0>> wrote:

> Hello,
>
> I am trying to pull data from  a database and mark rows as processed :
>
>
> This is working
> I am trying to use a specific delay in between each poll:
>
> ?consumer.onConsume={{sql.oracle.markPart}} ?consumer.delay=5000
>
>
> How can I do both?
> I tried:
>
>
>
> It does not work.
> I also try to use direct: but then I have an empty body when for my choice.
>
>
> Any idea?
>
>
> Thank you,
>
>
> Lydie
>
> I
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/sql-component-and-delay-tp5749161.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



--
Claus Ibsen
-----------------
Red Hat, Inc.
Email: [hidden email]</user/SendEmail.jtp?type=node&node=5749170&i=1>
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Make your Camel applications look hawt, try: http://hawt.io

________________________________
If you reply to this email, your message will be added to the discussion below:
http://camel.465427.n5.nabble.com/sql-component-and-delay-tp5749161p5749170.html
To unsubscribe from sql component and delay, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5749161&code=bHByZXZvc3RAY29tcGxldGVnZW5vbWljcy5jb218NTc0OTE2MXwxNjI1NjE1Mjg2>.
NAML<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>

________________________________

The contents of this e-mail and any attachments are confidential and only for use by the intended recipient. Any unauthorized use, distribution or copying of this message is strictly prohibited. If you are not the intended recipient please inform the sender immediately by reply e-mail and delete this message from your system. Thank you for your co-operation.




--
View this message in context: http://camel.465427.n5.nabble.com/sql-component-and-delay-tp5749161p5749207.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: sql component and delay

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

If you want to use 2 or more options, then use & to separate them,
just as uri parameters you see in the web browser address bar etc.

See more details at
http://camel.apache.org/how-do-i-configure-endpoints.html

So it should be

?consumer.onConsume={{sql.oracle.markPart}}&consumer.delay=5000


On Thu, Mar 20, 2014 at 11:31 PM, Lydie <lp...@completegenomics.com> wrote:
> Hello,
>
> I am trying to pull data from  a database and mark rows as processed :
>
>
> This is working
> I am trying to use a specific delay in between each poll:
>
> ?consumer.onConsume={{sql.oracle.markPart}} ?consumer.delay=5000
>
>
> How can I do both?
> I tried:
>
>
>
> It does not work.
> I also try to use direct: but then I have an empty body when for my choice.
>
>
> Any idea?
>
>
> Thank you,
>
>
> Lydie
>
> I
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/sql-component-and-delay-tp5749161.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Make your Camel applications look hawt, try: http://hawt.io

RE: sql component and delay

Posted by Lydie <lp...@completegenomics.com>.
Thanks a lot Matt!
I will look at your project.


Lydie

From: MattPayneOrg [via Camel] [mailto:ml-node+s465427n5749163h4@n5.nabble.com]
Sent: Thursday, March 20, 2014 4:11 PM
To: Lydie Prevost
Subject: Re: sql component and delay

Lydie -- I have a small learning project[1] around the sql component that
uses an in memory Derby database.

I noticed[2] that I needed to split things up like this:

from("direct:processOrderRows")
        .to("sql:{{sqlstmt.selectOrder}}?dataSource=#dataSource&template.maxRows=10")
        .split().body().to("sql:{{sqlstmt.markOrder}}")
        .process(toStringProcessor)

        .to("mock:updateDone");



While I'm using maxRows and you're using consumer.delay=5000 I think it's
kinda the same thing.

Officially, you should be able to combine things URL style.   e.g.
?consumer.onConsume={{sql.oracle.markPart}} &consumer.delay=5000

I think this works and I have it working somewhere in my learning
project[1].


I hope this helps --Matt Payne


[1] https://github.com/payne/CamelSqlDemo/tree/master/CamelSqlDemo1
[2]
https://github.com/payne/CamelSqlDemo/blob/master/CamelSqlDemo1/src/test/java/org/mattpayne/demo/UpdateOrdersTest.java#L72


On Thu, Mar 20, 2014 at 5:31 PM, Lydie <[hidden email]</user/SendEmail.jtp?type=node&node=5749163&i=0>>wrote:

> Hello,
>
> I am trying to pull data from  a database and mark rows as processed :
>
>
> This is working
> I am trying to use a specific delay in between each poll:
>
> ?consumer.onConsume={{sql.oracle.markPart}} ?consumer.delay=5000
>
>
> How can I do both?
> I tried:
>
>
>
> It does not work.
> I also try to use direct: but then I have an empty body when for my choice.
>
>
> Any idea?
>
>
> Thank you,
>
>
> Lydie
>
> I
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/sql-component-and-delay-tp5749161.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



--
--Matt Payne

________________________________
If you reply to this email, your message will be added to the discussion below:
http://camel.465427.n5.nabble.com/sql-component-and-delay-tp5749161p5749163.html
To unsubscribe from sql component and delay, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5749161&code=bHByZXZvc3RAY29tcGxldGVnZW5vbWljcy5jb218NTc0OTE2MXwxNjI1NjE1Mjg2>.
NAML<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>

________________________________

The contents of this e-mail and any attachments are confidential and only for use by the intended recipient. Any unauthorized use, distribution or copying of this message is strictly prohibited. If you are not the intended recipient please inform the sender immediately by reply e-mail and delete this message from your system. Thank you for your co-operation.




--
View this message in context: http://camel.465427.n5.nabble.com/sql-component-and-delay-tp5749161p5749164.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: sql component and delay

Posted by Matt Payne <Pa...@MattPayne.org>.
Lydie -- I have a small learning project[1] around the sql component that
uses an in memory Derby database.

I noticed[2] that I needed to split things up like this:

from("direct:processOrderRows")
	.to("sql:{{sqlstmt.selectOrder}}?dataSource=#dataSource&template.maxRows=10")
	.split().body().to("sql:{{sqlstmt.markOrder}}")
	.process(toStringProcessor)
	.to("mock:updateDone");



While I'm using maxRows and you're using consumer.delay=5000 I think it's
kinda the same thing.

Officially, you should be able to combine things URL style.   e.g.
?consumer.onConsume={{sql.oracle.markPart}} &consumer.delay=5000

I think this works and I have it working somewhere in my learning
project[1].


I hope this helps --Matt Payne


[1] https://github.com/payne/CamelSqlDemo/tree/master/CamelSqlDemo1
[2]
https://github.com/payne/CamelSqlDemo/blob/master/CamelSqlDemo1/src/test/java/org/mattpayne/demo/UpdateOrdersTest.java#L72


On Thu, Mar 20, 2014 at 5:31 PM, Lydie <lp...@completegenomics.com>wrote:

> Hello,
>
> I am trying to pull data from  a database and mark rows as processed :
>
>
> This is working
> I am trying to use a specific delay in between each poll:
>
> ?consumer.onConsume={{sql.oracle.markPart}} ?consumer.delay=5000
>
>
> How can I do both?
> I tried:
>
>
>
> It does not work.
> I also try to use direct: but then I have an empty body when for my choice.
>
>
> Any idea?
>
>
> Thank you,
>
>
> Lydie
>
> I
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/sql-component-and-delay-tp5749161.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
--Matt Payne