• Najnowsze pytania
  • Bez odpowiedzi
  • Zadaj pytanie
  • Kategorie
  • Tagi
  • Zdobyte punkty
  • Ekipa ninja
  • IRC
  • FAQ
  • Regulamin
  • Książki warte uwagi

projekt w spring-mvc nie odpala (tomcat)

Aruba Cloud PRO i VPS, Openstack, VMWare, MS Hyper-V
0 głosów
247 wizyt
pytanie zadane 10 maja 2018 w Java przez m_rience Nowicjusz (120 p.)

Cześć,

Odpalając lokalnie konsola zatrzymuje się na: Starting ProtocolHandler ["http-bio-8080"] - coś źle z portem?
(Dałem komuś do sprawdzenia i u tej osoby lokalnie wszystko jest ok, więc błąd raczej leży  w moich ustawieniach)

WARNING: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'catsController' defined in file [C:\Users\mateusz\Desktop\eclipse-workplace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cats-webapp\WEB-INF\classes\org\cats\webapp\controllers\CatsController.class]: Post-processing of merged bean definition failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [org.cats.webapp.controllers.CatsController] from ClassLoader [ParallelWebappClassLoader
  context: cat-registry
  delegate: false
----------> Parent Classloader:
java.net.URLClassLoader@4cf777e8
]
maj 10, 2018 12:21:57 AM org.springframework.web.context.ContextLoader initWebApplicationContext
SEVERE: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'catsController' defined in file [C:\Users\mateusz\Desktop\eclipse-workplace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cats-webapp\WEB-INF\classes\org\cats\webapp\controllers\CatsController.class]: Post-processing of merged bean definition failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [org.cats.webapp.controllers.CatsController] from ClassLoader [ParallelWebappClassLoader
  context: cat-registry
  delegate: false
----------> Parent Classloader:
java.net.URLClassLoader@4cf777e8
]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:560)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:502)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:312)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:760)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:868)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549)
	at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:409)
	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:291)
	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4579)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5041)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1427)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1417)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
	at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:943)
	at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1427)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1417)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
	at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:943)
	at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:258)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:682)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:353)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:493)
Caused by: java.lang.IllegalStateException: Failed to introspect Class [org.cats.webapp.controllers.CatsController] from ClassLoader [ParallelWebappClassLoader
  context: cat-registry
  delegate: false
----------> Parent Classloader:
java.net.URLClassLoader@4cf777e8
]
	at org.springframework.util.ReflectionUtils.getDeclaredFields(ReflectionUtils.java:759)
	at org.springframework.util.ReflectionUtils.doWithLocalFields(ReflectionUtils.java:691)
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.buildResourceMetadata(CommonAnnotationBeanPostProcessor.java:355)
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.findResourceMetadata(CommonAnnotationBeanPostProcessor.java:339)
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(CommonAnnotationBeanPostProcessor.java:298)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:1016)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557)
	... 41 more
Caused by: java.lang.NoClassDefFoundError: Lorg/cats/application/CatDAO;
	at java.base/java.lang.Class.getDeclaredFields0(Native Method)
	at java.base/java.lang.Class.privateGetDeclaredFields(Class.java:3024)
	at java.base/java.lang.Class.getDeclaredFields(Class.java:2205)
	at org.springframework.util.ReflectionUtils.getDeclaredFields(ReflectionUtils.java:754)
	... 47 more
Caused by: java.lang.ClassNotFoundException: org.cats.application.CatDAO
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1275)
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1104)
	... 51 more

maj 10, 2018 12:21:57 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class [org.springframework.web.context.ContextLoaderListener]
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'catsController' defined in file [C:\Users\mateusz\Desktop\eclipse-workplace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cats-webapp\WEB-INF\classes\org\cats\webapp\controllers\CatsController.class]: Post-processing of merged bean definition failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [org.cats.webapp.controllers.CatsController] from ClassLoader [ParallelWebappClassLoader
  context: cat-registry
  delegate: false
----------> Parent Classloader:
java.net.URLClassLoader@4cf777e8
]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:560)

	org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4579)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5041)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1427)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1417)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
	at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:943)
	at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1427)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1417)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
	at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:943)
	at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:258)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:682)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:353)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:493)
