Simple JSP fails!!!

K

kai

Hey guys, I got something strange going on here.

I am working in a cross platform enviroment. 2 identical servers.
One Windows, One Unix.

We test on the Windows box, and then upload to the Unix box. Both
have identical files.

Starting yesterday, whenever I upload a file to the Linux box, I get a
500 error (see below). The JSPs work fine on the Windows box, but
break on the Unix box. I tried uploading a simple "Hello World" JSP
to the Unix box, and the JSP failed with the same error as before.

The strange thing is, I can take a JSP that is working fine on the
Unix box, download it, and re-upload it, and it fails. Same exact
JSP. No changes.

Any help or suggestions are greatly appreciated. Thanks!!!

exception

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

org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:
97)

org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java(Inlined
Compiled Code))

org.apache.jasper.compiler.Compiler.generateClass(Compiler.java(Compiled
Code))
org.apache.jasper.compiler.Compiler.compile(Compiler.java:497)
org.apache.jasper.compiler.Compiler.compile(Compiler.java(Inlined
Compiled Code))
org.apache.jasper.compiler.Compiler.compile(Compiler.java(Inlined
Compiled Code))

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java(Compiled
Code))

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java(Compiled
Code))

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java(Compiled
Code))
org.apache.jasper.servlet.JspServlet.service(JspServlet.java(Compiled
Code))
javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled
Code))

root cause

Compile failed; see the compiler error output for details.
org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:938)
org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:758)

org.apache.jasper.compiler.Compiler.generateClass(Compiler.java(Compiled
Code))
org.apache.jasper.compiler.Compiler.compile(Compiler.java:497)
org.apache.jasper.compiler.Compiler.compile(Compiler.java(Inlined
Compiled Code))
org.apache.jasper.compiler.Compiler.compile(Compiler.java(Inlined
Compiled Code))

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java(Compiled
Code))

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java(Compiled
Code))

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java(Compiled
Code))
org.apache.jasper.servlet.JspServlet.service(JspServlet.java(Compiled
Code))
javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled
Code))
 
M

Manish Pandit

Hey guys, I got something strange going on here.

I am working in a cross platform enviroment. 2 identical servers.
One Windows, One Unix.

We test on the Windows box, and then upload to the Unix box. Both
have identical files.

Starting yesterday, whenever I upload a file to the Linux box, I get a
500 error (see below). The JSPs work fine on the Windows box, but
break on the Unix box. I tried uploading a simple "Hello World" JSP
to the Unix box, and the JSP failed with the same error as before.

The strange thing is, I can take a JSP that is working fine on the
Unix box, download it, and re-upload it, and it fails. Same exact
JSP. No changes.

Any help or suggestions are greatly appreciated. Thanks!!!

exception

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

org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:
97)

org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java(Inlined
Compiled Code))

org.apache.jasper.compiler.Compiler.generateClass(Compiler.java(Compiled
Code))
org.apache.jasper.compiler.Compiler.compile(Compiler.java:497)
org.apache.jasper.compiler.Compiler.compile(Compiler.java(Inlined
Compiled Code))
org.apache.jasper.compiler.Compiler.compile(Compiler.java(Inlined
Compiled Code))

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java(Compiled
Code))

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java(Compiled
Code))

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java(Compiled
Code))
org.apache.jasper.servlet.JspServlet.service(JspServlet.java(Compiled
Code))
javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled
Code))

root cause

Compile failed; see the compiler error output for details.
org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:938)
org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:758)

org.apache.jasper.compiler.Compiler.generateClass(Compiler.java(Compiled
Code))
org.apache.jasper.compiler.Compiler.compile(Compiler.java:497)
org.apache.jasper.compiler.Compiler.compile(Compiler.java(Inlined
Compiled Code))
org.apache.jasper.compiler.Compiler.compile(Compiler.java(Inlined
Compiled Code))

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java(Compiled
Code))

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java(Compiled
Code))

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java(Compiled
Code))
org.apache.jasper.servlet.JspServlet.service(JspServlet.java(Compiled
Code))
javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled
Code))

Do you have the compiler output log? That should state the reason for
compilation failure - if you could paste it here, it'd be great. It
might (a huge might..till we see the compiler log) be the encoding of
the files when you xfer them from one box to another. Just wondering -
why do not you use ant's tomcat task to deploy remotely on both boxes?
That way you can have 1 identical war on both instead of individual
JSPs.

-cheers,
Manish

-cheers,
Manish
 
K

kai

Do you have the compiler output log? That should state the reason for
compilation failure - if you could paste it here, it'd be great. It
might (a huge might..till we see the compiler log) be the encoding of
the files when you xfer them from one box to another. Just wondering -
why do not you use ant's tomcat task to deploy remotely on both boxes?
That way you can have 1 identical war on both instead of individual
JSPs.

-cheers,
Manish

-cheers,
Manish

I am fairly new to the Unix enviroment. I have been able to find the
Apache logs, but am thus far unable to find the complier output log.
Any suggestions as to where I could find it in a normal instal?

