2 Replies Latest reply on Jul 29, 2014 12:02 PM by rcernich

    switchyard quickstarts with maven-tycho

    adrian.gaberell

      Hi all,


      I am trying to run the switchyard camel-jpa quickstart with maven tycho…

      with limited success until now...

      I allready did the following steps:

      1. converting the maven-project (switchyard-quickstart-camel-jpa-binding) to an eclipse-bundle and adding features and projects like the vogella tutorial recommends to my workspace
      2. build osgi-bundles of the following jars from the maven cache
        org.switchyard, org.apache.camel, org.quartz, org.h2 and javax.inject
        and put them into a p2 repository
      3. replace the maven dependency with the created bundles

       

      now my workspace compiles and the tycho-build seems to be ok as well (see logfile attached). I was even able to deploy the generated bundle into my server and it seems to work properly…

      but I can see 2 issues  until now:

      • when I try to deploy the the product via jboss-as:deploy the following error occurs:
        Caused by: java.io.FileNotFoundException: C:\dev\ws\com.hp.bsc.jdd.tycho.v4\com.hp.bsc.jdd.esb.demo.camel.jpa\target\com.hp.bsc.jdd.esb.demo.camel.jpa.eclipse-plugin (The system cannot find the file specified)

       

      • the switchyard editor is reporting the following errors:
        SWITCHYARD011602: Model [org.switchyard.config.model.switchyard.v1.V1SwitchYardModel] is invalid: cvc-complex-type.2.4.a: Invalid content was found starting with element 'jpa:binding.jpa'...
        Required Capability Missing: The "Bean" capability should be configured on the project when using this type of implementation.
        Required Capability Missing: The "JPA" capability should be configured on the project when using this type of binding.
        Required Capability Missing: The "Scheduling" capability should be configured on the project when using this type of binding.


      I am using JBoss Developer Studio 7.1.1.GA with JBoss Enterprise Application Platform - Version 6.1.1.GA


      has anyone done something comparable?

       

      regards, adrian

        • 1. Re: switchyard quickstarts with maven-tycho
          kcbabo

          I have not been down this path, so afraid I can't be much help with tycho.  Perhaps Brian or Rob can point you in the right direction?

          • 2. Re: switchyard quickstarts with maven-tycho
            rcernich

            Hey Adrian,

             

            We've recently gone through the effort of OSGi-fying SwitchYard in 2.0, so you can pick up bundles there.  We're currently targeting Karaf, so for easiest integration, I'd recommend using that provisioning implementation (as opposed to p2).  That said, all the pieces are there, which should make it easier for you to create your own p2 configuration.

             

            As for the tooling errors...

            For the XML validation error, you need to make sure "Honour all schema locations" is disabled in your XML validation preferences.

             

            The capability errors, just mean that your project is missing dependencies which may be required for execution (e.g. switchyard-component-camel-jpa).  These may not present issues at runtime, but may prevent you from using the test framework (e.g. test won't be able to load config for jpa bindings.)

             

            Hope that helps,

            Rob