Spring」カテゴリーアーカイブ

spring-boot-starter-parentのバージョンアップ時メモ

小さいシステムバージョンアップしようとしたら色々コンパイルエラー(他)が出たので作業しながらメモ残す。新バージョンのライブラリ(Junitとか)は極力新しい奴のデフォルトに合わせる予定だが、つらくなったら妥協する。

作業内容

  • 2.1.6.RELEASEから3.2.3
  • JDKは11から17(21のバイナリで17動作指定)

Junitのエラー

Junit4系から5系に変わりった。

以下2つがコンパイルエラー。

  • import org.junit.Test
  • import org.junit.runner

org.junit.jupiter.api.Test に代わってrunnerはいらない

import static org.junit.Assert.assertHOGE

import static org.junit.jupiter.api.Assertions.assertHOGEに

import javax.servlet.http.HttpServletRequest;

import jakarta.servlet.http.HttpServletRequest;にパッケージ名が変わっている

import org.hibernate.validator

jakarta.validation.constraints.HOGEへ

以下はいれてコンパイルエラーは消えるがすでに org.hibernate.validatorはDuplicateだった。

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-validation</artifactId>
		</dependency>

import javax.persistence.HOGE

jakarta.persistence.HOGEへ

とりあえずコンパイルエラーは消えた。このあと実行時のやつらを

実行時のjar重複

Standard Commons Logging discovery in action with spring-jcl: please remove commons-logging.jar from classpath in order to avoid potential conflicts

こちらによるとほかの依存している奴と重複すると警告がでる。

依存関係から除外

		<dependency>
			<groupId>jp.co.epea</groupId>
			<artifactId>jpholiday</artifactId>
			<version>0.0.1</version>
			<exclusions>
				<exclusion>
					<groupId>commons-logging</groupId>
					<artifactId>commons-logging</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

LogLevelの型?

Failed to bind properties under 'logging.level.org.hibernate.sql' to org.springframework.boot.logging.LogLevel:

    Property: logging.level.org.hibernate.sql
    Value: "DUBUG"
    Origin: class path resource [application.properties] - 12:33
    Reason: failed to convert java.lang.String to org.springframework.boot.logging.LogLevel (caused by java.lang.IllegalArgumentException: No enum constant org.springframework.boot.logging.LogLevel.DUBUG)

Action:

Update your application's configuration. The following values are valid:

    DEBUG
    ERROR
    FATAL
    INFO
    OFF
    TRACE
    WARN

application.propertiesのログレベル指定をorg.springframework.boot.logging.LogLevel=DUBUGにしたらとりあえず動くけどそんなプロパティないと警告出ている。また、デバックログは出てないっぽい。そもそもなにも働いていないからエラーにもならないだけだな。

Description	Resource	Path	Location	Type
'org.springframework.boot.logging.LogLevel' is an unknown property.	application.properties	/momoyama-web/src/main/resources	line 12	Language Servers

あらためて確認すると

  • logging.level.sql=DEBUG
  • logging.level.org.hibernate.SQL=DEBUG
  • logging.level.org.hibernate.orm.jdbc.bind=TRACE

これらは使えるっぽい(上ふたつは多分同じものさす)

改めて設定したら使えた。クラスパスの反映とかがうまくいってないかったのかな?ちょっと様子見。

それはそうとSTSでapplication.properties触ろうとするとかなりの確率でフリーズする。

HHH90000025

HHH90000025: PostgreSQLDialect does not need to be specified explicitly using 'hibernate.dialect' (remove the property setting and it will be selected by default)
spring.jpa.database=POSTGRESQL
spring.datasource.driverClassName=org.postgresql.Driver

がいらなくなったらしい

HHH000489

HHH000489: No JTA platform available (set 'hibernate.transaction.jta.platform' to enable JTA platform integration)

調べ中

これはそういうものとここに書いてある。とりあえず受け入れる。

spring.datasource.hoge

spring.sql.init.hogeに変更

Spring Securityのユーザ認証でちょこっと躓いた

DB認証を設定しようとして

