You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by Charles Moulliard <cm...@gmail.com> on 2009/07/16 16:32:44 UTC
Camel stream with url
Hi,
I have created a unit test to test a file uri with stream :
Here is the url used
stream:url:file:///./target/stream/scanstreamfile.txt?scanStream=true&scanStreamDelay=100
but it does not work. Error occurs during the doStop() execution because no
executor has been created at this line
executor =
ExecutorServiceHelper.newSingleThreadExecutor(endpoint.getEndpointUri(),
true);
What is strange is that when the following method is called
private InputStream resolveStreamFromUrl() throws IOException {
String u = endpoint.getUrl();
ObjectHelper.notEmpty(u, "url");
if (LOG.isDebugEnabled()) {
LOG.debug("About to read from url: " + u);
}
the url returned by endpoint.getUrl() is null
Regards,
Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer
*****************************
blog : http://cmoulliard.blogspot.com
Re: Camel stream with url
Posted by Claus Ibsen <cl...@gmail.com>.
Would be good if you could attach/send or whatever the unit test.
On Thu, Jul 16, 2009 at 4:32 PM, Charles Moulliard<cm...@gmail.com> wrote:
> Hi,
>
> I have created a unit test to test a file uri with stream :
>
> Here is the url used
>
> stream:url:file:///./target/stream/scanstreamfile.txt?scanStream=true&scanStreamDelay=100
>
> but it does not work. Error occurs during the doStop() execution because no
> executor has been created at this line
> executor =
> ExecutorServiceHelper.newSingleThreadExecutor(endpoint.getEndpointUri(),
> true);
>
> What is strange is that when the following method is called
>
> private InputStream resolveStreamFromUrl() throws IOException {
> String u = endpoint.getUrl();
> ObjectHelper.notEmpty(u, "url");
> if (LOG.isDebugEnabled()) {
> LOG.debug("About to read from url: " + u);
> }
>
> the url returned by endpoint.getUrl() is null
>
> 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