aspose file tools*
The moose likes Tomcat and the fly likes JSP + Servlet + Spring [Error] Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "JSP + Servlet + Spring [Error]" Watch "JSP + Servlet + Spring [Error]" New topic
Author

JSP + Servlet + Spring [Error]

Leonardo Carreira
Ranch Hand

Joined: Apr 07, 2009
Posts: 489

Hello Friends..

i found error when i try to building simple JSP + Servlet + Spring + Hibernate application..
the error generated by all files with .jsp extension..

here is the message error.. :

org.apache.jasper.JasperException: java.lang.ClassCastException: org.apache.catalina.util.DefaultAnnotationProcessor cannot be cast to org.apache.AnnotationProcessor
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:356)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


java.lang.ClassCastException: org.apache.catalina.util.DefaultAnnotationProcessor cannot be cast to org.apache.AnnotationProcessor
org.apache.jsp.index_jsp._jspInit(index_jsp.java:23)
org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:52)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:159)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


but if i try to access with another extension (*.html)... it could ran well..

Thanks in advance sir...


Sorry, perhaps my english language isn't too good.. Prepare for SCJP 6, Please God help me.. ☼
References : [Java.Boot] [JavaChamp] [JavaPrepare]
Leonardo Carreira
Ranch Hand

Joined: Apr 07, 2009
Posts: 489

is there anybody could give me a clarification?..

i don't know what a cause for that error..
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

From doing some Googling - it appears to be a problem with Tomcat and annotation processing. One of the solutions was to add <Loader delegate="true"/> to your context element in Tomcat's context.xml file -



-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Leonardo Carreira
Ranch Hand

Joined: Apr 07, 2009
Posts: 489

Thanks Sir..
it could ran well now..
 
jQuery in Action, 2nd edition
 
subject: JSP + Servlet + Spring [Error]