Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / August 2007

Tip: Looking for answers? Try searching our database.

Simple JSP fails!!!

Thread view: 
kai@icered.com - 08 Aug 2007 22:45 GMT
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))
Manish Pandit - 08 Aug 2007 23:06 GMT
On Aug 8, 2:45 pm, k...@icered.com wrote:
> Hey guys, I got something strange going on here.
>
[quoted text clipped - 72 lines]
>         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
kai@icered.com - 09 Aug 2007 00:49 GMT
> On Aug 8, 2:45 pm, k...@icered.com wrote:
>
[quoted text clipped - 88 lines]
> -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)
Manish Pandit - 09 Aug 2007 01:31 GMT
On Aug 8, 4:49 pm, k...@icered.com wrote:

> > On Aug 8, 2:45 pm, k...@icered.com wrote:
>
[quoted text clipped - 203 lines]
>
> - 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
Nigel Wade - 09 Aug 2007 12:33 GMT
> 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.

Signature

Nigel Wade, System Administrator, Space Plasma Physics Group,
           University of Leicester, Leicester, LE1 7RH, UK
E-mail :    nmw@ion.le.ac.uk
Phone :     +44 (0)116 2523548, Fax : +44 (0)116 2523555

Lew - 09 Aug 2007 13:34 GMT
kai@icered.com wrote:
>> 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
[quoted text clipped - 4 lines]
> 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/.

Signature

Lew

Nigel Wade - 09 Aug 2007 15:37 GMT
> kai@icered.com wrote:
>>> I am fairly new to the Unix enviroment.  I have been able to find the
[quoted text clipped - 11 lines]
>
> 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.

Signature

Nigel Wade, System Administrator, Space Plasma Physics Group,
           University of Leicester, Leicester, LE1 7RH, UK
E-mail :    nmw@ion.le.ac.uk
Phone :     +44 (0)116 2523548, Fax : +44 (0)116 2523555

kai@icered.com - 09 Aug 2007 18:22 GMT
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?
Manish Pandit - 09 Aug 2007 20:12 GMT
On Aug 9, 10:22 am, k...@icered.com wrote:
> 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
kai@icered.com - 09 Aug 2007 20:24 GMT
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!
Lew - 09 Aug 2007 22:17 GMT
> 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.
[quoted text clipped - 9 lines]
> 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/.

Signature

Lew

kai@icered.com - 09 Aug 2007 20:24 GMT
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!
Sabine Dinis Blochberger - 09 Aug 2007 12:02 GMT
> Hey guys, I got something strange going on here.
>
[quoted text clipped - 14 lines]
>
> 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.

Signature

Sabine Dinis Blochberger

Op3racional
www.op3racional.eu

Roedy Green - 09 Aug 2007 20:01 GMT
>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.
Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.