@Entity
public class User implements UserDetails {

private static final long serialVersionUID = 1L;

public enum Authority {ROLE_USER, ROLE_ADMIN}

@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;

@Column(nullable = false, unique = true)
private String username;

@Column(nullable = false)
private String password;

Userというクラス名でテーブルの生成をしようとしたら、以下のエラーが発生

Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at or near “user”Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at or near “user”  ポジション: 13 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2455) ~[postgresql-9.4.1212.jre7.jar:9.4.1212.jre7] at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2155) ~[postgresql-9.4.1212.jre7.jar:9.4.1212.jre7] at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:288) ~[postgresql-9.4.1212.jre7.jar:9.4.1212.jre7] at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:430) ~[postgresql-9.4.1212.jre7.jar:9.4.1212.jre7] at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:356) ~[postgresql-9.4.1212.jre7.jar:9.4.1212.jre7]

Postgresの予約語とかさなったとのこと。リンク先のとりあえずの手段として以下のようにエスケープを二重にしたら動いた。(password列も必要とのこと)

@Entity
@Table(name = “`USER`”)
public class User implements UserDetails {

ただ、そもそも予約語と重ならないほうがよいよということなので後で変える

 

Portが埋まっている。

SpringBootの勉強でSTSから出力したjarをWindowsのコマンドプロンプトから実行。

原因調査中だけどメモ代わりに

単に実行可能jarデスクトップ上でダブルクリックしていたのが残っていただけでした。。。。

java -jar C:\Users\epea.pc01\Desktop\mrs-0.0.1-SNAPSHOT.jar

すると、portが埋まっていると言われて起動できなかった。

2017-04-20 17:08:24.561 ERROR 10048 --- [           main] o.a.coyote.http11.Http11NioProtocol      : 
 Failed to start end point associated with ProtocolHandler [http-nio-8080]

java.net.BindException: Address already in use: bind
        at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_131]
        at sun.nio.ch.Net.bind(Unknown Source) ~[na:1.8.0_131]
        at sun.nio.ch.Net.bind(Unknown Source) ~[na:1.8.0_131]

確認すると確かに使用されている。

PS C:\Users\epea.pc01> netstat -oan|Select-String "8080"

  TCP         0.0.0.0:8080           0.0.0.0:0              LISTENING
  TCP         [::]:8080              [::]:0                 LISTENING


PS C:\Users\epea.pc01> Get-Process -Id "2664"

Handles  NPM(K)    PM(K)      WS(K)     CPU(s)     Id  SI ProcessName
-------  ------    -----      -----     ------     --  -- -----------
    380      39   570384     365884      34.33   2664   1 javaw
PS C:\Users\epea.pc01>  Get-Process javaw | Form


Name                       : javaw
Id                         : 2664
PriorityClass              : Normal
FileVersion                : 8.0.1310.11
HandleCount                : 376
WorkingSet                 : 57143296
PagedMemorySize            : 588607488
PrivateMemorySize          : 588607488
VirtualMemorySize          : -427937792
TotalProcessorTime         : 00:00:34.5312500
SI                         : 1
Handles                    : 376
VM                         : 3867029504
WS                         : 57143296
PM                         : 588607488
NPM                        : 40056
Path                       : C:\Program Files\Ja
Company                    : Oracle Corporation
CPU                        : 34.53125
ProductVersion             : 8.0.1310.11
Description                : Java(TM) Platform S
Product                    : Java(TM) Platform S
__NounName                 : Process
BasePriority               : 8
ExitCode                   :
HasExited                  : False
ExitTime                   :
Handle                     : 1564
SafeHandle                 : Microsoft.Win32.Saf
MachineName                : .
MainWindowHandle           : 0
MainWindowTitle            :
MainModule                 : System.Diagnostics.
MaxWorkingSet              : 1413120
MinWorkingSet              : 204800
Modules                    : {System.Diagnostics
                             ), System.Diagnosti
                             ELBASE.dll)...}
NonpagedSystemMemorySize   : 40056
NonpagedSystemMemorySize64 : 40056
PagedMemorySize64          : 588607488
PagedSystemMemorySize      : 207872
PagedSystemMemorySize64    : 207872
PeakPagedMemorySize        : 668753920
PeakPagedMemorySize64      : 668753920
PeakWorkingSet             : 454303744
PeakWorkingSet64           : 454303744
PeakVirtualMemorySize      : -357683200
PeakVirtualMemorySize64    : 3937284096
PriorityBoostEnabled       : True
PrivateMemorySize64        : 588607488
PrivilegedProcessorTime    : 00:00:03.6250000
ProcessName                : javaw
ProcessorAffinity          : 15
Responding                 : True
SessionId                  : 1
StartInfo                  : System.Diagnostics.
StartTime                  : 2017/04/20 16:51:46
SynchronizingObject        :
Threads                    : {10604, 11860, 7328
UserProcessorTime          : 00:00:30.9062500
VirtualMemorySize64        : 3867029504
EnableRaisingEvents        : False
StandardInput              :
StandardOutput             :
StandardError              :
WorkingSet64               : 57143296
Site                       :
Container                  :

スレッドダンプ

2017-04-20 18:31:47
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.131-b11 mixed mode):

