0

При попытке сделать деплой сервера (согласно обучающему видео) получаю такие ошибки.

21-Apr-2021 13:35:22.679 INFO [RMI TCP Connection(3)-127.0.0.1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. 21-Apr-2021 13:35:22.873 SEVERE [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file 21-Apr-2021 13:35:23.047 WARNING [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.util.SessionIdGeneratorBase.createSecureRandom Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [167] milliseconds. 21-Apr-2021 13:35:23.049 SEVERE [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Context [/SpringMVC_war_exploded] startup failed due to previous errors [2021-04-21 01:35:23,142] Artifact SpringMVC:war exploded: Error during artifact deployment. See server log for details.

Проект создан виз архетипа maven-archetype-webapp. Сервер заработал, когда запустио голое приложение, которое было в архетипе Проблема началась, когда я объявил файл dispatcher-servlet.xml (согласно уроку).

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:mvc="http://www.springframework.org/schema/mvc"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">

    <context:component-scan base-package="com.itvdn.controllers"/>

    <mvc:annotation-driven/>
</beans>

Мне кажется, что проблемная строка <context:component-scan base-package="com.itvdn.controllers"/>. При ее удалении, сервер деплоится, но естественно приложение не работает корректно, так как в указанном пути находятся мои контроллеры. Контроллеры лежат в папке java.com.itvdn.controllers Спасибо за помощь.

1 ответ 1

0

Spring не поддерживает tomcat 10 из-за того, что Tomcat 10 использует Jakarta EE 9, где имена пакетов для API-интерфейсов изменены с javax. * На jakarta. *.

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.