Caused by: java.lang.IllegalStateException: Failed to introspect Class [org.cats.webapp.controllers.CatsController] from ClassLoader [ParallelWebappClassLoader
  context: cat-registry
  delegate: false
----------> Parent Classloader:
java.net.URLClassLoader@4cf777e8
]
	at org.springframework.util.ReflectionUtils.getDeclaredFields(ReflectionUtils.java:759)
	at org.springframework.util.ReflectionUtils.doWithLocalFields(ReflectionUtils.java:691)
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.buildResourceMetadata(CommonAnnotationBeanPostProcessor.java:355)
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.findResourceMetadata(CommonAnnotationBeanPostProcessor.java:339)
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(CommonAnnotationBeanPostProcessor.java:298)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:1016)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557)
	... 41 more
Caused by: java.lang.NoClassDefFoundError: Lorg/cats/application/CatDAO;
	at java.base/java.lang.Class.getDeclaredFields0(Native Method)
	at java.base/java.lang.Class.privateGetDeclaredFields(Class.java:3024)
	at java.base/java.lang.Class.getDeclaredFields(Class.java:2205)
	at org.springframework.util.ReflectionUtils.getDeclaredFields(ReflectionUtils.java:754)
	... 47 more
Caused by: java.lang.ClassNotFoundException: org.cats.application.CatDAO
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1275)
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1104)
	... 51 more

maj 10, 2018 12:21:57 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: One or more listeners failed to start. Full details will be found in the appropriate container log file
maj 10, 2018 12:21:57 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/cat-registry] startup failed due to previous errors
maj 10, 2018 12:21:57 AM org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.catalina.loader.WebappClassLoaderBase (file:/C:/Users/mateusz/Desktop/programy/apache-tomcat-9.0.6/lib/catalina.jar) to field java.lang.Thread.threadLocals
WARNING: Please consider reporting this to the maintainers of org.apache.catalina.loader.WebappClassLoaderBase
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
maj 10, 2018 12:21:57 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-nio-8080"]
maj 10, 2018 12:21:57 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-nio-8009"]
maj 10, 2018 12:21:57 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 6821 ms


Z kolei jak ruszam w Eclipse EE na Tomcat 9 dostaję taki log:
Link do repo: https://github.com/mrience/Cats-spring
Link do kursu: https://kobietydokodu.pl/09-spring-mvc/

komentarz 10 maja 2018 przez mbabane Szeryf (79,260 p.)
Na marginesie kurs jest trochę przestarzały.

Zaloguj lub zarejestruj się, aby odpowiedzieć na to pytanie.

Podobne pytania

0 głosów
0 odpowiedzi 119 wizyt
pytanie zadane 26 listopada 2018 w Nasze projekty przez mycha Nowicjusz (140 p.)
0 głosów
1 odpowiedź 212 wizyt
pytanie zadane 14 października 2021 w Java przez Wuuu0 Użytkownik (630 p.)
+1 głos
1 odpowiedź 180 wizyt
pytanie zadane 14 sierpnia 2021 w Java przez DziQu Początkujący (380 p.)

89,768 zapytań

138,375 odpowiedzi

309,458 komentarzy

59,679 pasjonatów

Advent of Code 2022

Top 15 użytkowników

  1. 1074p. - Argeento
  2. 1010p. - rucin93
  3. 1006p. - Michal Drewniak
  4. 1000p. - Łukasz Eckert
  5. 974p. - TheLukaszNs
  6. 949p. - JMazurkiewicz
  7. 946p. - adrian17
  8. 933p. - Jarosław Roszyk
  9. 889p. - nidomika
  10. 860p. - Mikbac
  11. 847p. - ssynowiec
  12. 799p. - Hubert Chęciński
  13. 772p. - Mawrok
  14. 768p. - overcq
  15. 764p. - Vinox
Szczegóły i pełne wyniki

Motyw:

Akcja Pajacyk

Pajacyk od wielu lat dożywia dzieci. Pomóż klikając w zielony brzuszek na stronie. Dziękujemy! ♡

Sklep oferujący ćwiczenia JavaScript, PHP, rozmowy rekrutacyjne dla programistów i inne materiały

Oto dwie polecane książki warte uwagi. Pełną listę znajdziesz tutaj.

...