Spring Bootアプリケーションが起動しない。エラー:サービスの停止[Tomcat]

ニシャント・シン:

Tomcatが埋め込まれたSpring Bootアプリケーションを実行できません。これまでは問題なく動作しており、構成の変更は行っていません。EclipseでアプリケーションをSpring Boot Appとして実行すると、起動時にTomcatがすぐに停止します。

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
2019-02-06 14:12:20,103 restartedMain ERROR Console contains an invalid element or attribute ""

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.5.6.RELEASE)

Feb 06, 2019 2:12:23 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service [Tomcat]
Feb 06, 2019 2:12:23 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/8.5.16
Feb 06, 2019 2:12:24 PM org.apache.jasper.servlet.TldScanner scanJars
INFO: 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.
Feb 06, 2019 2:12:24 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring embedded WebApplicationContext
2019-02-06 14:12:24.946  INFO 9504 --- [  restartedMain] o.h.j.i.u.LogHelper                      : HHH000204: Processing PersistenceUnitInfo [
    name: default
    ...]
2019-02-06 14:12:25.031  INFO 9504 --- [  restartedMain] o.h.Version                              : HHH000412: Hibernate Core {5.0.12.Final}
2019-02-06 14:12:25.034  INFO 9504 --- [  restartedMain] o.h.c.Environment                        : HHH000206: hibernate.properties not found
2019-02-06 14:12:25.036  INFO 9504 --- [  restartedMain] o.h.c.Environment                        : HHH000021: Bytecode provider name : javassist
2019-02-06 14:12:25.089  INFO 9504 --- [  restartedMain] o.h.a.c.Version                          : HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
2019-02-06 14:12:25.410  INFO 9504 --- [  restartedMain] o.h.d.Dialect                            : HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect
Feb 06, 2019 2:12:27 PM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service [Tomcat]

マシンの再起動、Eclipse、プロジェクトの更新を試み、.m2リポジトリーを再作成しましたが、問題の解決に役立ちませんでした。

以下は私の設定情報です:

メインクラス

@SpringBootApplication
@PropertySource(value="classpath:messages.properties")
public class ExampleApplication {

    public static void main(String[] args) {
        SpringApplication.run(ExampleApplication.class,       args);
    }

}

Pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
    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>com.brokerswing</groupId>
    <artifactId>brokerswing</artifactId>
    <version>1.1</version>

    <name>Example</name>
    <description>-</description>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.5.6.RELEASE</version>
        <relativePath />
    </parent>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.8</java.version>
    </properties>

    <dependencies>
        <!-- Spring Web -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <!-- Spring Data JPA -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>

        <!-- Spring Email -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-mail</artifactId>
        </dependency>

        <!-- Spring Security -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>

        <!-- Spring Development Tools -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <optional>true</optional>
        </dependency>

        <!-- MySQL -->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <scope>runtime</scope>
        </dependency>

        <!-- Servlet+JSP+JSTL -->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
        </dependency>

        <!-- Need this to compile JSP -->
        <dependency>
            <groupId>org.apache.tomcat.embed</groupId>
            <artifactId>tomcat-embed-jasper</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-mapper-asl</artifactId>
            <version>1.9.13</version>
        </dependency>

        <!-- Commons Collection -->
        <dependency>
            <groupId>commons-collections</groupId>
            <artifactId>commons-collections</artifactId>
        </dependency>

        <!-- Simple Java Mail -->
        <!-- <dependency> <groupId>org.simplejavamail</groupId> <artifactId>simple-java-mail</artifactId> 
            <version>4.4.5</version> </dependency> -->

        <!-- Java Mail and JAF -->
        <dependency>
            <groupId>javax.mail</groupId>
            <artifactId>mail</artifactId>
            <version>1.4.7</version>
            <scope>provided</scope>
        </dependency>

        <!-- Apache Velocity -->
        <dependency>
            <groupId>org.apache.velocity</groupId>
            <artifactId>velocity</artifactId>
            <version>1.7</version>
        </dependency>

        <!-- Apache Log4j 2 -->
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-jcl</artifactId>
        </dependency>

        <!-- Excel library -->
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi</artifactId>
            <version>3.6</version>
        </dependency>
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-ooxml</artifactId>
            <version>3.6</version>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <packaging>war</packaging>

</project>

Application.properties

# IDENTITY (ContextIdApplicationContextInitializer)
spring.application.name=Example

server.port=80
#debug=true

# SPRING MVC (WebMvcProperties)
spring.mvc.date-format=DD/MM/YYYY

# JDBC Connection
spring.datasource.driverClassName=com.mysql.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/brokerswing?useSSL=false
spring.datasource.username=root
spring.datasource.password=root


# JPA (JpaBaseConfiguration, HibernateJpaAutoConfiguration)
spring.jpa.hibernate.ddl-auto=none
spring.jpa.show-sql=false   
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect
spring.jpa.properties.hibernate.current_session_context_class=org.springframework.orm.hibernate5.SpringSessionContext


