Announcement Announcement Module
Collapse
No announcement yet.
automatically install dependencies Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • automatically install dependencies

    Hi All,

    I am trying to install "Spring Web Services Core 1.5.9.A" from http://www.springsource.com/reposito...y=web+services.

    When I tried to install it from the WebUI http://localhost:8080/admin/web/artifact/deploy.htm, it would complain that "Dependency satisfaction failed". So my question is what is the best way to install those dependencies? Should I just download and install one by one? Is there an automatic way to do that , just like 'yum' in the linux world ?

    Any suggestion are appreciated.

    Cheers,
    Andy
    Last edited by andywang; Mar 1st, 2010, 10:24 PM. Reason: grammer

  • #2
    Hi Andy,
    Since you got the bundle from the EBR, go look there for a dependency analysis. There it will tell you what this bundle must and could depend upon. (There is a caveat at the foot to say that not all the dependencies need be accurate).

    How are you intending to use this bundle? Deploying it directly ("installing" is only half the story) is unlikely to be what you need for an application (war?), although this is a quick way to tell if you have enough in your repository chain to allow this bundle to be faulted in when you refer to its exports from another bundle/app.

    If you deploy it from the admin console you may not see the messages that dm Server issues. Instead, drop it into the pickup directory and look at the server's console which will tell you why it isn't resolved. Also, the logs in the serviceability directory can be helpful).

    Get back to us if you need more,

    Steve Powell

    PS: If you are using STS, you can provision the dependencies of your bundle from the EBR (the ones you want) and these can be placed in the usr repository of your server. It is slightly easier than deploying, fetching and deploying again. SP
    Last edited by Steve Powell; Mar 2nd, 2010, 06:01 AM. Reason: added postscript

    Comment


    • #3
      Hi Steve,

      Thanks for the reply.

      I am currently using STS and I can't find the place to "provision the dependencies of your bundle from the EBR", could you please give me more details or just point me a link? thanks!

      For your question, I am trying to put the Spring Web Services bundle into the OSGi kind of environment and then develop some stuff from there. For me OSGi is more likely the future way to go.

      I am still new to DM as well as WS so forgive me if I ask some stupid questions.. :-)

      Cheers,
      Andy

      Comment


      • #4
        Andy,

        The way it should work is...
        • First of all create or connect to a dm Server (2.0), running locally. This will appear in your Servers view.
        • In that view you should select the server you wish to provision and right-click and choose Open. You should get the Overview pane of the server management functions.
        • The Repository pane allows you to search the EBR (called the SpringSource Bundle Repository in this view) for bundles, etc, and download them and 'install' them into the server. (You should update the local copy of the index before you use it.)
        Then you can choose to download one and install it into the server.

        HOWEVER, now that I try looking for your bundle (Web Services Core 1.5.9A) I notice it isn't there, and refresh doesn't find it. This is because this dm Server Tools feature uses a pre-built index (which is why the date is May 2009, even after updating it).

        This index is out-of-date and doesn't have your bundle in it! Sorry about that. I'm going to ask the developer responsible if there are any plans to update the index.

        Meanwhile, the route I suggested before is fine, and you can still use the STS server management pages to look at the running system (it could even give you a graph of the dependencies after you have installed them).

        However, I recommend trying the admin console to look at any dump you got when the deploy failed -- you can then look at the partially resolved state, and see what was not resolved.

        Let me know how you get on.

        Steve Powell

        Comment


        • #5
          Just to throw in my own two cents here, I have recently been through the process of trying to get spring-ws 1.5.9 working on Spring DM Server 2.0. However, I found conflicts with the ERB provided bundle and the standard ext bundles pre-installed. I had to use the official distribution of spring-ws (which provides osgi-enabled libraries) and modify my spring library to exclude the 3.0 version of the oxm bundle. The jars I used from the spring-ws include spring-xml-1.5.9, spring-oxm-1.5.9, spring-ws-core-1.5.9, spring-ws-support-1.5.9, spring-ws-security-1.5.9, spring-oxm-tiger-1.5.9. If you have trouble with the ERB distribution, you may want to consider this as a viable alternative route.

          Comment


          • #6
            Hi Steve, Thanks for the help. Please find my comments below
            Originally posted by Steve Powell View Post
            Andy,

            The way it should work is...

            ...

            HOWEVER, now that I try looking for your bundle (Web Services Core 1.5.9A) I notice it isn't there, and refresh doesn't find it. This is because this dm Server Tools feature uses a pre-built index (which is why the date is May 2009, even after updating it).

            This index is out-of-date and doesn't have your bundle in it! Sorry about that. I'm going to ask the developer responsible if there are any plans to update the index.
            I have tried this and found the same problem that it will not update to the latest bundles.

            Meanwhile, the route I suggested before is fine, and you can still use the STS server management pages to look at the running system (it could even give you a graph of the dependencies after you have installed them).

            However, I recommend trying the admin console to look at any dump you got when the deploy failed -- you can then look at the partially resolved state, and see what was not resolved.
            I have downloaded all of the dependency bundles and put all of them into the \pickup directory but still met unresolved issues. Please find attached log.zip. Like the first error, "org.springframework.util.xml" unresolved and I searched EBR and it is actually part of the org.springframework.core-3.0.1.RELEASE-A.jar which is already in the pickup directory. I recall that in some dm guide, it mentions that hot deployment will NOT check the dependency for all bundles then load the clean ones first and the one depends on them later. So I might need to create a kind of PLAN or PAR to make sure the loading sequence is correct. I will try manually load it one by one .... I am sure that it will be resolved someday later but for now I have no choice..

            Comment


            • #7
              Originally posted by mvanorman View Post
              Just to throw in my own two cents here, I have recently been through the process of trying to get spring-ws 1.5.9 working on Spring DM Server 2.0. However, I found conflicts with the ERB provided bundle and the standard ext bundles pre-installed. I had to use the official distribution of spring-ws (which provides osgi-enabled libraries) and modify my spring library to exclude the 3.0 version of the oxm bundle. The jars I used from the spring-ws include spring-xml-1.5.9, spring-oxm-1.5.9, spring-ws-core-1.5.9, spring-ws-support-1.5.9, spring-ws-security-1.5.9, spring-oxm-tiger-1.5.9. If you have trouble with the ERB distribution, you may want to consider this as a viable alternative route.
              Hi mvanorman,

              Could you please provide more info about how to "modify spring library to exclude the 3.0 version of oxm bundle" and how to deploy those spring-*-1.5.9 to the DM?

              Also one thing I am still confusing is that how the conflict exists between the ERB bundle and pre-installed bundle? based on the OSGi concept different version of bundle could be co-exist without any problem.. so what is wrong with the oxm bundle?

              Thanks,
              Andy
              Last edited by andywang; Mar 4th, 2010, 10:12 PM. Reason: use correct word

              Comment


              • #8
                Originally posted by andywang View Post
                Could you please provide more info about how to "modify spring library to exclude the 3.0 version of oxm bundle" and how to deploy those spring-*-1.5.9 to the DM?
                For me, I simply downloaded the official spring-ws 1.5.9 distribution and copied the required libraries to the repository/usr folder. They are already build as OSGi bundles in the official distribution, so no modification was required. This included all 7 jars in the "dist/modules" folder of the "minimal" distribution.

                Originally posted by andywang View Post
                Also one thing I am still confusing is that how the conflict exists between the ERB bundle and pre-installed bundle? based on the OSGi concept different version of bundle could be co-exist without any problem.. so what is wrong with the oxm bundle?
                You are correct in that multiple versions of the packages may be deployed concurrently. I actually didn't change that. In my case, both the 1.5.9 sprint-oxm library included with spring-ws and the spring 3.0 oxm library are both deployed. However, I was taking advantage of the "Import-Library" manifest directive to import all the spring libraries (version 3) for general use by my bundle. When I imported the org.springframework.spring library, it included the oxm bundle as part of its definition. When my bundle imported both versions of the library, that's when the conflict occurred. The container didn't care that both were deployed, but it conflicts if you explicitly import multiple versions of the same package. I copied the "org.springframework.spring-library-3.0.0.RELEASE.libd" file to a new name under my usr repository and removed the oxm library. That way I could still import all the rest of the spring stuff in one manifest entry. if you are not relying on import-library, then you will not need to follow that step.

                Comment


                • #9
                  Hi,
                  You are right, hot deployment will not 'batch up' the files dropped into pickup and deploy them altogether (which would allow some to depend upon each other and resolution could cope with dependencies -- including circular ones).

                  Why don't you try putting all your bundles in the usr repository, and deploying the one you really want from there? (There is a nice syntax for deploying out of your own repository which works on admin console, but as the shell has tab-completion it's much easier there.) The dependencies ought to be faulted in for you then, as needed.

                  Alternatively, after all the bundles are in the repository, you can define a plan which references the ones you want and drop the plan in the pickup directory to install, resolve and start them all at once. It's actually very easy to do this.

                  Finally, if you put the plan into the repository, too, you can deploy the plan from the admin console or shell!

                  Please let us know how it goes for you.

                  Comment

                  Working...
                  X