This is a known problem in some versions of Tomcat, due to a known
problem in some versions of ANT, due to a known problem with
command-line length on windows.

It relates to the path length that is used by ANT when compiling your
JSP.

If the path is longer than the max, then the initial '"' is there but
the final one is chopped. So if you have spaces in the path it will fail
as you say.  We hit this bug too.

My guess is you are using 4.1.24? (maybe 21/27 too, but it broke in 24
for me).  Try 4.1.29 - that seems better (embeds a newer version of
ANT), although I think theoretically its not entirely fixed. (I think
they put quotes around each element, but that could still mean the path
is chopped.  Not sure on this though.)

Your other apps worked because the their paths (e.g. package names) are
shorter, or they depend on fewer 3rd party JARs.


Hope this helps.

        Kev
 

> -----Original Message-----
> From: Claire Wall [mailto:[EMAIL PROTECTED] 
> Sent: 15 January 2004 12:53
> To: Struts Users Mailing List
> Subject: Re: Tomcat error with compiling JSPs
> 
> i see what you're saying, but I've got about 6 applications 
> running on Tomcat on this server and they all work fine with 
> no problems. This is the first time that this has occured so 
> I'd really like to understand what could be causing this to 
> happen. I'm assuming that it can't be anything coded into my 
> servlets/classes as these are already complied and shouldn't 
> be compiled by Tomcat when it's run, should they? I am using 
> the getRealPath() method in my servlets but this is also true 
> of my other applications. i cannot change the path of Tomcat 
> because this application may well need to be installed on a 
> server where we can't dictate the install path of Tomcat so 
> this is not a solution.
> 
> 
> 
> ----- Original Message -----
> From: "McCormack, Chris" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, January 15, 2004 12:11 PM
> Subject: RE: Tomcat error with compiling JSPs
> 
> 
> >    [javac] javac: invalid flag: C:\Program
> >    [javac] Usage: javac
> --
> 
> Try putting your tomcat install to c:\tomcat
> 
> -----Original Message-----
> From: Claire Wall [mailto:
> Sent: 15 January 2004 12:07
> To: Struts Users Mailing List
> Subject: Tomcat error with compiling JSPs
> 
> 
> hi,
> 
> I am trying to install my application on another server 
> (Tomcat 4.1). I have built a WAR file from an ANT build file 
> but when I install it on Tomcat and try to access it I get 
> the following error:
> 
> 
> HTTP Status 500 -
> 
> --------------------------------------------------------------
> --------------
> ----
> 
> type Exception report
> 
> message
> 
> description The server encountered an internal error () that 
> prevented it from fulfilling this request.
> 
> exception
> 
> 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
> 
> 
> 
> 
>  at
> org.apache.jasper.compiler.DefaultErrorHandler.javacError(Defa
> ultErrorHandle
> r.java:130)
>  at
> org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDis
> patcher.java:2
> 93)
>  at 
> org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353)
>  at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
>  at
> org.apache.jasper.JspCompilationContext.compile(JspCompilation
> Context.java:4
> 73)
>  at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServlet
> Wrapper.java:1
> 90)
>  at 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet
> .java:295)
>  at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>  at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
> er(Application
> FilterChain.java:247)
>  at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
> cationFilterCh
> ain.java:193)
>  at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
> rapperValve.ja
> va:256)
>  at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invok
> eNext(StandardPipeline.java:643)
>  at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:480)
>  at 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>  at
> org.apache.catalina.core.StandardContextValve.invoke(StandardC
> ontextValve.ja
> va:191)
>  at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invok
> eNext(StandardPipeline.java:643)
>  at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:480)
>  at 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>  at
> org.apache.catalina.core.StandardContext.invoke(StandardContex
> t.java:2415)
>  at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHost
> Valve.java:180
> )
>  at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invok
> eNext(StandardPipeline.java:643)
>  at
> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDi
> spatcherValve.
> java:171)
>  at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invok
> eNext(StandardPipeline.java:641)
>  at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport
> Valve.java:172
> )
>  at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invok
> eNext(StandardPipeline.java:641)
>  at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:480)
>  at 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>  at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEn
> gineValve.java
> :174)
>  at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invok
> eNext(StandardPipeline.java:643)
>  at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:480)
>  at 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>  at 
> org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.
> java:223)
>  at
> org.apache.coyote.http11.Http11Processor.process(Http11Process
> or.java:594)
>  at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandle
> r.processConne
> ction(Http11Protocol.java:392)
>  at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoi
> nt.java:565)
>  at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
> ThreadPool.jav
> a:619)
>  at java.lang.Thread.run(Thread.java:534)
> 
> 
> I have done this process many times before using the exact 
> same ANT file as I always do but cannot figure out for the 
> life of me why it won't work. Also to note that I've 
> installed another application today which worked fine without 
> these errors. Does anybody know what could be causing this? 
> My JSP does not contain any references to the local directory 
> and is the exact same page that I use in my other application.
> 
> Is this error caused by a fault in the ANT file?
> 
> any help would be really appreciated as i'm stumped!!
> 
> claire :)
> 
> ***********************************************
> This e-mail and its attachments are confidential and are 
> intended for the above named recipient only. If this has come 
> to you in error, please notify the sender immediately and 
> delete this e-mail from your system.
> You must take no action based on this, nor must you copy or 
> disclose it or any part of its contents to any person or organisation.
> Statements and opinions contained in this email may not 
> necessarily represent those of Littlewoods.
> Please note that e-mail communications may be monitored.
> The registered office of Littlewoods Limited and its 
> subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB.
> Registered number of Littlewoods Limited is 262152.
> ************************************************
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to