java程序直接运行没有问题,但是debug就有错误,求大佬解救!

毅豐 2018-08-31 11:06:57
java程序直接运行没有问题,但是debug就有错误,

在eclipse中debug,程序报错而且程序启动不起来,debug报错如下:
2018-08-31 21:54:29.083  INFO 3796 --- [           main] com.trs.dataMigration.Application        : Starting Application on DESKTOP-O3G834A with PID 3796 (started by ???S in E:\JavaTRS项目\dataMigrate)
2018-08-31 21:54:29.100 INFO 3796 --- [ main] com.trs.dataMigration.Application : No active profile set, falling back to default profiles: default
2018-08-31 21:54:29.211 INFO 3796 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@363affc0: startup date [Fri Aug 31 21:54:29 CST 2018]; root of context hierarchy
2018-08-31 21:54:33.139 INFO 3796 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [class org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$396b8d30] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-08-31 21:54:34.092 WARN 3796 --- [ 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 create tempDir. java.io.tmpdir is set to C:\Users\???S\AppData\Local\Temp\
2018-08-31 21:54:34.112 ERROR 3796 --- [ main] o.s.boot.SpringApplication : Application startup failed

org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to create tempDir. java.io.tmpdir is set to C:\Users\???S\AppData\Local\Temp\
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:133) ~[spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532) ~[spring-context-4.2.8.RELEASE.jar:4.2.8.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118) ~[spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:766) [spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE]
at org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:361) [spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) [spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1191) [spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1180) [spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE]
at com.trs.dataMigration.Application.main(Application.java:17) [classes/:na]
Caused by: org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to create tempDir. java.io.tmpdir is set to C:\Users\???S\AppData\Local\Temp\
at org.springframework.boot.context.embedded.AbstractEmbeddedServletContainerFactory.createTempDir(AbstractEmbeddedServletContainerFactory.java:183) ~[spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE]
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:156) ~[spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:160) ~[spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:130) ~[spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE]
... 8 common frames omitted
Caused by: java.io.IOException: 拒绝访问。
at java.io.WinNTFileSystem.createFileExclusively(Native Method) ~[na:1.7.0_67]
at java.io.File.createNewFile(File.java:1006) ~[na:1.7.0_67]
at java.io.File.createTempFile(File.java:1989) ~[na:1.7.0_67]
at java.io.File.createTempFile(File.java:2040) ~[na:1.7.0_67]
at org.springframework.boot.context.embedded.AbstractEmbeddedServletContainerFactory.createTempDir(AbstractEmbeddedServletContainerFactory.java:174) ~[spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE]
... 11 common frames omitted

求大佬解救!!!
...全文
650 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
独恋猫的鱼~ 2019-03-12
  • 打赏
  • 举报
回复
问题:用Java代码在c盘创建文件对象,运行显示java.io.IOException:拒绝访问 解决方法:换个磁盘创建文件:将c盘改成f盘,运行成功并在f盘创建文件
sk815 2019-03-11
  • 打赏
  • 举报
回复
2个问题 排查一下··一个是文件路径命名··一个是权限·· 当前用户是否有权限新建文件
  • 打赏
  • 举报
回复
IO异常 你检查一下 自己这个路径 最好保持都是英文的 C:\Users\???S\AppData\Local\Temp\
语末 2019-03-09
  • 打赏
  • 举报
回复
大佬,我也遇到了,能不能请教下你是怎么解决的啊

50,526

社区成员

发帖
与我相关
我的任务
社区描述
Java相关技术讨论
javaspring bootspring cloud 技术论坛(原bbs)
社区管理员
  • Java相关社区
  • 小虚竹
  • 谙忆
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