Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp servlet sql server

 
muhammad akhtar
Greenhorn
Posts: 8
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have develop a project using netbeen 6.5 using MVC 2 arrchcitecture to access MS SQL server it is working fine in Netbeen all the options are working well but when i deploy it in tomcat server 6.0.18 it gives following error.

Wrapper cannot find servlet class controler or a class it depends on
org.apache.catalina.valves.ErrorreportValve.invoke(Error report Valve.java)

Root Cause

org.apache.catalone.loader.webappclassloader.loadclass(webappclassLoader.java1387))
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you post the full stack trace?
 
muhammad akhtar
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
dear friend i tried a lot of solution but all in vain

the full trace of the problem is following


type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Error instantiating servlet class controler
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:108)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:558)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:379)
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:281)
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:357)
org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1671)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
java.lang.Thread.run(Thread.java:619)
root cause
java.lang.ClassNotFoundException: controler
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1672)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1517)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:108)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:558)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:379)
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:281)
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:357)
org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1671)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
java.lang.Thread.run(Thread.java:619)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.4 logs.



i tried different versions of tomact from 5.5 to 7.0.29 but all of them is giveing the same error as mentioned above

please help me.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18276
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I read that correctly, you've made at least 2 fundamental mistakes in basic Java.

First, you named the class "controler", which violates the convention that all class names begin with an uppercase letter.

Secondly, you apparently didn't place this class in a package. That's not recommended in any event, but if my memory is correct, Tomcat has an especial objection to classes not being in a package (or more correctly, classes in the "default package").

I'm afraid that having an intelligent IDE can't do all the thinking for you. Some things just require proper training.
 
muhammad akhtar
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Friend


i have tried all the suggestion you have posted. but still the same problem.

therefore please help me.

Muhammad Akhtar
 
Paul Clapham
Sheriff
Posts: 21314
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It can't be the same problem. If you renamed the "controler" class to something else and put it in a package, you must be getting a different error message. So, let's see the stack trace you're getting now.
 
muhammad akhtar
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
dear friend

this time the following stack appears

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Wrapper cannot find servlet class Controller or a class it depends on
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:843)
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:679)
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1293)
java.lang.Thread.run(Thread.java:619)


root cause

java.lang.ClassNotFoundException: Controller
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1438)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1284)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:843)
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:679)
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1293)
java.lang.Thread.run(Thread.java:619)


note The full stack trace of the root cause is available in the Apache Tomcat/5.5.31 logs.


please help me to solve this problem
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13071
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. What package are all of your servlet related classes in?
2. What is the directory structure and were are the compile class files stored within this directory structure?
3. What is your web.xml entry for this application?

Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic