1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【問題解決】「Maven Clean」実行時に「Folder must not be a file」というエラーが発生

1
Last updated at Posted at 2017-12-31

環境

  • Eclipse Pleiades 4.7
  • Maven 3.3.9 (Eclipse pleiadesに組み込まれていたもの. EMBEDDED)
  • Java8
  • Spring Boot 1.5.7

問題発生

「Maven Clean」実行すると、以下のエラーが発生しました。

console
1,Conrad Treasury Place,William & George Streets,4001
2017-12-31 21:50:37.227  INFO 16216 --- [  restartedMain] sample.DemoApplication                   : Started DemoApplication in 3.816 seconds (JVM running for 4.333)
2017-12-31 21:50:44.601  INFO 16216 --- [nio-8081-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring FrameworkServlet 'dispatcherServlet'
2017-12-31 21:50:44.601  INFO 16216 --- [nio-8081-exec-1] o.s.web.servlet.DispatcherServlet        : FrameworkServlet 'dispatcherServlet': initialization started
2017-12-31 21:50:44.617  INFO 16216 --- [nio-8081-exec-1] o.s.web.servlet.DispatcherServlet        : FrameworkServlet 'dispatcherServlet': initialization completed in 16 ms
Exception in thread "File Watcher" java.lang.IllegalArgumentException: Folder must not be a file
	at org.springframework.util.Assert.isTrue(Assert.java:92)
	at org.springframework.boot.devtools.filewatch.FolderSnapshot.<init>(FolderSnapshot.java:55)
	at org.springframework.boot.devtools.filewatch.FileSystemWatcher$Watcher.getCurrentSnapshots(FileSystemWatcher.java:281)
	at org.springframework.boot.devtools.filewatch.FileSystemWatcher$Watcher.scan(FileSystemWatcher.java:254)
	at org.springframework.boot.devtools.filewatch.FileSystemWatcher$Watcher.run(FileSystemWatcher.java:239)
	at java.lang.Thread.run(Thread.java:748)

原因

Spring Bootが既に起動している状態で、「Maven Clean」を実行したことが原因でした。
エラーが出るのは当然かな。。。?

解決策

言うまでもなく、Spring Bootを停止してから、「Maven Clean」を実行することです。

参考にしたサイト

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?