Stack Exchange
Apache Camel "No component found with scheme: stream"
I'm just getting to know Camel (and Maven) and I have this very simple Java example:
 public static void main( String[] args ) throws Exception {    
    CamelContext context = new DefaultCamelContext();

    context.addRoutes(new RouteBuilder() {

          public void configure() { 
            from("direct:in").to("stream:out");     
          }

    });

    context.start();

    ProducerTemplate template = context.createProducerTemplate();
    template.sendBody("direct:in", "Hello Text World"); 
    template.sendBody("direct:in", "Hello Bytes World".getBytes());
}

My maven POM file includes:
<dependency>
     <groupId>org.apache.camel</groupId>
     <artifactId>camel-stream</artifactId>
     <version>2.19.2</version>
</dependency>

Still I receive a org.apache.camel.FailedToCreateRouteException, because No component found with scheme: stream

Exception in thread "main" org.apache.camel.FailedToCreateRouteException: Failed to create route route1 at: >>> To[stream:out] <<< in route: Route(ro
  to: No component found with scheme: stream
          at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:1298)
          at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:204)
          at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:1087)
          at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:3544)
          at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:3275)
          at org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:202)
          at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:3093)
          at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:3089)
          at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:3112)
          at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:3089)
          at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
          at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:3026)
          at mavenCamelRiding.binFileStreamToCamel.MainStreamRouter.main(MainStreamRouter.java:37)
  Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: stream://out due to: No component found with scheme: stream
          at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:729)
          at org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:80)
          at org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:219)
          at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:112)
          at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:118)
          at org.apache.camel.model.SendDefinition.resolveEndpoint(SendDefinition.java:62)
          at org.apache.camel.model.SendDefinition.createProcessor(SendDefinition.java:56)
          at org.apache.camel.model.ProcessorDefinition.makeProcessorImpl(ProcessorDefinition.java:549)
          at org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDefinition.java:510)
          at org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinition.java:226)
          at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:1295)

Any idea, where the problem could be? Google wasn't able to help me so far.
edit 1: here is the rest of my POM file
  <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>mavenCamelRiding</groupId>
  <artifactId>binFileStreamToCamel</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>jar</packaging>

  <name>binFileStreamToCamel</name>
  <url>http://maven.apache.org</url>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <dependencies>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-core</artifactId>
        <version>2.19.2</version>
    </dependency>

    <dependency>
         <groupId>org.apache.camel</groupId>
         <artifactId>camel-stream</artifactId>
         <version>2.19.2</version>
    </dependency>

  </dependencies>
</project>

edit 2: 
It obviously has something to do with the way I build and start the program. This confuses me, because I didn't have any problems with any other route options I played around with so far (jms, activemq, file, bean).
I now tested the building and running within Eclipse instead of with the console. So I right-clikced the project folder and selected "Build Project". Then I selected "Run As" and "Java Application". The Eclipse console gives me the expected hello-world-output.
Why doesn't it work with the console?
edit 3:
now instead of first using "mvn compile", moving into the "target\classes" folder and then running "java package.classname", I executed this:
mvn compile exec:java -Dexec.mainClass=package.classname
and it gives me the hello-world-output I wanted.
Sounds like a class path problem? How can I start the example program without maven?

You code looks OK, so posting more POM contents might help finding the issue.

Have you run a clean:install on the projects to ensure it is correctly built?

I have run a Project Clean in Eclipse several times. Is that enough?

I have now executed "mvn clean" and "mvn clean install" in the project folder, that contains the POM file. Then executed "mvn compile". Running the program, still gives me the same exception.

Perhaps deleting the camel-stream in your local maven repo and building again might work.  There could be something wrong with it... better to start fresh.  And ensure after rebuilding that you see it in your Eclipse Project Explorer listed under Maven Dependencies.

You should see the camel-stream file in your local maven repo. Or just clean your repo and rebuild. Its more than likely a repo problem.

How do you run this code?  Chances are the way you run the code doesn't pick up camel-stream dependency to the classpaths correctly.

In Eclipse I can see the camel-steam jar under Maven Dependencies in my project. It also links to the correct folder in my local .m2 folder. Deleting the folder and have maven download it again, didn't help.

To compile and run the code, I have 2 open concoles: First console in the project folder containing the POM file. I execute "mvn compile" after changing and saving the code in Eclipse. The second console is in the target\classes folder of the same project. Here I execute a "java package.classname" command to run the program.

Now I have 2 options to run my example program on the console:
First option:
mvn compile exec:java -Dexec.mainClass=package.classname (in folder with pom.xml)
Second option:

mvn dependency:copy-dependencies compile (in folder with pom.xml)
java -classpath ..\dependency*;. package.classname (in folder target\classes)

So it was a classpath problem. It just doesn't explain, why in earlier examples java was able to find camel-core and camel-jms without additional classpath information, but not camel-stream.

I took your source and tested on my machine and was able to see the output, as below:
Hello Text World
Hello Bytes World
It's possible that your local .m2 is missing the camel-stream jar. Or you can you delete the camel-stream folder under your .m2\repository\org\apache\camel\camel-stream\2.19.2, do a maven clean install and try to run this again.

I have deleted the camel-stream folder from my .m2 (and in a second try also the complete apache folder), had everything re-downloaded by "mvn clean install" (executed in the folder with the POM file in my project). Then ran "mvn compile" without complications. Executing my program with the java command in the console in the target\classes folder gave me the error again.
