4 Replies Latest reply on Apr 24, 2014 6:56 AM by Radim Drtílek

    Problem with deployment of archetypes to Fuse 6.1 fabric

    Radim Drtílek Newbie

      Hi,

       

      I have Jboss Fuse 6.1 installed on 2 VM servers with Windows server 2012 (1 as fabric server, 1 as managed container)

       

      When I try to create some basic route example profile in WIKI and deploy it to child containers it works fine.

       

      But when I try to deploy fresh untouched example created by NEW > FUSE PROJECT >
      io.fabric8     camel-cxf-contract-first-archetype
      or
      org.apache.camel.archetypes     camel-archetype-blueprint

       

      in JBoss Developer Studio 7.1.1.GA with installed Fuse extensions

       

      to my Fabric server

       

      I cannot get the profile running in child container

       


      container with org.apache.camel.archetypes/camel-archetype-blueprint cannot provision and in log I can see only 1 error:

       

      java.lang.NoClassDefFoundError: org/apache/zookeeper/server/ZooTrace

        at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1115)

      Caused by: java.lang.ClassNotFoundException: Unable to load class 'org.apache.zookeeper.server.ZooTrace' because the bundle wiring for io.fabric8.fabric-zookeeper is no longer valid.

       

       

      for io.fabric8/camel-cxf-contract-first-archetype it fails on:

       

      Provision Exception:

      io.fabric8.agent.utils.MultiException: Error while downloading artifacts

       

        at io.fabric8.agent.utils.AgentUtils$ArtifactDownloader.await(AgentUtils.java:314)

       

        at io.fabric8.agent.DeploymentBuilder.download(DeploymentBuilder.java:160)

       

        at io.fabric8.agent.DeploymentAgent.doUpdate(DeploymentAgent.java:503)

       

        at io.fabric8.agent.DeploymentAgent$2.run(DeploymentAgent.java:252)

       

        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)

       

        at java.util.concurrent.FutureTask.run(FutureTask.java:262)

       

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

       

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

       

        at java.lang.Thread.run(Thread.java:744)

       

      java.lang.NoClassDefFoundError: io/fabric8/maven/util/MavenUtils

       

        at io.fabric8.fab.MavenRepositorySystemSession.(MavenRepositorySystemSession.java:61)

       

        at io.fabric8.fab.MavenResolverImpl.createRepositorSystemSession(MavenResolverImpl.java:435)

       

        at io.fabric8.fab.MavenResolverImpl.collectDependencies(MavenResolverImpl.java:309)

       

        at io.fabric8.fab.MavenResolverImpl.collectDependenciesFromPom(MavenResolverImpl.java:294)

       

        at io.fabric8.fab.MavenResolverImpl.collectDependencies(MavenResolverImpl.java:263)

       

        at io.fabric8.fab.osgi.internal.FabResolverFactoryImpl$FabResolverImpl.collectDependencyTree(FabResolverFactoryImpl.java:148)

       

        at io.fabric8.fab.osgi.internal.FabClassPathResolver.resolve(FabClassPathResolver.java:135)

       

        at io.fabric8.fab.osgi.internal.FabResolverFactoryImpl$FabResolverImpl.configureInstructions(FabResolverFactoryImpl.java:279)

       

        at io.fabric8.fab.osgi.internal.FabResolverFactoryImpl$FabResolverImpl.createInstructions(FabResolverFactoryImpl.java:271)

       

        at io.fabric8.fab.osgi.internal.FabResolverFactoryImpl$FabResolverImpl.getInfo(FabResolverFactoryImpl.java:241)

       

        at io.fabric8.agent.DeploymentBuilder$1.downloaded(DeploymentBuilder.java:332)

       

        at io.fabric8.agent.utils.AgentUtils$ArtifactDownloader.onDownloaded(AgentUtils.java:289)

       

        at io.fabric8.agent.utils.AgentUtils$ArtifactDownloader$1.operationComplete(AgentUtils.java:255)

       

        at io.fabric8.agent.utils.AgentUtils$ArtifactDownloader$1.operationComplete(AgentUtils.java:252)

       

        at io.fabric8.agent.download.DefaultFuture.notifyListener(DefaultFuture.java:342)

       

        at io.fabric8.agent.download.DefaultFuture.notifyListeners(DefaultFuture.java:327)

       

        at io.fabric8.agent.download.DefaultFuture.setValue(DefaultFuture.java:255)

       

        at io.fabric8.agent.download.AbstractDownloadTask.setFile(AbstractDownloadTask.java:62)

       

        at io.fabric8.agent.download.AbstractDownloadTask.run(AbstractDownloadTask.java:78)

       

        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)

       

        at java.util.concurrent.FutureTask.run(FutureTask.java:262)

       

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

       

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

       

        at java.lang.Thread.run(Thread.java:744)

       

      Caused by: java.lang.ClassNotFoundException: io.fabric8.maven.util.MavenUtils not found by io.fabric8.fabric-agent [60]

       

        at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532)

       

        at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)

       

        at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955)

       

        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)

        • 1. Re: Problem with deployment of archetypes to Fuse 6.1 fabric
          Claus Ibsen Master

          There is a new set of maven plugins in 6.1 that going forward is recommended for deploying maven projects to fuse.

           

          You can read about it here

          http://fabric8.io/#/site/book/doc/index.md?chapter=mavenPlugin_md

           

          This maven plugin has not yet been implemented and supported in the developer tooling. So it uses the old way of deploying which has some limitations.

           

          You should use the -blueprint versions of the archetypes as they are OSGi blueprint apps which works the best in the OSGi container of JBoss Fuse.

          Or the -spring versions which will use spring-dm in OSGi which also works. Although blueprint is preferred and better.

           

          For the camel-cxf-contract-first-archetype to work it requires FAQ (Fuse Bundles) being installed at runtime, and FAB has some limitations to resolve and run. And that is why you can get these kind of errors as you see. Especially when you use a complicated project as CXF together (CXF has a lot of dependencies). And besides we have deprecated FAB and recommend people to use OSGi blueprint.

           

          In the future JBoss Fuse will be poly container, then you don't need to use OSGi based container, and can just use WARs in Tomcat / Wildfly, or use VertX / Spring Boot / DropWizard or a plain java container as your choice. And also we just added support for Docker containers as well.

          That work is currently ongoing in the community version of JBoss Fuse which is fabric8. You can find more details at the fabric8 website: http://fabric8.io/

          1 of 1 people found this helpful
          • 2. Re: Problem with deployment of archetypes to Fuse 6.1 fabric
            Radim Drtílek Newbie

            Thank You, I will try this.

             

            But it is really sad, that it is not noted in the documentation.

             

            https://access.redhat.com/site/documentation/en-US/Red_Hat_JBoss_Fuse/6.1/html/Tooling_Tutorials/files/RiderTutDeployPro…

             

            From this article I supposed it should work

            • 3. Re: Problem with deployment of archetypes to Fuse 6.1 fabric
              Radim Drtílek Newbie

              EDIT:

              OK now its running.

               

              I have to change parent of deployed profile from "karaf" to "feature-camel".


              Can You tell me why its deployed that way and how can I manage to get profile deployed correctly in my future profiles?

               

              ......


              OK I tried to deploy the very same example of


              org.apache.camel.archetypes/camel-archetype-blueprint

               

              by calling:  mvn fabric8:deploy


              and result is still the same ... container provision status is waiting, and this error in log

               

               

              Class: org.apache.zookeeper.ClientCnxn$1 Method: uncaughtException File: ClientCnxn.java:411

              Thread: pool-9-thread-1-SendThread(VMSIFUSE:2181)

              Bundle Name: io.fabric8.fabric-zookeeper Bundle ID: 53 Bundle Version: 1.0.0.redhat-379

               

              Message:

               

               

              1

               

              from pool-9-thread-1-SendThread(VMSIFUSE:2181)

               

              Stack Trace:
              • 4. Re: Problem with deployment of archetypes to Fuse 6.1 fabric
                Radim Drtílek Newbie

                When I change parent of profile deployed by JBDS from "default" to "feature-camel" it works too.

                 

                So basically

                • deploy from IDE is not working by default
                • deploy by mvn fabric8:deploy is not working by default

                 

                and I have to manually change profile parent to "feature-camel"

                 

                so what am I doing wrong ?

                 

                is the archetype org.apache.camel.archetypes/camel-archetype-blueprint bad, or is something missing in it ?

                 

                EDIT: i can see I can do that by configuration of plugin:

                <plugin>

                    <groupId>io.fabric8</groupId>

                    <artifactId>fabric8-maven-plugin</artifactId>

                    <configuration>

                        <profile>atos-bpnt-test</profile>

                        <parentProfiles>feature-camel</parentProfiles>

                      </configuration>

                  </plugin>


                is there any guide, or procedure, which can help me to identify which parent should my profile have ?