4
respostas

Erro ao 500 aplicação

Ao rodar aplicação, ocorre o erro:

HTTP Status 500 - Servlet.init() for servlet dispatcher threw exception

javax.servlet.ServletException: Servlet.init() for servlet dispatcher threw exception
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
    org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:526)
    org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
    org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:655)
    org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222)
    org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1566)
    org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1523)
    java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    java.lang.Thread.run(Unknown Source)
4 respostas

Complementando, estou utilizando a versão do MySQL 8, atualizei no pom.xml e no dialect... porém o erro continua.

Oi Manoel,

Posta o stack completo do erro, por favor.

GRAVE: StandardWrapper.Throwable java.lang.NoClassDefFoundError: org/springframework/context/event/EventListenerFactory at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2479) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:880) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1294) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1177) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getDeclaredMethods(Unknown Source) at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:570) at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:489) at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:502) at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:473) at org.springframework.util.ReflectionUtils.getUniqueDeclaredMethods(ReflectionUtils.java:533) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryMethod(AbstractAutowireCapableBeanFactory.java:678) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:622) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:592) at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1394) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:404) at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:373) at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:97) at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:606) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:462) at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:658) at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:530) at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:484) at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136) at javax.servlet.GenericServlet.init(GenericServlet.java:158) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1241) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1044) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4932) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5218) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1396) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1386) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.ClassNotFoundException: org.springframework.context.event.EventListenerFactory at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1324) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1177) ... 40 more

dez 26, 2019 7:27:03 PM org.apache.catalina.core.StandardContext loadOnStartup GRAVE: Servlet /casadocodigo threw load() exception java.lang.ClassNotFoundException: org.springframework.context.event.EventListenerFactory at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1324) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1177) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2479) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:880) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1294) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1177) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getDeclaredMethods(Unknown Source) at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:570) at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:489) at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:502) at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:473) at org.springframework.util.ReflectionUtils.getUniqueDeclaredMethods(ReflectionUtils.java:533) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryMethod(AbstractAutowireCapableBeanFactory.java:678) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:622) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:592) at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1394) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:404) at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:373) at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:97) at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:606) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:462) at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:658) at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:530) at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:484) at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136) at javax.servlet.GenericServlet.init(GenericServlet.java:158) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1241) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1044) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4932) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5218) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1396) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1386) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)