7 Replies Latest reply on Mar 23, 2011 2:01 PM by labo32_delaboe

    Help on file poller camel osgi example

    labo32_delaboe

      Hello,

       

      can you please help me to create a file poller example with camel bundles as osgi package ?

       

      I want to read files located in the apache-servicemix-4.3.1\data\inbox directory.

       

      My configuration looks like

       

       

       

       

      I am able to build and deploy the osgi package, the osgi:list command shows my bundle but I did not get any output in the log file when I drop a file in the data\inbox directory.

       

       

      Thanks

      labo

        • 1. Re: Help on file poller camel osgi example
          gertv

          L.S.,

           

          The XML file looks fine at first glance.  Is this file included in your OSGi bundle in META-INF/spring?  Do you see any exceptions in the log file?  Could you paste the output for the osgi:list and osgi:headers command for this bundle?

           

          Regards,

           

          Gert

          • 2. Re: Help on file poller camel osgi example
            njiang

            Just another thing to check:

            Did you install the feature of camel ?

            • 3. Re: Help on file poller camel osgi example
              labo32_delaboe

              My osgi list looks like

               

              karaf@root> osgi:list | grep camel

              camel-core (2.6.0.fuse-00-00)

              camel-spring (2.6.0.fuse-00-00)

              camel-blueprint (2.6.0.fuse-00-00)

              camel-http (2.6.0.fuse-00-00)

              camel-jetty (2.6.0.fuse-00-00)

              camel-cxf (2.6.0.fuse-00-00)

              camel-quartz (2.6.0.fuse-00-00)

               

              and my osgi component

               

              Apache ServiceMix :: Features :: Labo :: Openliga Import Source OSGi (4.3.1.fuse-00-00)

               

               

               

              osgi header for my component

               

              Apache ServiceMix :: Features :: Labo :: Openliga Import Source OSGi (265)

              -


              Manifest-Version = 1.0

              Bnd-LastModified = 1300824470050

              Tool = Bnd-0.0.357

              Built-By = labo

              Build-Jdk = 1.6.0_22

              Created-By = Apache Maven Bundle Plugin

               

              Bundle-Vendor = FuseSource

              Bundle-Name = Apache ServiceMix :: Features :: Labo :: Openliga Import Source OSGi

              Bundle-DocURL = http://fusesource.com/

              Bundle-Description = Labo :: Openliga Import Source OSGi

              Bundle-SymbolicName = openliga-import-source-osgi

              Bundle-Version = 4.3.1.fuse-00-00

              Bundle-License = http://www.apache.org/licenses/LICENSE-2.0.txt

              Bundle-ManifestVersion = 2

               

              Import-Package =

                      net.larbig.servicemix.openliga.source,

                      org.apache.activemq.camel.component,

                      org.apache.commons.logging

              Export-Package =

                      net.larbig.servicemix.openliga.source;uses:=org.apache.commons.logging

               

               

              where

               

              net.larbig.servicemix.openliga.source,

              org.apache.activemq.camel.component,

               

              is red colored

               

               

              My beans.xml in mETA-INF\spring looks  (jms bean for future use, I want to send the file content to a jms queue)

               

               

               

              Edited by: labo32 on Mar 23, 2011 5:26 AM

              • 4. Re: Help on file poller camel osgi example
                labo32_delaboe

                yep.... I used already other camel components succesful, see osgi:list of my output above

                • 5. Re: Help on file poller camel osgi example
                  njiang

                  Oh, you didn't install the came-activemq component.

                  You may need to install activemq feature first.

                  • 6. Re: Help on file poller camel osgi example
                    ffang

                    Hi,

                     

                    Look at

                    265 Installed 60 Apache ServiceMix :: Features :: Labo :: Openliga Import Source OSGi (4.3.1.fuse-00-00)

                     

                    which means your customer bundle status is Installed, it's not started correctly.

                     

                    If you use

                    osgi:start 265

                    you should be able to see exception log in $FUSE_ESB/data/log/servicemix.log, which generally can tell you more details(some thing like missing package) why your bundle can't start successfully.

                     

                    Freeman

                    • 7. Re: Help on file poller camel osgi example
                      labo32_delaboe

                      After checking osgi:start 265 the log shows that the camel-activemq component is missing.

                       

                      Thanks a lot to both of you since both answers point to the correct solution from a different point of view.....