"DestroyJavaVM" #24 prio=5 os_prio=0 tid=0x000000001ac06000 nid=0x2e54 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"http-nio-8080-AsyncTimeout" #22 daemon prio=5 os_prio=0 tid=0x000000001ac09000 nid=0x1e0 waiting on condition [0x000000002459f000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
	at java.lang.Thread.sleep(Native Method)
	at org.apache.coyote.AbstractProtocol$AsyncTimeout.run(AbstractProtocol.java:1138)
	at java.lang.Thread.run(Unknown Source)

"http-nio-8080-Acceptor-0" #21 daemon prio=5 os_prio=0 tid=0x000000001ac08800 nid=0x2080 runnable [0x000000002449f000]
   java.lang.Thread.State: RUNNABLE
	at sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method)
	at sun.nio.ch.ServerSocketChannelImpl.accept(Unknown Source)
	at sun.nio.ch.ServerSocketChannelImpl.accept(Unknown Source)
	- locked  (a java.lang.Object)
	at org.apache.tomcat.util.net.NioEndpoint$Acceptor.run(NioEndpoint.java:443)
	at java.lang.Thread.run(Unknown Source)

"http-nio-8080-ClientPoller-1" #20 daemon prio=5 os_prio=0 tid=0x000000001ac07800 nid=0x12b8 runnable [0x000000002439f000]
   java.lang.Thread.State: RUNNABLE
	at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
	at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(Unknown Source)
	at sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(Unknown Source)
	at sun.nio.ch.WindowsSelectorImpl.doSelect(Unknown Source)
	at sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)
	- locked  (a sun.nio.ch.Util$3)
	- locked  (a java.util.Collections$UnmodifiableSet)
	- locked  (a sun.nio.ch.WindowsSelectorImpl)
	at sun.nio.ch.SelectorImpl.select(Unknown Source)
	at org.apache.tomcat.util.net.NioEndpoint$Poller.run(NioEndpoint.java:775)
	at java.lang.Thread.run(Unknown Source)

"http-nio-8080-ClientPoller-0" #19 daemon prio=5 os_prio=0 tid=0x000000001ac0d000 nid=0x2a8c runnable [0x000000002429f000]
   java.lang.Thread.State: RUNNABLE
	at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
	at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(Unknown Source)
	at sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(Unknown Source)
	at sun.nio.ch.WindowsSelectorImpl.doSelect(Unknown Source)
	at sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)
	- locked  (a sun.nio.ch.Util$3)
	- locked  (a java.util.Collections$UnmodifiableSet)
	- locked  (a sun.nio.ch.WindowsSelectorImpl)
	at sun.nio.ch.SelectorImpl.select(Unknown Source)
	at org.apache.tomcat.util.net.NioEndpoint$Poller.run(NioEndpoint.java:775)
	at java.lang.Thread.run(Unknown Source)

"NioBlockingSelector.BlockPoller-1" #18 daemon prio=5 os_prio=0 tid=0x000000001ac0b800 nid=0x12a0 runnable [0x000000002419e000]
   java.lang.Thread.State: RUNNABLE
	at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
	at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(Unknown Source)
	at sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(Unknown Source)
	at sun.nio.ch.WindowsSelectorImpl.doSelect(Unknown Source)
	at sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)
	- locked  (a sun.nio.ch.Util$3)
	- locked  (a java.util.Collections$UnmodifiableSet)
	- locked  (a sun.nio.ch.WindowsSelectorImpl)
	at sun.nio.ch.SelectorImpl.select(Unknown Source)
	at org.apache.tomcat.util.net.NioBlockingSelector$BlockPoller.run(NioBlockingSelector.java:339)

"Tomcat JDBC Pool Cleaner[791452441:1492674713173]" #17 daemon prio=5 os_prio=0 tid=0x000000001a5ec800 nid=0x2478 in Object.wait() [0x0000000020a1f000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	at java.util.TimerThread.mainLoop(Unknown Source)
	- locked  (a java.util.TaskQueue)
	at java.util.TimerThread.run(Unknown Source)

