Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 96225 invoked from network); 13 Oct 2006 19:48:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 13 Oct 2006 19:48:28 -0000 Received: (qmail 34012 invoked by uid 500); 13 Oct 2006 19:48:23 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 33479 invoked by uid 500); 13 Oct 2006 19:48:21 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 33465 invoked by uid 99); 13 Oct 2006 19:48:21 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Oct 2006 12:48:21 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Oct 2006 12:48:20 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 12A647142F7 for ; Fri, 13 Oct 2006 12:47:36 -0700 (PDT) Message-ID: <9968889.1160768856073.JavaMail.jira@brutus> Date: Fri, 13 Oct 2006 12:47:36 -0700 (PDT) From: "Carsten Ziegeler (JIRA)" To: dev@cocoon.apache.org Subject: [jira] Commented: (COCOON-1933) [Patch] Automatic loading of flow scripts in "flow/" must not load directories In-Reply-To: <2488336.1160659054939.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/COCOON-1933?page=comments#action_12442085 ] Carsten Ziegeler commented on COCOON-1933: ------------------------------------------ I think this wouldn't help us in this case as even the Excalibur source resolver can't tell if a resource is a directory or a file in the case of an unexpanded war. I checked in a fix yesterday which should solve most of the problems when running unexpanded, but the file/directory detection is still an issue. I guess we could use getFile() first and if that fails use getInputStream() for testing? > [Patch] Automatic loading of flow scripts in "flow/" must not load directories > ------------------------------------------------------------------------------ > > Key: COCOON-1933 > URL: http://issues.apache.org/jira/browse/COCOON-1933 > Project: Cocoon > Issue Type: Bug > Components: * Cocoon Core > Affects Versions: 2.2-dev (Current SVN) > Reporter: Alexander Klimetschek > Attachments: cocoon-flow-only-files.patch > > > The automatic loading of everything inside flow/ also tries to load directories, which cannot be compiled like files. Happens typically when you have a subversion directory (.svn) or other version-control directory inside. > The stacktrace for the problem: > Caused by: org.apache.excalibur.source.SourceNotFoundException: file:/Users/alex/Mindquarry/hack/mindquarry-teamspace-web/mindquarry-teamspace-block/src/main/resources/COB-INF/flow/.svn/ doesn't exist. > at org.apache.excalibur.source.impl.FileSource.getInputStream(FileSource.java:150) > at org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.compileScript(FOM_JavaScriptInterpreter.java:502) > at org.apache.cocoon.components.flow.CompilingInterpreter$ScriptSourceEntry.getScript(CompilingInterpreter.java:112) > at org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.setupContext(FOM_JavaScriptInterpreter.java:453) > at org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.callFunction(FOM_JavaScriptInterpreter.java:572) > at org.apache.cocoon.components.treeprocessor.sitemap.CallFunctionNode.invoke(CallFunctionNode.java:109) > ... 43 more > Caused by: java.io.FileNotFoundException: /Users/alex/Mindquarry/hack/mindquarry-teamspace-web/mindquarry-teamspace-block/src/main/resources/COB-INF/flow/.svn (No such file or directory) > at java.io.FileInputStream.open(Native Method) > at java.io.FileInputStream.(FileInputStream.java:106) > at org.apache.excalibur.source.impl.FileSource.getInputStream(FileSource.java:146) > ... 48 more -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira