Versão atual:

HTTP Status 500 - Error instantiating servlet class erro em java ee

Pessoal estou usando tom cate e eclipse em java ee, mais na hora que estou fazendo o cadastro no banco com hibernat e jsp, na hora do cadastro esta dando este erro.HTTP Status 500 - Error instantiating servlet class. alguem sabe como resolver?

package controladorUsuario;

import java.io.*;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import TestCon.TestaCadastroUsuario;
import tabelas.*;
import java.util.*;
import modelo.*;


@WebServlet("/UsuarioControlador.do")
public class UsuarioControlador extends HttpServlet {
    private static final long serialVersionUID = 1L;

    modeloUsuario mu= new modeloUsuario();


    public UsuarioControlador() {
        super();

    }


    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

        System.out.println("chamando metodo get");


    }


    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        System.out.println("chamando metodo post");

        Usuario u = new Usuario();
        u.setNick(request.getParameter("nick"));
        u.setSenha(request.getParameter("senha"));
        u.setEmail(request.getParameter("email"));
        this.mu.create(u);
        request.getRequestDispatcher("frmUsuario.jsp").forward(request, response);;



        }
    }
<form method="post" action="UsuarioControlador.do">
<h1>Tela de cadastro</h1>
<img  src="imagensWeb/adduser.png" class="user" ></img> <BR>

<table cellpadding="2" cellspacing="2"> 
<tr>
<td>Nick</td>
<td> <input type="text" name="nick"></td>
<tr>
<tr>
<td>Senha</td>
<td> <input type="password" name="senha"></td>
<tr>
<tr>
<td>Email</td>
<td> <input type="text" name="email"></td>
<tr>
<tr>
<td>&nbsp;</td>
<label >Preencha os dados para efeutar o cadastro ou cancelar para sair</label>
<td align="left">



<BR> <input type="submit" value="Save" />     <input type="submit" value="Cancelar" /> </td>


</tr>


</table> 





</form>

log do erro.

mai 27, 2015 9:02:08 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
ADVERTÊNCIA: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:PerguntasRespostas' did not find a matching property.
mai 27, 2015 9:02:08 AM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Server version:        Apache Tomcat/8.0.15
mai 27, 2015 9:02:08 AM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Server built:          Nov 2 2014 19:25:20 UTC
mai 27, 2015 9:02:08 AM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Server number:         8.0.15.0
mai 27, 2015 9:02:08 AM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: OS Name:               Windows 7
mai 27, 2015 9:02:08 AM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: OS Version:            6.1
mai 27, 2015 9:02:08 AM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Architecture:          x86
mai 27, 2015 9:02:08 AM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: JAVA_HOME:             C:\Program Files (x86)\Java\jre1.8.0_25
mai 27, 2015 9:02:08 AM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: JVM Version:           1.8.0_25-b18
mai 27, 2015 9:02:08 AM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: JVM Vendor:            Oracle Corporation
mai 27, 2015 9:02:08 AM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: CATALINA_BASE:         F:\ProjetoWeb\.metadata\.plugins\org.eclipse.wst.server.core\tmp2
mai 27, 2015 9:02:08 AM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: CATALINA_HOME:         C:\Program Files (x86)\Apache Software Foundation\Tomcat 8.0
mai 27, 2015 9:02:08 AM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Command line argument: -Dcatalina.base=F:\ProjetoWeb\.metadata\.plugins\org.eclipse.wst.server.core\tmp2
mai 27, 2015 9:02:08 AM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Command line argument: -Dcatalina.home=C:\Program Files (x86)\Apache Software Foundation\Tomcat 8.0
mai 27, 2015 9:02:08 AM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Command line argument: -Dwtp.deploy=F:\ProjetoWeb\.metadata\.plugins\org.eclipse.wst.server.core\tmp2\wtpwebapps
mai 27, 2015 9:02:08 AM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Command line argument: -Djava.endorsed.dirs=C:\Program Files (x86)\Apache Software Foundation\Tomcat 8.0\endorsed
mai 27, 2015 9:02:08 AM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Command line argument: -Dfile.encoding=Cp1252
mai 27, 2015 9:02:08 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFORMAÇÕES: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files (x86)\Java\jre1.8.0_25\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files (x86)/Java/jre1.8.0_25/bin/client;C:/Program Files (x86)/Java/jre1.8.0_25/bin;C:/Program Files (x86)/Java/jre1.8.0_25/lib/i386;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Users\Regina\Downloads\arqu\eclipse;;.
mai 27, 2015 9:02:09 AM org.apache.coyote.AbstractProtocol init
INFORMAÇÕES: Initializing ProtocolHandler ["http-nio-8080"]
mai 27, 2015 9:02:10 AM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFORMAÇÕES: Using a shared selector for servlet write/read
mai 27, 2015 9:02:10 AM org.apache.coyote.AbstractProtocol init
INFORMAÇÕES: Initializing ProtocolHandler ["ajp-nio-8009"]
mai 27, 2015 9:02:10 AM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFORMAÇÕES: Using a shared selector for servlet write/read
mai 27, 2015 9:02:10 AM org.apache.catalina.startup.Catalina load
INFORMAÇÕES: Initialization processed in 4329 ms
mai 27, 2015 9:02:10 AM org.apache.catalina.core.StandardService startInternal
INFORMAÇÕES: Starting service Catalina
mai 27, 2015 9:02:10 AM org.apache.catalina.core.StandardEngine startInternal
INFORMAÇÕES: Starting Servlet Engine: Apache Tomcat/8.0.15
mai 27, 2015 9:02:13 AM org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom
INFORMAÇÕES: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [579] milliseconds.
mai 27, 2015 9:02:15 AM org.apache.coyote.AbstractProtocol start
INFORMAÇÕES: Starting ProtocolHandler ["http-nio-8080"]
mai 27, 2015 9:02:15 AM org.apache.coyote.AbstractProtocol start
INFORMAÇÕES: Starting ProtocolHandler ["ajp-nio-8009"]
mai 27, 2015 9:02:15 AM org.apache.catalina.startup.Catalina start
INFORMAÇÕES: Server startup in 4485 ms
Initial SessionFactory creation failed.java.lang.NoClassDefFoundError: org/hibernate/cfg/AnnotationConfiguration
mai 27, 2015 9:26:30 AM org.apache.catalina.core.ApplicationContext log
INFORMAÇÕES: Marking servlet controladorUsuario.UsuarioControlador as unavailable
mai 27, 2015 9:26:30 AM org.apache.catalina.core.StandardWrapperValve invoke
GRAVE: Allocate exception for servlet controladorUsuario.UsuarioControlador
java.lang.ClassNotFoundException: org.hibernate.cfg.AnnotationConfiguration
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1295)
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1147)
    at modelo.HibernateUtil.<clinit>(HibernateUtil.java:14)
    at modelo.AbstractModel.<init>(AbstractModel.java:13)
    at modelo.modeloUsuario.<init>(modeloUsuario.java:9)
    at controladorUsuario.UsuarioControlador.<init>(UsuarioControlador.java:22)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at java.lang.Class.newInstance(Unknown Source)
    at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:121)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
    at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:827)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:537)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1085)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:658)
    at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1556)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1513)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Unknown Source)

Versão(1):

Ver a versão formatada

HTTP Status 500 - Error instantiating servlet class erro em java ee

Comentário

new question