0
SpringでREST APIを作成していますが、アプリケーションを実行しようとすると大きなエラーログが表示されます。私は、これが問題全体を引き起こすものだと思う。Spring-Bootで埋め込みTomcatを開始できません
2016-07-04 21:25:28.267 INFO 532 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8080 (http)
2016-07-04 21:25:28.282 INFO 532 --- [ main] o.apache.catalina.core.StandardService : Starting service Tomcat
2016-07-04 21:25:28.284 INFO 532 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.0.36
2016-07-04 21:25:28.398 INFO 532 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2016-07-04 21:25:28.399 INFO 532 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 2417 ms
2016-07-04 21:25:29.142 INFO 532 --- [ost-startStop-1] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'default'
2016-07-04 21:25:29.153 INFO 532 --- [ost-startStop-1] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [
name: default
...]
2016-07-04 21:25:29.236 INFO 532 --- [ost-startStop-1] org.hibernate.Version : HHH000412: Hibernate Core {4.3.11.Final}
2016-07-04 21:25:29.238 INFO 532 --- [ost-startStop-1] org.hibernate.cfg.Environment : HHH000206: hibernate.properties not found
2016-07-04 21:25:29.240 INFO 532 --- [ost-startStop-1] org.hibernate.cfg.Environment : HHH000021: Bytecode provider name : javassist
2016-07-04 21:25:29.453 INFO 532 --- [ost-startStop-1] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {4.0.5.Final}
2016-07-04 21:25:29.517 INFO 532 --- [ost-startStop-1] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect
2016-07-04 21:25:29.729 ERROR 532 --- [ost-startStop-1] o.s.b.c.embedded.tomcat.TomcatStarter : Error starting Tomcat context: org.springframework.beans.factory.BeanCreationException
2016-07-04 21:25:29.774 WARN 532 --- [ main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat
2016-07-04 21:25:29.793 ERROR 532 --- [ main] o.s.boot.SpringApplication : Application startup failed
、障害の根本的な原因は次のとおりです。
Caused by: org.hibernate.MappingException: Could not determine type for: java.util.List, at table: comment, for columns: [org.hibernate.mapping.Column(responses)]
at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:349) ~[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:322) ~[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
at org.hibernate.mapping.Property.isValid(Property.java:241) ~[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:496) ~[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
at org.hibernate.mapping.RootClass.validate(RootClass.java:270) ~[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
at org.hibernate.cfg.Configuration.validate(Configuration.java:1360) ~[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1851) ~[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:857) ~[hibernate-entitymanager-4.3.11.Final.jar:4.3.11.Final]
... 200 common frames omitted
これは私のGradleのビルドファイルでは、
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath('org.springframework.boot:spring-boot-gradle-plugin:1.3.6.RELEASE')
}
}
apply plugin: 'java'
apply plugin: 'spring-boot'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
compile 'org.springframework.boot:spring-boot-starter-data-rest'
compile 'org.springframework.boot:spring-boot-starter-data-jpa'
compile 'com.h2database:h2'
testCompile group: 'junit', name: 'junit', version: '4.11'
}
これは私のアプリケーションクラス
私ができることです何が間違っているのかを理解しているようだere。資料は https://github.com/soumasish/Bulletin-Board-Rest-Api でご覧になれます。
フルエラーログを投稿できますか? –
これは長すぎるため、stackoverflowの30000語の制限に収まりません。だから私はソースコードへのリンクを投稿した。 –
「関連する」エラーログをそれから見つけ出し、ここに投稿することは可能でしょうか?他の人が試すことができるように... –