Bug 18595 - Jasper Compile error for paths with spaces in them
Summary: Jasper Compile error for paths with spaces in them
Status: RESOLVED WORKSFORME
Alias: None
Product: Tomcat 4
Classification: Unclassified
Component: Jasper 2 (show other bugs)
Version: 4.1.24
Hardware: PC All
: P3 critical (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-02 04:23 UTC by Steve Vanspall
Modified: 2005-03-20 17:06 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Vanspall 2003-04-02 04:23:35 UTC
It seems Tomcat 4.1.19 up has a problem with paths that have spaces in them

My tomcat directory is under Program File/Apache Group/Tomcat 4.1

I get the following error when I try to load a JSP

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: -1 in the jsp file: null

Generated servlet error:
    [javac] Since fork is true, ignoring compiler setting.
    [javac] Compiling 1 source file
    [javac] Since fork is true, ignoring compiler setting.
    [javac] javac: invalid flag: C:\Program
    [javac] Usage: javac  
    [javac] where possible options include:
    [javac]   -g                        Generate all debugging info
    [javac]   -g:none                   Generate no debugging info
    [javac]   -g:{lines,vars,source}    Generate only some debugging info
    [javac]   -nowarn                   Generate no warnings
    [javac]   -verbose                  Output messages about what the compiler 
is doing
    [javac]   -deprecation              Output source locations where 
deprecated APIs are used
    [javac]   -classpath          Specify where to find user class files
    [javac]   -sourcepath         Specify where to find input source files
    [javac]   -bootclasspath      Override location of bootstrap class files
    [javac]   -extdirs            Override location of installed extensions
    [javac]   -d             Specify where to place generated class files
    [javac]   -encoding       Specify character encoding used by source files
    [javac]   -source          Provide source compatibility with specified 
release
    [javac]   -target          Generate class files for specific VM version
    [javac]   -help                     Print a synopsis of standard options


I reported a similar bug with 4.1.19

I am using 4.1.24LE for JDK 1.4 and JDK 1.4 (obviously)


Regards

Steve
Comment 1 Remy Maucherat 2003-04-02 07:10:15 UTC
This clearly works fine for me (installer to default location, open the welcome
page and JSP examples). You need to add info to reproduce (but you won't be able
to).
Comment 2 Joe Boon 2003-06-03 14:36:44 UTC
I have experienced this and have tracked it down to a problem in Ant. It is 
triggered by (a) a long javac command line, usually caused by long paths to a 
lib directory with lots of jars in it, combined with (b) spaces in the path to 
the Tomcat directory (more specifically to the work directory within the 
Tomcat directory).

The problem is documented in Ant bug 10499.
Comment 3 Remy Maucherat 2003-06-03 14:53:26 UTC
A duplicate was filed since; a (reported) possible workaround is to set the
"fork" init-param of the Jasper servlet to "false".
Comment 4 Antoine Levy-Lambert 2003-06-04 06:27:41 UTC
Hi Tomcat developers,
the next ant nightly build (http://cvs.apache.org/builds/ant/nightly/2003-06-04) 
contains a fix for the bug 10499
see http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10499 
This might solve this issue too.
Individual users might want to patch their ant.jar or replace it with the one of 
the nightly build if they are affected by this problem.