5 Replies Latest reply on Nov 4, 2010 10:45 AM by Enrique Ruiz

    OSGi Fragment doesn't work

    Enrique Ruiz Novice

      Hi all,

       

      I'm trying to deploy an OSGi Fragment (by specifying a Fragment-Host in its manifest) but it doesn't work.

       

      How can I deploy OSGi Fragments in FUSE 4.3?

       

      Thanks.

        • 1. Re: OSGi Fragment doesn't work
          Freeman(Yue) Fang Master

          Hi,

           

          Why you see it doesn't work? You get any exception?

           

          You need refresh the host bundle to see the fragment attached on it.

           

          Freeman

          • 2. Re: OSGi Fragment doesn't work
            Enrique Ruiz Novice

            I think the command osgi:list should show fragment info in host bundles, but I don't see any difference with normal bundles.

             

            I tried to refresh host bundle but nothing occured.

             

            Thanks.

            • 3. Re: OSGi Fragment doesn't work
              Freeman(Yue) Fang Master

              Hi,

               

              Ensure you specify the Fragment-Host same as the host's Bundle-SymbolicName, then refresh host bundle you should see sth like

               

              activemq-core (5.4.1.fuse-00-00)

                                                     Fragments: 53

               

              Did your fragment bundle avaiable when you use "osgi:list"?

              It should be sth like

              activemq-blueprint (5.4.1.fuse-00-00)

                                                     Hosts: 43

               

              Otherwise you need check $SMX_HOME/data/log/servicemix.log to see if there's some exceptions when install your fragment bundle

               

              Freeman

              • 4. Re: OSGi Fragment doesn't work
                Enrique Ruiz Novice

                Hi Freeman,

                 

                I don't if this info is useful, but I don't see the same info you said:

                 

                karaf@root> osgi:list | grep activemq-core

                activemq-core (5.4.0.fuse-00-00)

                karaf@root> osgi:list | grep blueprint

                activemq-blueprint (5.4.0.fuse-00-00)

                 

                Below the ouput of info command about my environment:

                 

                karaf@root> info

                Karaf

                  Karaf home                  /home/eruiz/software/java/apache-servicemix-4.3.0-fuse-00-00

                  Karaf base                  /home/eruiz/software/java/apache-servicemix-4.3.0-fuse-00-00

                  OSGi Framework              org.apache.felix.framework - 3.0.1

                 

                JVM

                  Java Virtual Machine        Java HotSpot(TM) 64-Bit Server VM version 17.1-b03

                  Version                     1.6.0_22

                  Vendor                      Sun Microsystems Inc.

                  Uptime                      2 hours 53 minutes

                  Total compile time          43.104 seconds

                Threads

                  Live threads                83

                  Daemon threads              43

                  Peak                        89

                  Total started               1070

                Memory

                  Current heap size           182,069 kbytes

                  Maximum heap size           466,048 kbytes

                  Committed heap size         224,960 kbytes

                  Pending objects             0

                  Garbage collector           Name = 'PS Scavenge', Collections = 21, Time = 0.655 seconds

                  Garbage collector           Name = 'PS MarkSweep', Collections = 3, Time = 0.741 seconds

                Classes

                  Current classes loaded      7,207

                  Total classes loaded        7,263

                  Total classes unloaded      56

                Operating system

                  Name                        Linux version 2.6.35-22-generic

                  Architecture                amd64

                  Processors                  2

                • 5. Re: OSGi Fragment doesn't work
                  Enrique Ruiz Novice

                  Hi Freeman,

                   

                  Sorry, I see it, the fragment info is in a new line and grep command didn't show it.

                   

                  l will search for any Exception.

                   

                  Thanks