# DEVTOOLS (DevToolsProperties)
spring.devtools.restart.enabled=true
spring.devtools.restart.exclude=META-INF/maven/**,META-INF/resources/**,resources/**,static/**,public/**,templates/**,**/*Test.class,**/*Tests.class,git.properties,META-INF/build-info.properties
spring.devtools.restart.poll-interval=5000
spring.devtools.restart.quiet-period=1000
nullPointer:

あなたが得るエラーはSLF4Jに関連しているようです

以下の依存関係をpom.xmlに追加してみてください

  <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-api</artifactId>
       <version>1.7.5</version>
   </dependency>
   <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-log4j12</artifactId>
       <version>1.7.5</version>
   </dependency>

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

EmbeddedServletContainerFactory Beanが見つからないため、Springアプリケーションが起動しない

Spring-bootアプリケーションの起動をテストする

Spring Boot ActuatorアプリケーションがUbuntu VPSで起動しない

TomcatがSpring-Bootアプリケーションのプロパティを読み取らない

Spring Restアプリケーションが起動していません(NullPointerException)

Springアプリケーションが起動しない

名前がadminHandlerMappingのBeanの作成エラーのため、Spring-Boot-Adminアプリケーションが起動しない

起動時にSpring BootアプリケーションがFlyway移行を実行していない

子がSpring Boot WebアプリケーションをTomcat 9にデプロイする際のエラー

Spring Boot Cache + Apache ignite + Spring Boot Actuator-テストの実行時にアプリケーションが起動しない

Spring Bootアプリケーションの起動時のRMI TCP接続エラー

Spring BootアプリケーションはTomcat 8でローカルに正常に起動していますが、404を取得しています

Spring Bootの初期化が完了しない[アプリケーションがスタックしている]

末尾のスラッシュなしで/ contextPathを要求すると、リバースプロキシの背後にTomcatが埋め込まれたSpring Bootアプリケーションがhttpsにリダイレクトしない

別のアプリケーションモジュールから依存関係をインポートすると、Spring Boot REST APIが起動しない

EclipseでSpring MVCアプリケーションのTomcatサーバーを起動できません

データソースのないSpring-Bootアプリケーション

Springブートアプリケーション(Webではない)が起動後に停止する

サービスクラスエラーが原因でSpringブートアプリが起動しない

Springアプリケーションがエラーをスローし、WARがビルドされない

Spring Boot:Webshere Application Serverの起動時にアプリケーションを自動的に起動しますか?

Spring Boot and Hibernate:データベースへの接続が利用できない場合でもアプリケーションを起動します

Cucumber テストで Spring ブート アプリケーションが起動しない

Springアプリケーションが起動しない:アプリケーションがクラスパスで起動できませんでした

内部エラーが発生した場合、Spring-bootはアプリケーションを停止します

Spring Bootアプリケーションが起動するたびにh2データベースが空になるのはなぜですか?

Spring BootアプリケーションのREST呼び出しにより、Tomcatで次のリクエストの404エラーが発生します

Spring Boot + Tomcat + Jetty-アプリケーションを起動できませんでした

Spring-boot CRUDアプリケーションが「Tomcatコンテキストの開始中にエラーが発生しました。例外:org.springframework.beans.factory.UnsatisfiedDependency」で起動できませんでした

TOP 一覧

  1. 1

    セレンのモデルダイアログからテキストを抽出するにはどうすればよいですか?

  2. 2

    Modbus Python Schneider PM5300

  3. 3

    Ansibleで複数行のシェルスクリプトを実行する方法

  4. 4

    tkinterウィンドウを閉じてもPythonプログラムが終了しない

  5. 5

    どのように関係なく、それがどのように「悪い」、すべてのSSL証明書でのHttpClientを使用しないように

  6. 6

    インデックス作成時のドキュメントの順序は、Elasticsearchの検索パフォーマンスを向上させますか?

  7. 7

    ラベルとエントリがpythontkinterに表示されないのはなぜですか?

  8. 8

    Chromeウェブアプリのウェブビューの高さの問題

  9. 9

    パンダは異なる名前の列に追加します

  10. 10

    GoDaddyでのCKEditorとKCfinderの画像プレビュー

  11. 11

    Elasticsearch - あいまい検索は、提案を与えていません

  12. 12

    変数値を含むElasticSearch検索結果

  13. 13

    グラフ(.PNG)ファイルをエクスポートするZabbix

  14. 14

    Elasticsearchの場合、間隔を空けた単語を使用したワイルドカード検索

  15. 15

    モーダルダイアログを自動的に閉じる-サーバーコードが完了したら、Googleスプレッドシートのダイアログを閉じます

  16. 16

    mutate_allとifelseを組み合わせるにはどうすればよいですか

  17. 17

    Windows 10 Pro 1709を1803、1809、または1903に更新しますか?

  18. 18

    Elasticsearchでサーバー操作を最適化:低いディスク透かしに対処する

  19. 19

    テキストフィールドの値に基づいて UIslider を移動します

  20. 20

    ネットワークグラフで、ネットワークコンポーネントにカーソルを合わせたときに、それらを強調表示するにはどうすればよいですか?

  21. 21

    Unity:未知のスクリプトをGameObject(カスタムエディター)に動的にアタッチする方法

ホットタグ

アーカイブ