Solved

JasperException in netbanes n tomcat

Posted on 2009-07-15
24
542 Views
Last Modified: 2013-12-14
Hi all,
 i'm developing one struts application and uing Netbeans 6.1.
when i run the application i'm getting below error some times. som times its working.
what could be the problem? can any one help me out..

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

An error occurred at line: 22 in the generated java file
The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory

Stacktrace:
      org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
      org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
      org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:423)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:316)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:294)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:281)
      org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)

0
Comment
Question by:websyn
  • 13
  • 9
  • 2
24 Comments
 
LVL 92

Expert Comment

by:objects
ID: 24866389
check you don't have any javaee jars in your project, they will conflict with tomcats classes
0
 

Author Comment

by:websyn
ID: 24866710
i did not get you, could you please explain me more clear since i'm new to java
0
 
LVL 92

Expert Comment

by:objects
ID: 24866717
what jars are currently in your projects build path?
0
 

Author Comment

by:websyn
ID: 24866836
there are sevral files ,   activation.jar
commons-beanutils.jar
commons-collections.jar
commons-dbcp-1.2.1.jar
commons-digester.jar
commons-fileupload.jar
commons-lang.jar
commons-logging.jar
commons-validator.jar
cos.jar
jakarta-oro.jar
junit.jar
log4j-1.2.6.jar
mail.jar
ojdbc14.jar
struts.jar
unittest.jar
jxl-2.6.jar....
0
 
LVL 92

Expert Comment

by:objects
ID: 24866857
they all look ok, is that the lot?
0
 

Author Comment

by:websyn
ID: 24866868
then what could be the problem?
0
 
LVL 27

Expert Comment

by:rrz
ID: 24875374
>The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory  
Since the method getJspApplicationContext is new in  JavaServer Pages 2.1 , you must use Tomcat 6  
In NetBeans  go to Tools | Servers   and   add or select Tomcat 6
0
 

Author Comment

by:websyn
ID: 24876228
i'm using TOMCAT 6.0.16, its already set to to that version
0
 
LVL 27

Expert Comment

by:rrz
ID: 24880852
Maybe objects had the right idea. What jars are in your web app's /WEB-INF/lib   folder  ? Is there just one  jsp-api.jar in Tomcat's  lib folder ?  
0
 

Author Comment

by:websyn
ID: 25352235
priblem  solved
0
 
LVL 92

Expert Comment

by:objects
ID: 25352320
what was the problem?
0
 

Author Comment

by:websyn
ID: 25352343
dont know exactly but i cleared memoery and uninstall n installed the netbeans and created new project and copied src file to that project solved the problem
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 92

Expert Comment

by:objects
ID: 25352376
which would have reloaded the required jars
0
 

Author Comment

by:websyn
ID: 25354389
If i add any new lib to app again i'm getting this err.
so can u tell me how to add lib to web app in Netbeans 6.1.
0
 
LVL 92

Expert Comment

by:objects
ID: 25354399
how and what are you adding?
0
 

Author Comment

by:websyn
ID: 25354411
going to properties -> Select Libraries -> Add JAR/Folder and adding the jar file.
for example i need to add commons-fileupload-1.2.1.jar file. when i add this jar and run the application again i'm getting the error
0
 

Author Comment

by:websyn
ID: 25362481
objects, can u plz help me
0
 

Author Comment

by:websyn
ID: 25362482
objects, can u plz help me
0
 
LVL 92

Expert Comment

by:objects
ID: 25362556
I don't actually use NetBeans but will do my best

> going to properties -> Select Libraries -> Add JAR/Folder and adding the jar file.

properties of what exactly?
0
 

Author Comment

by:websyn
ID: 25362577
Properties of project
0
 
LVL 92

Expert Comment

by:objects
ID: 25362796
Does the jar appear in the Libraries folder of your project
0
 

Author Comment

by:websyn
ID: 25362802
s, its apperaing.
0
 
LVL 92

Accepted Solution

by:
objects earned 500 total points
ID: 25362970
how are you running it on tomcat?
0
 

Author Closing Comment

by:websyn
ID: 31604096
no comments
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now