Cocoon
  1. Cocoon
  2. COCOON-2105

Cocoon's snapshots archives are broken

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.1.11, 2.2
    • Fix Version/s: None
    • Component/s: * Cocoon Core
    • Labels:
      None
    • Urgency:
      Blocker

      Description

      Our users have reported recently that our snapshots archives are broken, see these links:
      http://article.gmane.org/gmane.text.xml.cocoon.user/61941
      http://article.gmane.org/gmane.text.xml.cocoon.user/61866 and user's reply http://article.gmane.org/gmane.text.xml.cocoon.user/61875

      I think it's really blocker issue because our snapshots are plain broken and the situation causes a lot of confusion.

      I hope that someone can have a look at it, *quickly*.

        Activity

        Hide
        Carsten Ziegeler added a comment -
        Could some please add information about what exactly has been downloaded from where, including the full url?
        Show
        Carsten Ziegeler added a comment - Could some please add information about what exactly has been downloaded from where, including the full url?
        Hide
        Valentin Jacquemin added a comment -
        I downloaded the snapshot from http://svn.apache.org/snapshots/cocoon-BRANCH_2_1_X yesterday.

        I had to exclude jcr block and then it builds but on the runtime I had an error that a component was not found.

        Then on the user mailing list Grzegorz Kossakowski advise me to checkout the svn for the last release and all were fine with all blocks include and I don't have runtime errors anymore.
        Show
        Valentin Jacquemin added a comment - I downloaded the snapshot from http://svn.apache.org/snapshots/cocoon-BRANCH_2_1_X yesterday. I had to exclude jcr block and then it builds but on the runtime I had an error that a component was not found. Then on the user mailing list Grzegorz Kossakowski advise me to checkout the svn for the last release and all were fine with all blocks include and I don't have runtime errors anymore.
        Hide
        Grzegorz Kossakowski added a comment -
        I have downloaded http://svn.apache.org/snapshots/cocoon-BRANCH_2_1_X/cocoon-BRANCH_2_1_X_20070804042107.tar.gz
        and done svn export http://svn.apache.org/repos/asf/cocoon/branches/BRANCH_2_1_X/

        Then I tried to compare both distribution, they differ significantly. It looks like some directories in snapshot version are really outdated. Take a look at diff of template block:

        grek@grek:~/cocoon-src/cocoon-2.1.x-svnexport/src/blocks/template> diff --unidirectional-new-file --recursive --unified . ~/cocoon-src/cocoon-BRANCH_2_1_X-snapshot/src/blocks/template/
        diff --unidirectional-new-file --recursive --unified ./java/org/apache/cocoon/template/script/DefaultScriptManager.java /home/grek/cocoon-src/cocoon-BRANCH_2_1_X-snapshot/src/blocks/template/java/org/apache/cocoon/template/script/DefaultScriptManager.java
        --- ./java/org/apache/cocoon/template/script/DefaultScriptManager.java 2006-09-23 08:52:29.000000000 +0200
        +++ /home/grek/cocoon-src/cocoon-BRANCH_2_1_X-snapshot/src/blocks/template/java/org/apache/cocoon/template/script/DefaultScriptManager.java2007-03-30 18:27:56.000000000 +0200
        @@ -16,42 +16,46 @@
          */
         package org.apache.cocoon.template.script;

        +import org.apache.cocoon.ProcessingException;
        +import org.apache.cocoon.components.source.SourceUtil;
        +import org.apache.cocoon.template.environment.ParsingContext;
        +import org.apache.cocoon.template.expression.StringTemplateParser;
        +import org.apache.cocoon.template.script.event.StartDocument;
        +import org.apache.cocoon.util.location.LocationUtils;
        +
         import org.apache.avalon.framework.activity.Disposable;
         import org.apache.avalon.framework.logger.AbstractLogEnabled;
         import org.apache.avalon.framework.service.ServiceException;
         import org.apache.avalon.framework.service.ServiceManager;
        -import org.apache.avalon.framework.service.ServiceSelector;
         import org.apache.avalon.framework.service.Serviceable;
         import org.apache.avalon.framework.thread.ThreadSafe;
        -import org.apache.cocoon.ProcessingException;
        -import org.apache.cocoon.components.source.SourceUtil;
        -import org.apache.cocoon.template.environment.ParsingContext;
        -import org.apache.cocoon.template.expression.StringTemplateParser;
        -import org.apache.cocoon.template.script.event.StartDocument;
         import org.apache.excalibur.source.Source;
         import org.apache.excalibur.source.SourceException;
         import org.apache.excalibur.source.SourceResolver;
         import org.apache.excalibur.source.SourceValidity;
         import org.apache.excalibur.store.Store;
        +
         import org.xml.sax.Locator;
         import org.xml.sax.SAXParseException;

         /**
        - * @version $Id: DefaultScriptManager.java 449189 2006-09-23 06:52:29Z crossley $
        + * @version $Id: DefaultScriptManager.java 524153 2007-03-30 16:13:22Z vgritsenko $
          */
        -public class DefaultScriptManager
        - extends AbstractLogEnabled
        - implements Serviceable, Disposable, ScriptManager, ThreadSafe {
        +public class DefaultScriptManager extends AbstractLogEnabled
        + implements Serviceable, Disposable, ScriptManager,
        + ThreadSafe {
        +
        + private static final String JX_STORE_PREFIX = "jxtg:";
        +
        + private String stringTemplateParserName;

             private ServiceManager manager;
        - private final static String JX_STORE_PREFIX = "jxtg:";
             private Store store;
             private InstructionFactory instructionFactory;
        - private ServiceSelector stringTemplateParserSelector;
             private StringTemplateParser stringTemplateParser;
        - private String stringTemplateParserName = "jxtg";

             public DefaultScriptManager() {
        + stringTemplateParserName = "jxtg";
             }

             /**
        @@ -59,27 +63,23 @@
              */
             public void service(ServiceManager manager) throws ServiceException {
                 this.manager = manager;
        - this.store = (Store) this.manager.lookup(Store.TRANSIENT_STORE);
        - this.instructionFactory = (InstructionFactory) this.manager.lookup(InstructionFactory.ROLE);
        - this.stringTemplateParserSelector = (ServiceSelector) this.manager.lookup(StringTemplateParser.ROLE
        - + "Selector");
        - this.stringTemplateParser = (StringTemplateParser) this.stringTemplateParserSelector
        - .select(this.stringTemplateParserName);
        + this.store = (Store) manager.lookup(Store.TRANSIENT_STORE);
        + this.instructionFactory = (InstructionFactory) manager.lookup(InstructionFactory.ROLE);
        + this.stringTemplateParser = (StringTemplateParser)
        + manager.lookup(StringTemplateParser.ROLE + "/" + stringTemplateParserName);
             }

             /**
              * @see org.apache.avalon.framework.activity.Disposable#dispose()
              */
             public void dispose() {
        - if ( this.manager != null ) {
        + if (stringTemplateParser != null) {
        + manager.release(stringTemplateParser);
        + stringTemplateParser = null;
        + }
        + if (this.manager != null) {
                     this.manager.release(this.store);
                     this.manager.release(this.instructionFactory);
        - if ( this.stringTemplateParserSelector != null ) {
        - this.stringTemplateParserSelector.release(this.stringTemplateParser);
        - this.manager.release(this.stringTemplateParserSelector);
        - this.stringTemplateParserSelector = null;
        - this.stringTemplateParser = null;
        - }
                     this.store = null;
                     this.instructionFactory = null;
                     this.manager = null;
        @@ -142,14 +142,19 @@
                     }
                 } catch (SourceException se) {
                     throw SourceUtil.handle("Error during resolving of '" + uri + "'.", se);
        - } catch (Exception exc) {
        - throw new SAXParseException(exc.getMessage(), location, exc);
        + } catch (ProcessingException e) {
        + throw ProcessingException.throwLocated(null, e, LocationUtils.getLocation(location));
        + } catch (Exception e) {
        + throw new SAXParseException(e.getMessage(), location, e);
                 } finally {
        - if (input != null)
        + if (input != null) {
                         resolver.release(input);
        - if (resolver != null)
        + }
        + if (resolver != null) {
                         manager.release(resolver);
        + }
                 }
        +
                 return doc;
             }
        -}

        [then it is a missing license file and so on]

        I'm not sure how snapshots are produced but it's most probably a script that invokes svn up and something got wrong so some directories are *not* up to date.

        Hope that helps.
        Show
        Grzegorz Kossakowski added a comment - I have downloaded http://svn.apache.org/snapshots/cocoon-BRANCH_2_1_X/cocoon-BRANCH_2_1_X_20070804042107.tar.gz and done svn export http://svn.apache.org/repos/asf/cocoon/branches/BRANCH_2_1_X/ Then I tried to compare both distribution, they differ significantly. It looks like some directories in snapshot version are really outdated. Take a look at diff of template block: grek@grek :~/cocoon-src/cocoon-2.1.x-svnexport/src/blocks/template> diff --unidirectional-new-file --recursive --unified . ~/cocoon-src/cocoon-BRANCH_2_1_X-snapshot/src/blocks/template/ diff --unidirectional-new-file --recursive --unified ./java/org/apache/cocoon/template/script/DefaultScriptManager.java /home/grek/cocoon-src/cocoon-BRANCH_2_1_X-snapshot/src/blocks/template/java/org/apache/cocoon/template/script/DefaultScriptManager.java --- ./java/org/apache/cocoon/template/script/DefaultScriptManager.java 2006-09-23 08:52:29.000000000 +0200 +++ /home/grek/cocoon-src/cocoon-BRANCH_2_1_X-snapshot/src/blocks/template/java/org/apache/cocoon/template/script/DefaultScriptManager.java2007-03-30 18:27:56.000000000 +0200 @@ -16,42 +16,46 @@   */  package org.apache.cocoon.template.script; +import org.apache.cocoon.ProcessingException; +import org.apache.cocoon.components.source.SourceUtil; +import org.apache.cocoon.template.environment.ParsingContext; +import org.apache.cocoon.template.expression.StringTemplateParser; +import org.apache.cocoon.template.script.event.StartDocument; +import org.apache.cocoon.util.location.LocationUtils; +  import org.apache.avalon.framework.activity.Disposable;  import org.apache.avalon.framework.logger.AbstractLogEnabled;  import org.apache.avalon.framework.service.ServiceException;  import org.apache.avalon.framework.service.ServiceManager; -import org.apache.avalon.framework.service.ServiceSelector;  import org.apache.avalon.framework.service.Serviceable;  import org.apache.avalon.framework.thread.ThreadSafe; -import org.apache.cocoon.ProcessingException; -import org.apache.cocoon.components.source.SourceUtil; -import org.apache.cocoon.template.environment.ParsingContext; -import org.apache.cocoon.template.expression.StringTemplateParser; -import org.apache.cocoon.template.script.event.StartDocument;  import org.apache.excalibur.source.Source;  import org.apache.excalibur.source.SourceException;  import org.apache.excalibur.source.SourceResolver;  import org.apache.excalibur.source.SourceValidity;  import org.apache.excalibur.store.Store; +  import org.xml.sax.Locator;  import org.xml.sax.SAXParseException;  /** - * @version $Id: DefaultScriptManager.java 449189 2006-09-23 06:52:29Z crossley $ + * @version $Id: DefaultScriptManager.java 524153 2007-03-30 16:13:22Z vgritsenko $   */ -public class DefaultScriptManager - extends AbstractLogEnabled - implements Serviceable, Disposable, ScriptManager, ThreadSafe { +public class DefaultScriptManager extends AbstractLogEnabled + implements Serviceable, Disposable, ScriptManager, + ThreadSafe { + + private static final String JX_STORE_PREFIX = "jxtg:"; + + private String stringTemplateParserName;      private ServiceManager manager; - private final static String JX_STORE_PREFIX = "jxtg:";      private Store store;      private InstructionFactory instructionFactory; - private ServiceSelector stringTemplateParserSelector;      private StringTemplateParser stringTemplateParser; - private String stringTemplateParserName = "jxtg";      public DefaultScriptManager() { + stringTemplateParserName = "jxtg";      }      /** @@ -59,27 +63,23 @@       */      public void service(ServiceManager manager) throws ServiceException {          this.manager = manager; - this.store = (Store) this.manager.lookup(Store.TRANSIENT_STORE); - this.instructionFactory = (InstructionFactory) this.manager.lookup(InstructionFactory.ROLE); - this.stringTemplateParserSelector = (ServiceSelector) this.manager.lookup(StringTemplateParser.ROLE - + "Selector"); - this.stringTemplateParser = (StringTemplateParser) this.stringTemplateParserSelector - .select(this.stringTemplateParserName); + this.store = (Store) manager.lookup(Store.TRANSIENT_STORE); + this.instructionFactory = (InstructionFactory) manager.lookup(InstructionFactory.ROLE); + this.stringTemplateParser = (StringTemplateParser) + manager.lookup(StringTemplateParser.ROLE + "/" + stringTemplateParserName);      }      /**       * @see org.apache.avalon.framework.activity.Disposable#dispose()       */      public void dispose() { - if ( this.manager != null ) { + if (stringTemplateParser != null) { + manager.release(stringTemplateParser); + stringTemplateParser = null; + } + if (this.manager != null) {              this.manager.release(this.store);              this.manager.release(this.instructionFactory); - if ( this.stringTemplateParserSelector != null ) { - this.stringTemplateParserSelector.release(this.stringTemplateParser); - this.manager.release(this.stringTemplateParserSelector); - this.stringTemplateParserSelector = null; - this.stringTemplateParser = null; - }              this.store = null;              this.instructionFactory = null;              this.manager = null; @@ -142,14 +142,19 @@              }          } catch (SourceException se) {              throw SourceUtil.handle("Error during resolving of '" + uri + "'.", se); - } catch (Exception exc) { - throw new SAXParseException(exc.getMessage(), location, exc); + } catch (ProcessingException e) { + throw ProcessingException.throwLocated(null, e, LocationUtils.getLocation(location)); + } catch (Exception e) { + throw new SAXParseException(e.getMessage(), location, e);          } finally { - if (input != null) + if (input != null) {                  resolver.release(input); - if (resolver != null) + } + if (resolver != null) {                  manager.release(resolver); + }          } +          return doc;      } -} [then it is a missing license file and so on] I'm not sure how snapshots are produced but it's most probably a script that invokes svn up and something got wrong so some directories are *not* up to date. Hope that helps.
        Hide
        Carsten Ziegeler added a comment -
        yes, I guess all directories were we used svn:externals in the past - so, we have to find out how these snapshots are generated, delete the checkout dir and then it should work
        Show
        Carsten Ziegeler added a comment - yes, I guess all directories were we used svn:externals in the past - so, we have to find out how these snapshots are generated, delete the checkout dir and then it should work
        Hide
        Francesco Chicchiriccò added a comment -
        C2.2 SNAPSHOTS just deployed on Nexus via Maven
        Show
        Francesco Chicchiriccò added a comment - C2.2 SNAPSHOTS just deployed on Nexus via Maven

          People

          • Assignee:
            Francesco Chicchiriccò
            Reporter:
            Grzegorz Kossakowski
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development