"container-0" #16 prio=5 os_prio=0 tid=0x0000000018f8e000 nid=0x1c9c waiting on condition [0x00000000207af000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
	at java.lang.Thread.sleep(Native Method)
	at org.apache.catalina.core.StandardServer.await(StandardServer.java:427)
	at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer$1.run(TomcatEmbeddedServletContainer.java:174)

"ContainerBackgroundProcessor[StandardEngine[Tomcat]]" #15 daemon prio=5 os_prio=0 tid=0x0000000019690000 nid=0x15a4 waiting on condition [0x00000000206af000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
	at java.lang.Thread.sleep(Native Method)
	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1355)
	at java.lang.Thread.run(Unknown Source)

"Service Thread" #9 daemon prio=9 os_prio=0 tid=0x0000000018cf8800 nid=0x2500 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C1 CompilerThread2" #8 daemon prio=9 os_prio=2 tid=0x0000000018c86000 nid=0x275c waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread1" #7 daemon prio=9 os_prio=2 tid=0x000000001766d800 nid=0x27e8 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread0" #6 daemon prio=9 os_prio=2 tid=0x000000001766a800 nid=0x21e0 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Attach Listener" #5 daemon prio=5 os_prio=2 tid=0x0000000017669000 nid=0x528 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Signal Dispatcher" #4 daemon prio=9 os_prio=2 tid=0x0000000017668800 nid=0x2a60 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Finalizer" #3 daemon prio=8 os_prio=1 tid=0x00000000175fa800 nid=0x1e6c in Object.wait() [0x000000001897f000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on  (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(Unknown Source)
	- locked  (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(Unknown Source)
	at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)

"Reference Handler" #2 daemon prio=10 os_prio=2 tid=0x00000000015bf000 nid=0x254c in Object.wait() [0x000000001887e000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on  (a java.lang.ref.Reference$Lock)
	at java.lang.Object.wait(Unknown Source)
	at java.lang.ref.Reference.tryHandlePending(Unknown Source)
	- locked  (a java.lang.ref.Reference$Lock)
	at java.lang.ref.Reference$ReferenceHandler.run(Unknown Source)

"VM Thread" os_prio=2 tid=0x00000000175d7800 nid=0x2600 runnable 

"GC task thread#0 (ParallelGC)" os_prio=0 tid=0x00000000014e7000 nid=0x1ca0 runnable 

"GC task thread#1 (ParallelGC)" os_prio=0 tid=0x00000000014e8800 nid=0x1428 runnable 

"GC task thread#2 (ParallelGC)" os_prio=0 tid=0x00000000014ea000 nid=0x1950 runnable 

"GC task thread#3 (ParallelGC)" os_prio=0 tid=0x00000000014ec800 nid=0x10cc runnable 

"VM Periodic Task Thread" os_prio=2 tid=0x0000000018d55800 nid=0xaec waiting on condition 

JNI global references: 288

2017-04-20 18:31:47
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.131-b11 mixed mode):

"DestroyJavaVM" #24 prio=5 os_prio=0 tid=0x000000001ac06000 nid=0x2e54 waiting on condition [0x0000000000000000]
 java.lang.Thread.State: RUNNABLE

"http-nio-8080-AsyncTimeout" #22 daemon prio=5 os_prio=0 tid=0x000000001ac09000 nid=0x1e0 waiting on condition [0x000000002459f000]
 java.lang.Thread.State: TIMED_WAITING (sleeping)
 at java.lang.Thread.sleep(Native Method)
 at org.apache.coyote.AbstractProtocol$AsyncTimeout.run(AbstractProtocol.java:1138)
 at java.lang.Thread.run(Unknown Source)

"http-nio-8080-Acceptor-0" #21 daemon prio=5 os_prio=0 tid=0x000000001ac08800 nid=0x2080 runnable [0x000000002449f000]
 java.lang.Thread.State: RUNNABLE
 at sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method)
 at sun.nio.ch.ServerSocketChannelImpl.accept(Unknown Source)
 at sun.nio.ch.ServerSocketChannelImpl.accept(Unknown Source)
 - locked <0x00000000e4d21c20> (a java.lang.Object)
 at org.apache.tomcat.util.net.NioEndpoint$Acceptor.run(NioEndpoint.java:443)
 at java.lang.Thread.run(Unknown Source)

