4 Replies Latest reply on Feb 4, 2010 4:10 AM by wesoly

    bundles copied to deploy folder are ignored (sometimes)

    tokc

      Hello All,

       

      when I copy bundles (JAR files) to deploy folder it happens (sometimes !) that they are not recognized. They do not appear if I execute "list" command from osgi console. There are no errors, nothing. As if they didn't exist at all.

       

      The full picture looks like this. I have a bunch of integration tests. The tests begin with setting up a clean FuseESB. Then, after Fuse is started, bundles are copied - one per second in reasonable order (to satisfy dependencies if possible). Usually everything works fine, and after the copying is finished, all the bundles are in ACTIVE state. But sometimes some bundles are just missing. Like they were not copied at all, even though they are in deploy folder.

      ERRATA

      In log I could see "unsupported deployment"

      13:25:10,021 | WARN | FileMonitor? | Unsupported deployment: PATH_TO_FUSE/deploy/some-bundle-version.jar

      but after I execute

      touch PATH_TO_FUSE/deploy/some-bundle-version.jar

      the bundle works fine

       

      Do you know what might be the cause of this strange behaviour ? Have you also encountered it ? Any hints on how to fix (or at least diagnose) this behaviour ?

       

      I use FuseESB 4.1.0.2 on Linux.

       

      --

      Best regards,

      Tomek Kaczanowski

       

      Edited by: tokc on Dec 11, 2009 12:24 PM

       

      changed information on log - there ARE some log messages

        • 1. Re: bundles copied to deploy folder are ignored (sometimes)
          davestanley

          Hi tomek,

          Can you set the log level to DEBUG and see if you get additional detail.

           

          >log/set DEBUG

          >log/display

           

          It might help to disable the embedded ESB part of your test and just use a running instance and see if you get the same problem.

           

          Regards

          /Dave

          • 2. Re: bundles copied to deploy folder are ignored (sometimes)
            wesoly

            Hi Dave,

             

            With log level set to DEBUG we got following exception:

            14:38:41,697  | DEBUG | LocalConsole                     | Got event: 4

            14:38:41,697 | DEBUG | framework                        | FrameworkEvent PACKAGES REFRESHED

            14:38:43,647 | DEBUG | Scanner | File added: PATH_TO_FUSE/deploy/some-bundle-version.jar

            14:38:43,648 | DEBUG | FileMonitor | File changed: PATH_TO_FUSE/deploy/some-bundle-version.jar

            14:38:43,648 | DEBUG | FileMonitor                      | Error transforming artifact some-bundle-version.jar

            java.util.zip.ZipException: error in opening zip file

            at java.util.zip.ZipFile.open(Native Method)

            at java.util.zip.ZipFile.<init>(ZipFile.java:131)

            at java.util.jar.JarFile.<init>(JarFile.java:150)

            at java.util.jar.JarFile.<init>(JarFile.java:114)

            at org.apache.servicemix.kernel.filemonitor.FileMonitor.transformArtifact(FileMonitor.java:357)

            at org.apache.servicemix.kernel.filemonitor.FileMonitor.onFilesChanged(FileMonitor.java:270)

            at org.apache.servicemix.kernel.filemonitor.FileMonitor$1.filesChanged(FileMonitor.java:151)

            at org.apache.servicemix.kernel.filemonitor.Scanner.reportBulkChanges(Scanner.java:431)

            at org.apache.servicemix.kernel.filemonitor.Scanner.reportDifferences(Scanner.java:327)

            at org.apache.servicemix.kernel.filemonitor.Scanner.scan(Scanner.java:261)

            at org.apache.servicemix.kernel.filemonitor.Scanner$1.run(Scanner.java:221)

            at java.util.TimerThread.mainLoop(Timer.java:534)

            at java.util.TimerThread.run(Timer.java:484)

            14:38:43,649 | WARN | FileMonitor | Unsupported deployment: PATH_TO_FUSE/deploy/some-bundle-version.jar

            14:38:43,650 | DEBUG | LocalConsole                     | Got event: 4

            14:38:43,650 | DEBUG | framework                        | FrameworkEvent PACKAGES REFRESHED

            Exception is thrown every time bundle is not "recognized".

             

            --

            Best regards,

            Pawel Wesolowski

             

            Edited by: wesoly on Feb 2, 2010 12:44 PM

             

            Edited by: wesoly on Feb 2, 2010 12:45 PM

            • 3. Re: bundles copied to deploy folder are ignored (sometimes)
              igorfoliveira

              Are you deploying a .jar file?

               

              Try wrap your jar file with a  BND Tool and try deploy again.

               

              If you are using maven, you can wrap with the maven-bundle-plugin.

              • 4. Re: bundles copied to deploy folder are ignored (sometimes)
                wesoly

                This is not the cause of our problem. We use maven and maven-bundle-plugin to create our bundles. Please read carefully first post.

                 

                --

                Best regards,

                Pawel Wesolowski

                 

                Edited by: wesoly on Feb 4, 2010 9:10 AM