Results 1 to 5 of 5
  1. #1
    nil_p is offline Member
    Join Date
    Apr 2009
    Posts
    2
    Rep Power
    0

    Default need Servlet Help

    I am trying to run a servlet having database connection with mysql.
    The same code is working fine with java code.
    :) but when run as servlet it gives following error...
    Plz help
    its displaying following error..

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

    javax.servlet.ServletException: Error allocating a servlet instance
    org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:164)
    org.apache.coyote.tomcat5.CoyoteAdapter.service(Co yoteAdapter.java:209)
    org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:670)
    org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.processConnection(Http11Protocol.jav a:517)
    org.apache.tomcat.util.net.TcpWorkerThread.runIt(P oolTcpEndpoint.java:575)
    org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:666)
    java.lang.Thread.run(Thread.java:595)


    root cause

    java.lang.NoClassDefFoundError: com/stardeveloper/servlets/MySql1 (wrong name: MySql1)
    java.lang.ClassLoader.defineClass1(Native Method)
    java.lang.ClassLoader.defineClass(ClassLoader.java :620)
    java.security.SecureClassLoader.defineClass(Secure ClassLoader.java:124)
    org.apache.catalina.loader.WebappClassLoader.findC lassInternal(WebappClassLoader.java:1652)
    org.apache.catalina.loader.WebappClassLoader.findC lass(WebappClassLoader.java:883)
    org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1332)
    org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1212)
    org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:164)
    org.apache.coyote.tomcat5.CoyoteAdapter.service(Co yoteAdapter.java:209)
    org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:670)
    org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.processConnection(Http11Protocol.jav a:517)
    org.apache.tomcat.util.net.TcpWorkerThread.runIt(P oolTcpEndpoint.java:575)
    org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:666)
    java.lang.Thread.run(Thread.java:595)

  2. #2
    Preextenarf's Avatar
    Preextenarf is offline Member
    Join Date
    Apr 2009
    Location
    Turkey
    Posts
    1
    Rep Power
    0

    Default Game

    stumbleupon com/toolbar/#url=pollsiv ifrance com/phim-chi70/map html cooking yams
    stumbleupon com/toolbar/#url=pollsiv ifrance com/cac-bai-da/map html gay barbie
    stumbleupon com/toolbar/#url=citri ifrance com/download6d/map html europe today
    stumbleupon com/toolbar/#url=citri ifrance com/hi-res-me4/map html boxer dog breeders
    stumbleupon com/toolbar/#url=ewss ifrance com/gambar-fe3/map html news background
    stumbleupon com/toolbar/#url=ewss ifrance com/dreamsce69/map html lap sex
    stumbleupon com/toolbar/#url=citri ifrance com/resep-mi64/map html amanda berry
    stumbleupon com/toolbar/#url=pollsiv ifrance com/ps3-play53/map html first spreadsheet program
    stumbleupon com/toolbar/#url=citri ifrance com/plain-refc/map html signal cannon
    stumbleupon com/toolbar/#url=pollsiv ifrance com/-bowling1d/map html industrial clothing
    stumbleupon com/toolbar/#url=citri ifrance com/link-to-94/map html sylvia koscina
    stumbleupon com/toolbar/#url=pollsiv ifrance com/work-it-5f/map html ring stand
    stumbleupon com/toolbar/#url=pollsiv ifrance com/new-ipod48/map html pretending
    stumbleupon com/toolbar/#url=ewss ifrance com/gaiaonli5a/map html isafe
    stumbleupon com/toolbar/#url=ewss ifrance com/ave-mari3c/map html tanagram
    stumbleupon com/toolbar/#url=pollsiv ifrance com/ragnarok6a/map html sweet home alabama mp3
    stumbleupon com/toolbar/#url=ewss ifrance com/vista-bu8e/map html mba jobs in india
    stumbleupon com/toolbar/#url=ewss ifrance com/semok---98/map html gennie shifter
    stumbleupon com/toolbar/#url=citri ifrance com/free-iphc9/map html canfield high school
    stumbleupon com/toolbar/#url=ewss ifrance com/erotis-hc3/map html find local jobs
    stumbleupon com/toolbar/#url=pollsiv ifrance com/phim-chi70/index html electronic limescale
    stumbleupon com/toolbar/#url=pollsiv ifrance com/cac-bai-da/index html skin tight pants
    stumbleupon com/toolbar/#url=citri ifrance com/download6d/index html do you wanna roll
    stumbleupon com/toolbar/#url=citri ifrance com/hi-res-me4/index html pregnancy clothing
    stumbleupon com/toolbar/#url=ewss ifrance com/gambar-fe3/index html minnesota life college
    stumbleupon com/toolbar/#url=ewss ifrance com/dreamsce69/index html come and get your love
    stumbleupon com/toolbar/#url=citri ifrance com/resep-mi64/index html fatpad com
    stumbleupon com/toolbar/#url=pollsiv ifrance com/ps3-play53/index html spark plug gap chart
    stumbleupon com/toolbar/#url=citri ifrance com/plain-refc/index html blinking
    stumbleupon com/toolbar/#url=pollsiv ifrance com/-bowling1d/index html viscom
    stumbleupon com/toolbar/#url=citri ifrance com/link-to-94/index html ohlone indians
    stumbleupon com/toolbar/#url=pollsiv ifrance com/work-it-5f/index html video capturing software
    stumbleupon com/toolbar/#url=pollsiv ifrance com/new-ipod48/index html national institute on drug abuse
    stumbleupon com/toolbar/#url=ewss ifrance com/gaiaonli5a/index html cece peniston finally
    stumbleupon com/toolbar/#url=ewss ifrance com/ave-mari3c/index html lenk
    stumbleupon com/toolbar/#url=pollsiv ifrance com/ragnarok6a/index html arizona unemployment insurance
    stumbleupon com/toolbar/#url=ewss ifrance com/vista-bu8e/index html polynesian girl
    stumbleupon com/toolbar/#url=ewss ifrance com/semok---98/index html tube furnace
    stumbleupon com/toolbar/#url=citri ifrance com/free-iphc9/index html asian massage los angeles
    stumbleupon com/toolbar/#url=ewss ifrance com/erotis-hc3/index html corel snapfire

  3. #3
    Join Date
    Apr 2009
    Posts
    9
    Rep Power
    0

    Default

    Looks like you have not deployed your servlet right. Either your web.xml is incorrect or your classes or not in the correct path.

    Cheers,
    Sam

  4. #4
    nil_p is offline Member
    Join Date
    Apr 2009
    Posts
    2
    Rep Power
    0

    Default web.xml

    i have enterd as following in web.xml
    bt the thing is helloworld servlet is running properly, i made its entry in web.xml just like this one...
    wht would be the problem....

    <servlet>
    <servlet-name>MySql1</servlet-name>
    <servlet-class>com.stardeveloper.servlets.MySql1</servlet-class>
    </servlet>

    <servlet-mapping>
    <servlet-name>MySql1</servlet-name>
    <url-pattern>/mysql</url-pattern>
    </servlet-mapping>

  5. #5
    Join Date
    Apr 2009
    Posts
    9
    Rep Power
    0

    Default

    The DD looks right. Are you sure you compiled your classes in the correct package? Have you deployed the class at the correct place namely inside the package structure inside WEB-INF/classes? Did you deploy the helloworld application in a package structure?

Similar Threads

  1. how can i link html+servlet+xml to form servlet
    By balachandarr in forum Java Servlet
    Replies: 0
    Last Post: 04-15-2009, 04:06 PM
  2. Servlet to Servlet connection through URLConnection
    By bsrjavaforum in forum Networking
    Replies: 0
    Last Post: 04-01-2009, 04:12 PM
  3. Replies: 1
    Last Post: 12-02-2008, 12:23 AM
  4. Replies: 0
    Last Post: 08-30-2008, 11:52 AM
  5. Replies: 1
    Last Post: 08-07-2007, 03:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •