Announcement Announcement Module
Collapse
No announcement yet.
Formtags fails after restart - how does pickup order bundles.... Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Formtags fails after restart - how does pickup order bundles....

    1. Start up server
    2. Copy formtags-shared-services-service-1.0.1.RELEASE.jar and formtags-shared-services-war-1.0.1.RELEASE.war to pick up
    3. Observe that everything works by hitting the url

    Now restart and get the failed error messages below. Note that by deleting and re-adding the war, it starts fine. $64k question - it seems there is an ordering dependency on restarts?

    ideas


    [2008-05-30 15:47:13.343] main <SPKB0001I> Platform starting.
    [2008-05-30 15:47:18.468] main <SPKE0000I> Boot subsystems installed.
    [2008-05-30 15:47:20.156] main <SPKE0001I> Base subsystems installed.
    [2008-05-30 15:47:21.875] platform-dm-1 <SPPM0000I> Installing profile 'web'.
    [2008-05-30 15:47:23.468] platform-dm-1 <SPPM0001I> Installed profile 'web'.
    [2008-05-30 15:47:23.468] platform-dm-7 <SPSC0001I> Starting ServletContainer on port 8080 and SSL port 8443.
    [2008-05-30 15:47:24.734] platform-dm-1 <SPPM0002I> Platform open for business with profile 'web'.
    [2008-05-30 15:47:26.531] fs-watcher <SPSC1000I> Creating web application '/'.
    [2008-05-30 15:47:26.703] async-delivery-thread-1 <SPSC1001I> Starting web application '/'.
    [2008-05-30 15:47:27.312] fs-watcher <SPDE0010I> Deployment of 'platform.admin.splash-1.0.0.beta4.war' version '0' c
    ompleted.
    [2008-05-30 15:47:29.703] fs-watcher <SPDE0018E> Unable to install application from location 'file:/C:/java/springAp
    p1B4/pickup/formtags-shared-services-war-1.0.1.RELEASE.war'. Could not satisfy constraints for bundle 'org.springframework.showcas
    e.formtags.web-shared-services' at version '0.0.0'.
    Cannot resolve: org.springframework.showcase.formtags.web-shared-services
    Unsatisfied leaf constraints:
    Bundle: org.springframework.showcase.formtags.web-shared-services_0.0.0 - Import-Package: org.springframework.showcase.formtag
    s.domain; version="0.0.0"
    Did you mean: 'org.springframework.core.annotation'?
    Bundle: org.springframework.showcase.formtags.web-shared-services_0.0.0 - Import-Package: org.springframework.showcase.formtag
    s.service; version="0.0.0"
    Did you mean: 'org.springframework.osgi.service'?
    .
    [2008-05-30 15:47:29.796] fs-watcher <SPDE0011E> Deployment failed.
    [2008-05-30 15:47:29.796] fs-watcher <SPDE0005E> Hot deploy failed for resource 'C:javaspringApp1B4pickupformtag
    s-shared-services-war-1.0.1.RELEASE.war'.
    [2008-05-30 15:47:31.500] fs-watcher <SPDE0010I> Deployment of 'formtags-shared-services-service-1.0.1.RELEASE.jar'
    version '0' completed.

  • #2
    Formtags fails after restart - how does pickup order bundles....

    Deployment by dropping files into the pickup directory does not currently guarantee to respect order. We have considered various schemes, but none are particularly great. Problems occur when larger files take longer to complete copying than smaller files. Preserving the file timestamp order during deployment on Platform restart would help the particular symptom you are seeing, but wouldn't solve the other problems.

    As of beta 5 (last Friday's shipment) there is another approach. If you put dependencies, like the shared services bundle, in the repository, these will not only be installed when the applications (like the formtags war) that depend on them are deployed, but they'll also be started.

    Please feel free to raise a JIRA issue if you'd like to log this issue formally and get a formal response.

    Comment


    • #3
      Formtags fails after restart - how does pickup order bundles....

      thanks for the info glyn, after reading some of the items over the past couple of weeks, it seems several other devs mis-interpreted the OSGI dynamic link stuff.....

      eg. deploy a service bundle (mySvc1.0). Now you can hit that service from other deployed artifacts: a webapp, a websvc, etc. And you can deploy an updated version of mySvc1.1 (lets say with bug fixes), and have the webapp and websvc use it - without a restart.

      It is unclear whether or not this is possible. We should use the repo directory for shared dependencies (no deployment necessary - just copy it in ?). If there is no intention of supporting dependent deployed modules, then the platform should not permit it and dump an exception, rather then the race condition in place today. A pretty big oversight. Despite the very interesting stuff I have learned so far, stuff like this makes me hesitant to move forward (And i really want to get off of heavy weight app servers!!).

      Not being able to have JSP's/Servlets/java classes swapped into the running JVM in WTP is another major productivity hurdle. The par example I am interesting in:
      1) MySvc pojo svc.
      2) MySvc WebApp
      3) MySvc WebSvc

      Then deployed on another jvm and use by MySvc:
      4) MySvc syncSubSvc (Spring Mdp req-response on tempq)
      5) MySvc asyncSubSvc ( Spring Mdp)

      Comment


      • #4
        Formtags fails after restart - how does pickup order bundles....

        >It is unclear whether or not this is possible.

        It's certainly possible today. You can deploy a service bundle using the Admin. Console and then deploy an updated version to pull in bug fixes. Unlike the (currently) unordered collection of files in the pickup directory, applications and bundles deployed using the Admin. Console are redeployed in the same order on Platform restart. (We are looking into the possibility of sorting the files in the pickup directory to get the original deployment order on Platform restart.)

        >We should use the repo directory for shared dependencies (no deployment necessary - just copy it in ?).

        Yes, you can add bundles to the repo. simply by copying them in. Once a bundle is installed in the Platform from the repo., you'd have to use the Equinox console to update/refresh the bundle, which admittedly is messy.

        >If there is no intention of supporting dependent deployed modules, then the platform should not permit it and dump an exception, rather then the
        >race condition in place today. A pretty big oversight. Despite the very interesting stuff I have learned so far, stuff like this makes me hesitant to
        >move forward (And i really want to get off of heavy weight app servers!!).

        We'll look into that policing if the sorting approach is infeasible.

        >Not being able to have JSP's/Servlets/java classes swapped into the running JVM in WTP is another major productivity hurdle.

        If you are using the S2AP tooling, then updating one of the bundles of a PAR should cause the bundle to be updated/refreshed if the PAR is already deployed in a Platform instance running under the tooling. I'd be grateful if you could raise a JIRA with steps to reproduce the problem you are seeing as we definitely support that scenario. (If you are talking about updating individual JSPs etc. without updating their containing bundle, then that's an issue we are aware of and are planning to address.)

        Hope that helps!

        Comment


        • #5
          Formtags fails after restart - how does pickup order bundles....

          Many thanks Glyn for clarifying this critcal difference between using the console and the pickup dir. Might want to highlight this clarification in bold,red in 7.4 of the programmers guide which indicates exactly the wrong thing to do:


          To deploy the WAR, copy /dist/formtags-shared-services-war* to the PLATFORM_HOME/pickup directory. You should then see console output similar to the following:

          Comment


          • #6
            Formtags fails after restart - how does pickup order bundles....

            Good suggestion - thanks. I've logged a JIRA to track this formally: https://issuetracker.springsource.com/browse/PLATFORM-65

            Comment

            Working...
            X