Unable to create tempDir. java.io.tmpdir is set to C:\WINDOWS\

gminnimk·2024년 6월 26일
0

문제 해결

목록 보기
3/18

tempDir을 생성하지 못 하는 오류가 발생 중인 상황.

Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
2024-06-26T21:34:34.496+09:00 ERROR 28628 --- [sixhundredbills] [           main] o.s.boot.SpringApplication               : Application run failed

org.springframework.context.ApplicationContextException: Unable to start web server
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:165) ~[spring-boot-3.3.0.jar:3.3.0]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:618) ~[spring-context-6.1.8.jar:6.1.8]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.3.0.jar:3.3.0]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) ~[spring-boot-3.3.0.jar:3.3.0]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456) ~[spring-boot-3.3.0.jar:3.3.0]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:335) ~[spring-boot-3.3.0.jar:3.3.0]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1363) ~[spring-boot-3.3.0.jar:3.3.0]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1352) ~[spring-boot-3.3.0.jar:3.3.0]
	at com.sparta.sixhundredbills.SixhundredBillsApplication.main(SixhundredBillsApplication.java:13) ~[main/:na]
Caused by: org.springframework.boot.web.server.WebServerException: Unable to create tempDir. java.io.tmpdir is set to C:\WINDOWS\
	at org.springframework.boot.web.server.AbstractConfigurableWebServerFactory.createTempDir(AbstractConfigurableWebServerFactory.java:221) ~[spring-boot-3.3.0.jar:3.3.0]
	at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:204) ~[spring-boot-3.3.0.jar:3.3.0]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:188) ~[spring-boot-3.3.0.jar:3.3.0]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:162) ~[spring-boot-3.3.0.jar:3.3.0]
	... 8 common frames omitted
Caused by: java.nio.file.AccessDeniedException: C:\WINDOWS\tomcat.8080.10000112885287224877
	at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:89) ~[na:na]
	at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103) ~[na:na]
	at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108) ~[na:na]
	at java.base/sun.nio.fs.WindowsFileSystemProvider.createDirectory(WindowsFileSystemProvider.java:521) ~[na:na]
	at java.base/java.nio.file.Files.createDirectory(Files.java:700) ~[na:na]
	at java.base/java.nio.file.TempFileHelper.create(TempFileHelper.java:134) ~[na:na]
	at java.base/java.nio.file.TempFileHelper.createTempDirectory(TempFileHelper.java:171) ~[na:na]
	at java.base/java.nio.file.Files.createTempDirectory(Files.java:1017) ~[na:na]
	at org.springframework.boot.web.server.AbstractConfigurableWebServerFactory.createTempDir(AbstractConfigurableWebServerFactory.java:215) ~[spring-boot-3.3.0.jar:3.3.0]
	... 11 common frames omitted
    




해결

실행 환경 변수에서 시스템 환경 변수 포함을 체크하여 실행 후 해당 오류 해결.

0개의 댓글