[
https://issues.apache.org/jira/browse/COCOON-2105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12517754
]
Grzegorz Kossakowski commented on COCOON-2105:
----------------------------------------------
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:
[EMAIL PROTECTED]:~/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.
> Cocoon's snapshots archives are broken
> --------------------------------------
>
> Key: COCOON-2105
> URL: https://issues.apache.org/jira/browse/COCOON-2105
> Project: Cocoon
> Issue Type: Bug
> Components: * Cocoon Core
> Affects Versions: 2.1.11-dev (Current SVN), 2.2-dev (Current SVN)
> Reporter: Grzegorz Kossakowski
> Priority: Critical
>
> 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*.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.