The Apache log says this:

2007-08-08 18:14:09 StandardWrapperValve[jsp]: Servlet.service() for
servlet jsp threw exception
Compile failed; see the compiler error output for details.
at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:938)
at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:758)
at
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java(Compiled
Code))
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:
497)
at
org.apache.jasper.compiler.Compiler.compile(Compiler.java(Inlined
Compiled Code))
at
org.apache.jasper.compiler.Compiler.compile(Compiler.java(Inlined
Compiled Code))
at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java(Compiled
Code))
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java(Compiled
Code))
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java(Compiled
Code))
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java(Compiled
Code))
at
javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled
Code))
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java(Compiled
Code))
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java(Compiled
Code))
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java(Compiled
Code))
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java(Compiled
Code))
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compiled
Code))
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java(Compiled
Code))
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java(Compiled
Code))
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java(Compiled
Code))
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compiled
Code))
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java(Compiled
Code))
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java(Compiled
Code))
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java(Compiled
Code))
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java(Compiled
Code))
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compiled
Code))
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java(Compiled
Code))
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java(Compiled
Code))
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compiled
Code))
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled
Code))
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java(Compiled
Code))
at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java(Compiled
Code))
at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java(Compiled
Code))
at
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java(Compiled
Code))
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java(Compiled
Code))
at
org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java(Compiled
Code))
at org.apache.tomcat.util.threads.ThreadPool
$ControlRunnable.run(ThreadPool.java(Compiled Code))
at java.lang.Thread.run(Thread.java:570)
 
M

Manish Pandit

On Aug 8, 2:45 pm, (e-mail address removed) wrote:
Do you have the compiler output log? That should state the reason for
compilation failure - if you could paste it here, it'd be great. It
might (a huge might..till we see the compiler log) be the encoding of
the files when you xfer them from one box to another. Just wondering -
why do not you use ant's tomcat task to deploy remotely on both boxes?
That way you can have 1 identical war on both instead of individual
JSPs.

-cheers,
Manish

I am fairly new to the Unix enviroment. I have been able to find the
Apache logs, but am thus far unable to find the complier output log.
Any suggestions as to where I could find it in a normal instal?

The Apache log says this:

2007-08-08 18:14:09 StandardWrapperValve[jsp]: Servlet.service() for
servlet jsp threw exception
Compile failed; see the compiler error output for details.
at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:938)
at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:758)
at
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java(Compiled
Code))
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:
497)
at
org.apache.jasper.compiler.Compiler.compile(Compiler.java(Inlined
Compiled Code))
at
org.apache.jasper.compiler.Compiler.compile(Compiler.java(Inlined
Compiled Code))
at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java(­Compiled
Code))
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java(­Compiled
Code))
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java(Compile­d
Code))
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java(Compiled
Code))
at
javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled
Code))
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio­nFilterChain.java(Compiled
Code))
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC­hain.java(Compiled
Code))
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve..j­ava(Compiled
Code))
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte­xt.java(Compiled
Code))
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Comp­iled
Code))
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContex­tValve.java(Compiled
Code))
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve..j­ava(Compiled
Code))
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte­xt.java(Compiled
Code))
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Comp­iled
Code))
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java(Co­mpiled
Code))
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte­xt.java(Compiled
Code))
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java(Co­mpiled
Code))
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte­xt.java(Compiled
Code))
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Comp­iled
Code))
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.jav­a(Compiled
Code))
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte­xt.java(Compiled
Code))
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Comp­iled
Code))
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled
Code))
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java(Compiled
Code))
at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java(Compiled
Code))
at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java(Compiled
Code))
at
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java(Compiled
Code))
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java(Com­piled
Code))
at
org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java(Compiled
Code))
at org.apache.tomcat.util.threads.ThreadPool
$ControlRunnable.run(ThreadPool.java(Compiled Code))
at java.lang.Thread.run(Thread.java:570)- Hide quoted text -

- Show quoted text -

Normally the compiler output is a part of console output, just like it
spews out deprecation warnings. I ran ant just now to verify, and was
able to see 'cannot find symbol' kind of compile-time errors right
there on the console.

This just struck me (as you mentioned it strated messing up from
yesterday) - Can you check your Linux box to see if it is not full?

$ df

df should give you the usage - if available is 0 or used is 100%, that
is what the problem could be.

-cheers,
Manish
 
S

Sabine Dinis Blochberger

Hey guys, I got something strange going on here.

I am working in a cross platform enviroment. 2 identical servers.
One Windows, One Unix.

We test on the Windows box, and then upload to the Unix box. Both
have identical files.

Starting yesterday, whenever I upload a file to the Linux box, I get a
500 error (see below). The JSPs work fine on the Windows box, but
break on the Unix box. I tried uploading a simple "Hello World" JSP
to the Unix box, and the JSP failed with the same error as before.

The strange thing is, I can take a JSP that is working fine on the
Unix box, download it, and re-upload it, and it fails. Same exact
JSP. No changes.

