• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

jasper Exception: unable to compile JSP

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I have a simple Jsp page and Iam using sunone server . after I deploy my dynamic web application in sun one and try to access that simple jsp i am getting the

following Error. My jsp has just body sayiing this is my first Jsp...

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

Do I need to set any path for this??? And the Server is not in my local machine.

Any one please help me to solve this.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My guess would be that either not all required jar files are in the WEB-INF/lib directory, or that the JSP is missing an import statement. The complete error message (and stack trace) should mention what's going wrong.
 
hari vemulapalli
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the reply...
Here is the stacktrace
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
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:101)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:351)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:448)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:506)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:485)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:473)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:516)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:307)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:297)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:247)
javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)


root cause

Error running /usr/jdk/instances/jdk1.5.0/bin/javac compiler
org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter.executeExternalCompile(DefaultCompilerAdapter.java:473)
org.apache.tools.ant.taskdefs.compilers.JavacExternal.execute(JavacExternal.java:47)
org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:931)
org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:757)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:409)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:506)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:485)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:473)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:516)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:307)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:297)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:247)
javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)


note The full stack trace of the root cause is available in the Sun-Java-System/Application-Server logs.
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do other JSP pages work?
 
hari vemulapalli
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
None of the jsps are working. But if I change the file extention from jsp to html and deploy that it s working fine.
None of the jsps in my web application are working. i am using Eclipse editor. This is because of missing jar files I suppose as I am trying to access simple jsp that has <html> and <body> tags. previously it was working . suddenly it started giving this error.all the jar files are under project/Buildpath /configure buildpath/Libraries in Eclipse.
should we have any jars under web-inf/lib directory....
without having the jars under lib i could access my application previously.
please suggest me
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If no JSPs work then it's unlikely to be a matter of missing classes or jar files. The message sounds as if the servlet container is not set up correctly with a compiler (which it needs for running JSPs).

Is this a standalone Tomcat, or is it somehow integrated with Eclipse?
 
hari vemulapalli
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using Sun One Server and thats not running on my local machine.
 
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can it be an OS permissions issue as it is not able to invoke javac?
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic