You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by bu...@apache.org on 2003/10/01 07:01:26 UTC

DO NOT REPLY [Bug 23536] New: - Addition to 23269 bug (JSP compilation fail) in Cocoon

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23536>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23536

Addition to 23269 bug (JSP compilation fail) in Cocoon

           Summary: Addition to 23269 bug (JSP compilation fail) in Cocoon
           Product: Cocoon 2
           Version: 2.1.1
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: general components
        AssignedTo: dev@cocoon.apache.org
        ReportedBy: paveln@imail.dc.ukrtelecom.net


The problem is same bug 23269, but I have some addition fact to that bug.
This problem occures only when Tomcat installed to path with spaces
(e.g. C:\Program Files\...).
In log I see, what javac.exe incorrectly understood
the absolute path to servlet generated from jsp page:
2001-09-30 20:37:44 Error compiling file: D:\Tom 
cat\work\Standalone\localhost\cocoon\samples\jsp\/welcome_jsp.java     [javac] 
Compiling 1 source file
    [javac] javac: invalid flag: D:\Tom
    [javac] Usage: javac <options> <source files>
    [javac] where possible options include:
    [javac]   -g                        Generate all debugging info
...................................
But without Cocoon all ok!

If Tomcat installed to path without spaces - C:\Tomcat\.., for example, all ok.

I partially analyzed source code of Tomcat 4.1.27 (last stable, not beta)
and Cocoon and found next:
in file org\apache\jasper\compiler\Compiler.java lines 317 .. 323:
            if (ctxt.getOptions().getFork()) {
                javac.execute();
            } else {
                synchronized(javacLock) {
                    javac.execute();
                }
            }

In Cocoon the fork parameter setting ingnores, and always run block without
'synchronized'.
Then I commented fork analyze:
        javac.setFork( false );
         .....................

                synchronized(javacLock) {
                    javac.execute();
                }

Rebuild jasper, install it, run - all Ok, without spaces in path and with them.

I tryed to correct Cocoon 2.1.1 - in file 
org\apache\cocoon\components\jsp\JSPEngineImpl.java
write next:
      synchronized ( lockObject )
       {
         jsp.service ( request, response );        // fail here!
       }
- No effect.

Is this Jasper problem, or Cocoon, or Ant?

In Tomcat 4.0.4, which not use Ant for compilation, I don't
detect this error. But my application requires Tomcat 4.1.27.