"http-nio-8080-ClientPoller-1" #20 daemon prio=5 os_prio=0 tid=0x000000001ac07800 nid=0x12b8 runnable [0x000000002439f000]
 java.lang.Thread.State: RUNNABLE
 at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
 at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(Unknown Source)
 at sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(Unknown Source)
 at sun.nio.ch.WindowsSelectorImpl.doSelect(Unknown Source)
 at sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)
 - locked <0x00000000e4d221b0> (a sun.nio.ch.Util$3)
 - locked <0x00000000e4d221a0> (a java.util.Collections$UnmodifiableSet)
 - locked <0x00000000e4d22040> (a sun.nio.ch.WindowsSelectorImpl)
 at sun.nio.ch.SelectorImpl.select(Unknown Source)
 at org.apache.tomcat.util.net.NioEndpoint$Poller.run(NioEndpoint.java:775)
 at java.lang.Thread.run(Unknown Source)

"http-nio-8080-ClientPoller-0" #19 daemon prio=5 os_prio=0 tid=0x000000001ac0d000 nid=0x2a8c runnable [0x000000002429f000]
 java.lang.Thread.State: RUNNABLE
 at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
 at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(Unknown Source)
 at sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(Unknown Source)
 at sun.nio.ch.WindowsSelectorImpl.doSelect(Unknown Source)
 at sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)
 - locked <0x00000000e4d25e00> (a sun.nio.ch.Util$3)
 - locked <0x00000000e4d25df0> (a java.util.Collections$UnmodifiableSet)
 - locked <0x00000000e4d25c90> (a sun.nio.ch.WindowsSelectorImpl)
 at sun.nio.ch.SelectorImpl.select(Unknown Source)
 at org.apache.tomcat.util.net.NioEndpoint$Poller.run(NioEndpoint.java:775)
 at java.lang.Thread.run(Unknown Source)

"NioBlockingSelector.BlockPoller-1" #18 daemon prio=5 os_prio=0 tid=0x000000001ac0b800 nid=0x12a0 runnable [0x000000002419e000]
 java.lang.Thread.State: RUNNABLE
 at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
 at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(Unknown Source)
 at sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(Unknown Source)
 at sun.nio.ch.WindowsSelectorImpl.doSelect(Unknown Source)
 at sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)
 - locked <0x00000000e4d2a6f0> (a sun.nio.ch.Util$3)
 - locked <0x00000000e4d2a6e0> (a java.util.Collections$UnmodifiableSet)
 - locked <0x00000000e4d2a590> (a sun.nio.ch.WindowsSelectorImpl)
 at sun.nio.ch.SelectorImpl.select(Unknown Source)
 at org.apache.tomcat.util.net.NioBlockingSelector$BlockPoller.run(NioBlockingSelector.java:339)

"Tomcat JDBC Pool Cleaner[791452441:1492674713173]" #17 daemon prio=5 os_prio=0 tid=0x000000001a5ec800 nid=0x2478 in Object.wait() [0x0000000020a1f000]
 java.lang.Thread.State: TIMED_WAITING (on object monitor)
 at java.lang.Object.wait(Native Method)
 at java.util.TimerThread.mainLoop(Unknown Source)
 - locked <0x0000000081412b20> (a java.util.TaskQueue)
 at java.util.TimerThread.run(Unknown Source)

"container-0" #16 prio=5 os_prio=0 tid=0x0000000018f8e000 nid=0x1c9c waiting on condition [0x00000000207af000]
 java.lang.Thread.State: TIMED_WAITING (sleeping)
 at java.lang.Thread.sleep(Native Method)
 at org.apache.catalina.core.StandardServer.await(StandardServer.java:427)
 at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer$1.run(TomcatEmbeddedServletContainer.java:174)

"ContainerBackgroundProcessor[StandardEngine[Tomcat]]" #15 daemon prio=5 os_prio=0 tid=0x0000000019690000 nid=0x15a4 waiting on condition [0x00000000206af000]
 java.lang.Thread.State: TIMED_WAITING (sleeping)
 at java.lang.Thread.sleep(Native Method)
 at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1355)
 at java.lang.Thread.run(Unknown Source)

"Service Thread" #9 daemon prio=9 os_prio=0 tid=0x0000000018cf8800 nid=0x2500 runnable [0x0000000000000000]
 java.lang.Thread.State: RUNNABLE

