camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Moulliard <cmoulli...@gmail.com>
Subject Re: uri syntax of camel:stream
Date Tue, 14 Jul 2009 07:17:09 GMT
The syntax copied in the post was not correct. Here is the correct url used
which is not HTTP :

stream:uri?file:///d:/temp/data/log/quickfix.log&scanStream=true

;-)


On Tue, Jul 14, 2009 at 8:07 AM, Claus Ibsen <claus.ibsen@gmail.com> wrote:

> Hi Charles
>
> You gotta look in the stacktrace. There is a NPE.
> And your URI looks odd to me as you specify file but enter http
> instead. file is a file that uses java.io.File to read it.
>
>
>
> On Mon, Jul 13, 2009 at 5:35 PM, Charles Moulliard<cmoulliard@gmail.com>
> wrote:
> > Hi,
> >
> > I try to use the following syntax for camel stream :
> >
> > stream:uri?file:/:/
> > <http://www.mibbit.com/chat/#
> >//xxx/yyy/file.txt&scanStream=true&scanStreamDelay=100"
> >
> >
> > but in response, I receive the following error :
> >
> > Caused by: org.springframework.beans.factory.BeanCreationException: Error
> > creating bean with name 'quickFixStreamEndpoint': FactoryBean threw
> > exception on object creation; nested exception is
> > org.apache.camel.ResolveEndpointFailedException: Failed to resolve
> endpoint:
> > stream:uri?file:///d:/temp/data/log/quickfix.log&scanStream=true due to:
> > null
> >    at
> >
> org.springframework.beans.factory.support.FactoryBeanRegistrySupport$1.run(FactoryBeanRegistrySupport.java:127)
> >    at java.security.AccessController.doPrivileged(Native Method)
> >    at
> >
> org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:116)
> >    at
> >
> org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:98)
> >    at
> >
> org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1288)
> >    at
> >
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:217)
> >    at
> >
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
> >    at
> >
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:168)
> >    at
> >
> org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:884)
> >    at
> >
> org.apache.camel.spring.spi.ApplicationContextRegistry.lookup(ApplicationContextRegistry.java:41)
> >    at
> >
> org.apache.camel.impl.DefaultRouteContext.lookup(DefaultRouteContext.java:120)
> >    at
> >
> org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:107)
> >    at
> >
> org.apache.camel.model.FromDefinition.resolveEndpoint(FromDefinition.java:72)
> >    at
> >
> org.apache.camel.impl.DefaultRouteContext.getEndpoint(DefaultRouteContext.java:70)
> >    at
> >
> org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:287)
> >    at
> >
> org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:120)
> >    at
> >
> org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:564)
> >    at
> >
> org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:988)
> >    at
> >
> org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:965)
> >    at
> >
> org.apache.camel.spring.SpringCamelContext.maybeDoStart(SpringCamelContext.java:165)
> >    at
> >
> org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:160)
> >    at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:52)
> >    at
> >
> org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:875)
> >    at
> >
> org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:99)
> >    at
> >
> org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:119)
> >    ... 12 more
> > Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to
> > resolve endpoint:
> > stream:uri?file:///d:/temp/data/log/quickfix.log&scanStream=true due to:
> > null
> >    at
> >
> org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:367)
> >    at
> >
> org.apache.camel.spring.CamelEndpointFactoryBean.createEndpoint(CamelEndpointFactoryBean.java:108)
> >    at
> >
> org.apache.camel.spring.CamelEndpointFactoryBean.getObject(CamelEndpointFactoryBean.java:54)
> >    at
> >
> org.springframework.beans.factory.support.FactoryBeanRegistrySupport$1.run(FactoryBeanRegistrySupport.java:121)
> >    ... 36 more
> > Caused by: java.lang.NullPointerException
> >    at java.net.URLEncoder.encode(URLEncoder.java:188)
> >    at
> > org.apache.camel.util.URISupport.createQueryString(URISupport.java:290)
> >    at org.apache.camel.util.URISupport.normalizeUri(URISupport.java:385)
> >    at
> >
> org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:365)
> >
> > What is wrong in my syntax ?
> >
> > Regards,
> >
> > Charles Moulliard
> > Senior Enterprise Architect
> > Apache Camel Committer
> >
> > *****************************
> > blog : http://cmoulliard.blogspot.com
> >
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message