1 2 3 Previous Next 35 Replies Latest reply on Apr 17, 2013 11:02 AM by joshna_r Go to original post
      • 30. Re: How to make dependency on osgi bundle from war file
        thomas.diesler

        The use of pax-web is deprecated. You should be able to deploy your osgi war directly.

        There a number of test cases that show the scope of supported combinations.

        • 31. Re: How to make dependency on osgi bundle from war file
          jrantav

          joshna,

           

          two points:

           

          • you can still have libraries within .war even if you osgify the war. OSGi headers define its external interface - it doesn't have impact on the internals of your war
          • using pax-web and jetty was the 7.1.1 way. It is recommended to use 7.2 since OSGi in there is in a lot better shape (my opinion), and supports OSGi .wars in jbossweb. Download EAP 6.1.Alpha to use 7.2 functionalities like that. It is freely available on the download page.
          • 32. Re: How to make dependency on osgi bundle from war file
            joshna_r

            Thank you for your response.

             

            Reason I am trying to avoid OSGI manifest in my war is because i have to import packages of all the libraries that are not bundled in WEB-INF/lib in the manifest file.

             

            I am using EAP 6.0 which is 7.1.2 Final and using 'Dependencies'  in Manifest and can't get it working. In one of your posts from March 27th  , you have mentioned that 'dependencies' approach worked for you.

             

            like mentioned in the thread, there's two options:

            • osgify the war, provide it a valid OSGi manifest and
            • using regular dependencies mechanism, either through jboss-deployment-structure.xml or Dependencies header in the manifest.mf

            Both of these worked for me.

             

             

            This is the manifest of sample i am working with . Please see if i am missing something here and any tips to get this working.

             

            Manifest-Version: 1.0

            Archiver-Version: Plexus Archiver

            Created-By: Apache Maven

            Built-By: joshnar

            Build-Jdk: 1.6.0_27

            Dependencies: deployment.osgi-simple-service-api:0.0.2,org.osgi.core,

                             org.jboss.osgi.framework

            • 33. Re: How to make dependency on osgi bundle from war file
              djchapm

              Assuming your "osgi-simple-service-api" version 0.0.2 is deployed and Running (Check OSGI Console), then there is another issue I had with JBoss 7.1.2 and 7.1.3.

              1. Undeploy your war file.

              2. Stop your server.

              3. Remove deployments from you standalone xml file.

              4. Delete your "data" and "tmp" directories from your standalone directory.

              5. Start server.

              6. Go into OSGI Console and start all the bundles shown which are capabilities and core framework etc.  Not sure why JBoss doesn't automatically start them even if you set Eager.

              7. Deploy your OSGI Modules and start them.

              8. Not sure if this matters, but I always restart server at this point and ensure everything starts up on it's own.

              9. Now you can deploy your war file.

               

              This is what I've had to do on several occasions when all the sudden my non-osgi war file decides it can't see it's dependency modules.

               

              Dan C.

              • 34. Re: How to make dependency on osgi bundle from war file
                jrantav

                I never had to remove "tmp" or "data" directories, although I sometimes had to do some restart of bundles and/or server to get things to show up.

                 

                The manifest looks similar to what I was using (in this repo). It should work.

                 

                However, since you've had the error with "one or more indirect dependencies", I don't think this is the part you have an issue, but rather something transitive required by your osgi bundle (and only apparent on runtime) is missing. That can be hard to diagnoze, which is why I opened this discussion a while back.

                 

                In the end I got that problem sorted by doing start/stop on my bundles randomly, trying to get classnotfound to show up, and making mock wars using the osgi as a dependency, but that's hardly optimal...

                • 35. Re: How to make dependency on osgi bundle from war file
                  joshna_r

                  Thomas

                   

                  I am using EAP 6.0 which is  7.1.2 Final . When i stop pax-web bundles , osgi webapp does not work .

                   

                  Does Jboss has native support for OSGI webapps in EAP6.0 or am i stuck with pax-web.

                   

                  joshna

                  1 2 3 Previous Next