"C1 CompilerThread2" #8 daemon prio=9 os_prio=2 tid=0x0000000018c86000 nid=0x275c waiting on condition [0x0000000000000000]
 java.lang.Thread.State: RUNNABLE

"C2 CompilerThread1" #7 daemon prio=9 os_prio=2 tid=0x000000001766d800 nid=0x27e8 waiting on condition [0x0000000000000000]
 java.lang.Thread.State: RUNNABLE

"C2 CompilerThread0" #6 daemon prio=9 os_prio=2 tid=0x000000001766a800 nid=0x21e0 waiting on condition [0x0000000000000000]
 java.lang.Thread.State: RUNNABLE

"Attach Listener" #5 daemon prio=5 os_prio=2 tid=0x0000000017669000 nid=0x528 waiting on condition [0x0000000000000000]
 java.lang.Thread.State: RUNNABLE

"Signal Dispatcher" #4 daemon prio=9 os_prio=2 tid=0x0000000017668800 nid=0x2a60 runnable [0x0000000000000000]
 java.lang.Thread.State: RUNNABLE

"Finalizer" #3 daemon prio=8 os_prio=1 tid=0x00000000175fa800 nid=0x1e6c in Object.wait() [0x000000001897f000]
 java.lang.Thread.State: WAITING (on object monitor)
 at java.lang.Object.wait(Native Method)
 - waiting on <0x0000000080bbf448> (a java.lang.ref.ReferenceQueue$Lock)
 at java.lang.ref.ReferenceQueue.remove(Unknown Source)
 - locked <0x0000000080bbf448> (a java.lang.ref.ReferenceQueue$Lock)
 at java.lang.ref.ReferenceQueue.remove(Unknown Source)
 at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)

"Reference Handler" #2 daemon prio=10 os_prio=2 tid=0x00000000015bf000 nid=0x254c in Object.wait() [0x000000001887e000]
 java.lang.Thread.State: WAITING (on object monitor)
 at java.lang.Object.wait(Native Method)
 - waiting on <0x0000000080b2dda8> (a java.lang.ref.Reference$Lock)
 at java.lang.Object.wait(Unknown Source)
 at java.lang.ref.Reference.tryHandlePending(Unknown Source)
 - locked <0x0000000080b2dda8> (a java.lang.ref.Reference$Lock)
 at java.lang.ref.Reference$ReferenceHandler.run(Unknown Source)

"VM Thread" os_prio=2 tid=0x00000000175d7800 nid=0x2600 runnable 

"GC task thread#0 (ParallelGC)" os_prio=0 tid=0x00000000014e7000 nid=0x1ca0 runnable 

"GC task thread#1 (ParallelGC)" os_prio=0 tid=0x00000000014e8800 nid=0x1428 runnable 

"GC task thread#2 (ParallelGC)" os_prio=0 tid=0x00000000014ea000 nid=0x1950 runnable 

"GC task thread#3 (ParallelGC)" os_prio=0 tid=0x00000000014ec800 nid=0x10cc runnable 

"VM Periodic Task Thread" os_prio=2 tid=0x0000000018d55800 nid=0xaec waiting on condition 

JNI global references: 288

FinalizerとReference HandlerのオブジェクトIDが同じなのはそんなものらしい。

Springのエラー

java.lang.IllegalStateException: Neither BindingResult nor plain target object for bean name 'reservationForm' available as request attribute
 at org.springframework.web.servlet.support.BindStatus.<init>(BindStatus.java:144) ~[spring-webmvc-4.3.7.RELEASE.jar:4.3.7.RELEASE]
 at org.thymeleaf.spring4.util.FieldUtils.getBindStatusFromParsedExpression(FieldUtils.java:401) ~[thymeleaf-spring4-2.1.5.RELEASE.jar:2.1.5.RELEASE]
 at org.thymeleaf.spring4.util.FieldUtils.getBindStatus(FieldUtils.java:328) ~[thymeleaf-spring4-2.1.5.RELEASE.jar:2.1.5.RELEASE]
 at org.thymeleaf.spring4.util.FieldUtils.getBindStatus(FieldUtils.java:294) ~[thymeleaf-spring4-2.1.5.RELEASE.jar:2.1.5.RELEASE]
 
Spring徹底入門の写経をしていたら上記のエラー。
reservationFormがAttributeとしてバインドできないといっているっぽい。

見直すとコントローラーでの@ModelAttributeの設定漏れ。