Any help or suggestions are greatly appreciated. Thanks!!!

Could it be the good ole CR/LF problem between DOS - *NIX? Try running
the jsp through dos2unix or similar tool.
 
N

Nigel Wade

I am fairly new to the Unix enviroment. I have been able to find the
Apache logs, but am thus far unable to find the complier output log.
Any suggestions as to where I could find it in a normal instal?

You need to determine where your Tomcat keeps its log files. That will depend on
how your Tomcat installation was performed. Was it a package which came as part
of the Linux distro you are using? The location of the log files might be a
configuration option during the Tomcat setup.

One place you might look is /var/log. That is the most common place for daemons
to store their log files. See if there is anything illuminating in there, such
as a Tomcat or Catalina log file, or a directory containing logfiles.
 
L

Lew

Nigel said:
You need to determine where your Tomcat keeps its log files. That will depend on
how your Tomcat installation was performed. Was it a package which came as part
of the Linux distro you are using? The location of the log files might be a
configuration option during the Tomcat setup.

One place you might look is /var/log. That is the most common place for daemons
to store their log files. See if there is anything illuminating in there, such
as a Tomcat or Catalina log file, or a directory containing logfiles.

On my Linux box the Tomcat logs are in ${CATALINA_HOME}/logs/.
 
N

Nigel Wade

Lew said:
On my Linux box the Tomcat logs are in ${CATALINA_HOME}/logs/.

That presupposes you know the value of CATALINA_HOME.

Unless you are actually logged in as the tomcat user that env. variable is
probably not set. The OP might not know where on their system its value could
be obtained from.
 
K

kai

I did a search for CATILINA_HOME on the Unix box.

echo $CATALINA_HOME turns up nothing. Does that mean that
CATALINA_HOME somehow became deleted?
 
R

Roedy Green

I am working in a cross platform enviroment. 2 identical servers.
One Windows, One Unix.
Have you run any minimal test JSP on both servers yet? You may have
a general config error, nothing to do with your particular servlet.
 
M

Manish Pandit

I did a search for CATILINA_HOME on the Unix box.

echo $CATALINA_HOME turns up nothing. Does that mean that
CATALINA_HOME somehow became deleted?

It is not deleted, it is just not set. The logs (assuming its linux)
should be in /var/log/tomcat5. However, the log will pretty much have
what you see in the console anyway.

Did you get a chance to check for the free space left on the drive?

-cheers,
Manish
 
K

kai

Manish - Sorry I forgot to mention that, yes, I checked the
freespace. I am at 34% used, so I don't think that is the problem.

I did try a test JSP. A simple "Hello World" test. It too failed
with the same error.

I have went ahead and set the CATALINA_HOME using the "export"
command, and echo $CATALINA_HOME now returns : /opt/jakarta/jakarta-
tomcat-5.0.28

It did not fix the problem, however I have not restarted Tomcat out of
fear of breaking all my already compiled JSPs. Is a restart of Tomcat
necessary after setting cat_home???

Thanks for the help guys!
 
K

kai

Manish - Sorry I forgot to mention that, yes, I checked the
freespace. I am at 34% used, so I don't think that is the problem.

I did try a test JSP. A simple "Hello World" test. It too failed
with the same error.

I have went ahead and set the CATALINA_HOME using the "export"
command, and echo $CATALINA_HOME now returns : /opt/jakarta/jakarta-
tomcat-5.0.28

It did not fix the problem, however I have not restarted Tomcat out of
fear of breaking all my already compiled JSPs. Is a restart of Tomcat
necessary after setting cat_home???

Thanks for the help guys!
 
L

Lew

Manish - Sorry I forgot to mention that, yes, I checked the
freespace. I am at 34% used, so I don't think that is the problem.

I did try a test JSP. A simple "Hello World" test. It too failed
with the same error.

I have went ahead and set the CATALINA_HOME using the "export"
command, and echo $CATALINA_HOME now returns : /opt/jakarta/jakarta-
tomcat-5.0.28

It did not fix the problem, however I have not restarted Tomcat out of
fear of breaking all my already compiled JSPs. Is a restart of Tomcat
necessary after setting cat_home [sic] ???

You only need one question mark to indicate a question.

Setting CATALINA_HOME has nothing to do with fixing your problem. Knowing
where Tomcat is installed has everything to do with locating the log files.

My Tomcat places its log files in a subdirectory of its own installation
directory, not in /var/log/anywhere. Yours might also.

By convention one refers to the installation location as $CATALINA_HOME, on
the assumption that someone doing maintenance on Tomcat (such as looking to
the log files) would know where their installation is and that the speaker
doesn't. You're supposed to translate that envar reference to the appropriate
installation location at your server. There was no advice to go setting that
variable.

If you don't even know where Tomcat is, you'll have serious difficulties
trying to fix your problem.

Again, Tomcat writes log files to its own logs/ subdirectory, not necessarily
to /var/log/.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,150
Members
46,696
Latest member
BarbraOLog

Latest Threads

Top