Uploaded image for project: 'Fuse Tooling'
  1. Fuse Tooling
  2. FUSETOOLS-1551

Cannot run as Local Camel Context (camel-blueprint)

    XMLWordPrintable

Details

    • 8.0.0 - CR1
      1. create a JBoss Fuse Project from camel-archetype-blueprint
      2. run as Local Camel Context
    • Workaround Exists
    • Hide

      change the following method in RouteTest.java

          @Override
          protected String getBlueprintDescriptor() {
              return "/OSGI-INF/blueprint/blueprint.xml";
          }
      

      to

          @Override
          protected String getBlueprintDescriptor() {
              return "OSGI-INF/blueprint/blueprint.xml";
          }
      

      Notice: / char is removed

      Show
      change the following method in RouteTest.java @Override protected String getBlueprintDescriptor() { return "/OSGI-INF/blueprint/blueprint.xml" ; } to @Override protected String getBlueprintDescriptor() { return "OSGI-INF/blueprint/blueprint.xml" ; } Notice: / char is removed

    Description

      There is a problem with camel-archetype-blueprint project. If I try to run it as Local Camel Context (with tests), it fails with the following error.

      [INFO] Scanning for projects...
      [INFO] 
      [INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
      [INFO]                                                                         
      [INFO] ------------------------------------------------------------------------
      [INFO] Building Camel Blueprint Route 1.0.0-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO] 
      [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ camel-blueprint ---
      [INFO] Deleting /home/tsedmik/tmp/workspaceaaqqw/blueprint/target
      [INFO] 
      [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ camel-blueprint ---
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] Copying 2 resources
      [INFO] 
      [INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ camel-blueprint ---
      [INFO] Compiling 2 source files to /home/tsedmik/tmp/workspaceaaqqw/blueprint/target/classes
      [INFO] 
      [INFO] --- maven-bundle-plugin:2.3.7:manifest (bundle-manifest) @ camel-blueprint ---
      [INFO] 
      [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ camel-blueprint ---
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] Copying 0 resource
      [INFO] 
      [INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ camel-blueprint ---
      [INFO] Compiling 1 source file to /home/tsedmik/tmp/workspaceaaqqw/blueprint/target/test-classes
      [INFO] 
      [INFO] --- maven-surefire-plugin:2.19:test (default-test) @ camel-blueprint ---
      
      -------------------------------------------------------
       T E S T S
      -------------------------------------------------------
      Running com.mycompany.camel.blueprint.RouteTest
      [                          main] CamelBlueprintHelper           INFO  Using Blueprint XML file: /home/tsedmik/tmp/workspaceaaqqw/blueprint/target/classes/OSGI-INF/blueprint/blueprint.xml
      [                      Thread-0] RawBuilder                     INFO  Copy thread finished.
      [                          main] Activator                      INFO  Camel activator starting
      [                          main] Activator                      INFO  Camel activator started
      [         Blueprint Extender: 1] BlueprintContainerImpl         INFO  Bundle camel-blueprint/1.0.0.SNAPSHOT is waiting for namespace handlers [http://camel.apache.org/schema/blueprint]
      [                          main] RouteTest                      INFO  ********************************************************************************
      [                          main] RouteTest                      INFO  Testing done: testRoute(com.mycompany.camel.blueprint.RouteTest)
      [                          main] RouteTest                      INFO  Took: 0.338 seconds (338 millis)
      [                          main] RouteTest                      INFO  ********************************************************************************
      [                          main] CamelBlueprintHelper           INFO  Deleting work directory target/bundles/1449232762330
      Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.385 sec <<< FAILURE! - in com.mycompany.camel.blueprint.RouteTest
      testRoute(com.mycompany.camel.blueprint.RouteTest)  Time elapsed: 0.345 sec  <<< ERROR!
      java.lang.RuntimeException: InputStream cannot be null
      Caused by: java.lang.IllegalArgumentException: InputStream cannot be null
      
      
      Results :
      
      Tests in error: 
        RouteTest>CamelBlueprintTestSupport.setUp:199->CamelBlueprintTestSupport.createBundleContext:97->CamelBlueprintTestSupport.expectBlueprintContainerReloadOnConfigAdminUpdate:256 » Runtime
      
      Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
      
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 5.083 s
      [INFO] Finished at: 2015-12-04T13:39:22+01:00
      [INFO] Final Memory: 24M/269M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19:test (default-test) on project camel-blueprint: There are test failures.
      [ERROR] 
      [ERROR] Please refer to /home/tsedmik/tmp/workspaceaaqqw/blueprint/target/surefire-reports for the individual test results.
      [ERROR] -> [Help 1]
      [ERROR] 
      [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
      [ERROR] Re-run Maven using the -X switch to enable full debug logging.
      [ERROR] 
      [ERROR] For more information about the errors and possible solutions, please read the following articles:
      [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
      

      Attachments

        Issue Links

          Activity

            People

              lheinema@redhat.com Lars Heinemann
              tsedmik Tomáš Sedmík
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: