2

Здравствуйте. Пытаюсь поставить на GAE свое Spring приложение, но при старте сервера выдает две ошибки:

    WARNING: Could not instantiate listener org.springframework.web.context.ContextLoaderListener
    java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:199)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
...
WARNING: Failed startup of context com.google.appengine.tools.development.DevAppEngineWebAppContext@1fe15ff{/,D:\eclipse projects\AirPlane\war}
java.lang.IllegalStateException: No such servlet: default
    at org.mortbay.jetty.servlet.ServletHandler.updateMappings(ServletHandler.java:1026)
    at org.mortbay.jetty.servlet.ServletHandler.setServletMappings(ServletHandler.java:1110)
    at org.mortbay.jetty.webapp.WebXmlConfiguration.initialize(WebXmlConfiguration.java:306)
    at org.mortbay.jetty.webapp.WebXmlConfiguration.configure(WebXmlConfiguration.java:222)
    at org.mortbay.jetty.webapp.WebXmlConfiguration.configureWebApp(WebXmlConfiguration.java:180)
    at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1247)
    at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
...

Не могу понять где рыться что бы решить?

Использую maven. вот pom.xml:

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>AirPlane</groupId>
  <artifactId>AirPlane</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <dependencies>
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-entitymanager</artifactId>
        <version>4.1.7.Final</version>
    </dependency>
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-core</artifactId>
        <version>4.1.7.Final</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.springframework/spring-core -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-core</artifactId>
        <version>4.3.10.RELEASE</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.springframework/spring-webmvc -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-webmvc</artifactId>
        <version>4.3.10.RELEASE</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.springframework/spring-orm -->
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-orm</artifactId>
    <version>4.3.10.RELEASE</version>
</dependency>

<!-- https://mvnrepository.com/artifact/log4j/log4j -->
<dependency>
    <groupId>log4j</groupId>
    <artifactId>log4j</artifactId>
    <version>1.2.17</version>
</dependency>


</dependencies>
  <build>
    <sourceDirectory>src</sourceDirectory>
    <resources>
      <resource>
        <directory>src</directory>
        <excludes>
          <exclude>**/*.java</exclude>
        </excludes>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.3</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>
    </plugins>

  </build>
</project>
4
  • java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener - проблема явно в подключаемых зависимостях проекта, покажите gradle/maven файл проекта
    – GenCloud
    8 ноя 2017 в 14:11
  • и по данному пути: org.springframework.web.context.ContextLoaderListener класс такой есть 9 ноя 2017 в 8:48
  • Так вы зависимости не пакуете в пликуху, какой результат Вы еще ожидаете?
    – GenCloud
    9 ноя 2017 в 9:50
  • если правильно понял то не хватало тега <packaging>jar</packaging>. Добавил. В структуре есть зависимости maven. но ошибки не уходят 9 ноя 2017 в 10:19

0

Ваш ответ

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

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