接上回书,成功连接上vPiEn后,down代码,起代码……额,在起代码时又出现了问题。

问题

主要是这几句:
Unable to start web server;
nested exception is java.lang.IllegalStateException:
Unable to create the directory [/Users/liming/Downloads/logs/tomcat_log] to use as the base directory

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2020-04-12 10:24:37,648 [ERROR] [main] [org.springframework.boot.SpringApplication] - Application run failed
org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is java.lang.IllegalStateException: Unable to create the directory [/Users/liming/Downloads/logs/tomcat_log] to use as the base directoryat org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:155) ~[spring-boot-2.1.6.RELEASE.jar:2.1.6.RELEASE]at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) ~[spring-boot-2.1.6.RELEASE.jar:2.1.6.RELEASE]at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:742) [spring-boot-2.1.6.RELEASE.jar:2.1.6.RELEASE]at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:389) [spring-boot-2.1.6.RELEASE.jar:2.1.6.RELEASE]at org.springframework.boot.SpringApplication.run(SpringApplication.java:311) [spring-boot-2.1.6.RELEASE.jar:2.1.6.RELEASE]at org.springframework.boot.SpringApplication.run(SpringApplication.java:1213) [spring-boot-2.1.6.RELEASE.jar:2.1.6.RELEASE]at org.springframework.boot.SpringApplication.run(SpringApplication.java:1202) [spring-boot-2.1.6.RELEASE.jar:2.1.6.RELEASE]at com.yhdx.agbweapp.WeappApplication.main(WeappApplication.java:96) [classes/:na]
Caused by: java.lang.IllegalStateException: Unable to create the directory [/Users/liming/Downloads/logs/tomcat_log] to use as the base directoryat org.apache.catalina.startup.Tomcat.initBaseDir(Tomcat.java:816) ~[tomcat-embed-core-9.0.21.jar:9.0.21]at org.apache.catalina.startup.Tomcat.getServer(Tomcat.java:625) ~[tomcat-embed-core-9.0.21.jar:9.0.21]at org.apache.catalina.startup.Tomcat.getService(Tomcat.java:558) ~[tomcat-embed-core-9.0.21.jar:9.0.21]at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:169) ~[spring-boot-2.1.6.RELEASE.jar:2.1.6.RELEASE]at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:179) ~[spring-boot-2.1.6.RELEASE.jar:2.1.6.RELEASE]at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:152) ~[spring-boot-2.1.6.RELEASE.jar:2.1.6.RELEASE]... 8 common frames omitted
原因

自己电脑是没有这个目录的,也或许是因为SIP安全机制,idea也没有办法在电脑上创建个此目录,所以报错了。解决办法就是找个已存在的目录即可。

解决

全局搜“/Users/liming/Downloads”,找到dev环境的配置文件,将“liming”改为自己的电脑用户名就可以啦

比如我的改为“/Users/wangziyue/Downloads”就能运行成功啦。不过要注意,git提交代码时,不要提交上去。

“Unable to create the directory [XXX] to use as the base directory”的解决办法相关推荐

  1. [08001] Could not create connection to database server. Attempted reconnect 3 times. Giving up.解决办法

    pycharm中database连接MySQL数据库时出现如下提示: [08001] Could not create connection to database server. Attempted ...

  2. Vue中报“Duplicate keys detected: ‘xxx‘. This may cause an update error.”的解决办法

    在Vue中遇到"Duplicate keys detected: 'xxx'. This may cause an update error."这样的错误提示,最有用的解决办法,亲 ...

  3. [git]fatal: unable to read config file 'xxx/.gitconfig': No such file or directory

    2019独角兽企业重金招聘Python工程师标准>>> git config --global --list fatal: unable to read config file ' ...

  4. Unable to install breakpoint in XXX due to missing line number attributes的解决

    Eclipse下Debug时弹出错误"Unable to install breakpoint due to missing line number attributes,Modify co ...

  5. sublime text 打开总是弹框报错Unable to download XXX. Please view the console for more details.解决办法

    Preferences >Package Settings > Package Control > Settings - User 添加代码 "debug": t ...

  6. error:src refspec xxx does not match any的原因及解决办法

    往项目团队里push代码的时候遇到了这个报错.执行的命令: git push --set-upstream origin xxx xxx是我的远程分支名.这条命令的作用是将我的本地分支与远程分支进行关 ...

  7. warning: xxx, needed by ..yyy, not found 问题可能解决办法

    今天在编译某开源软件,提示RT警告,查了下,发现如下办法可以解决: 先找到xxx的位置zzz 在编译选项中添加该位置:-rpath zzz 举例:LDFLAGS    += -rpath zzz 好像 ...

  8. unable to read local cache ‘C:\\Users\\admin/gensim-data\\information.json‘ during fallback 解决办法

    1.打开一个新的notepad++页面,复制下面这段话 { "corpora": {"semeval-2016-2017-task3-subtaskBC": { ...

  9. initialization of 'XXX' is skipped by 'case' label 原因及解决办法

    出错代码段: switch (t)  {  case 0:   int a = 0;   break;  default:   break;  } 编译时提示:"error C2361: i ...

最新文章

  1. 操作系统 地址 概念
  2. jBPM 流程设计器和查看【包括Web形式】的总结
  3. React入门---事件与数据的双向绑定-9
  4. android覆盖扩散动画,[Android]多层波纹扩散动画——自定义View绘制
  5. nc 结合htc hts 反弹shell(内网代理环境下)
  6. pandas滑动窗口滑动整个dataframe
  7. 完美解决ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
  8. 惰性函数定义模式 网页设计
  9. salesforce 零基础学习(六十八)http callout test class写法
  10. ubuntu 安装、卸载重装mysql 8.0
  11. [synergy]两台机器公用键盘鼠标
  12. 重构Webpack系列之四 ---- Loaders
  13. 蓝牙音箱CSR芯片系列解密
  14. Navicat 15 premium手动备份数据库步骤
  15. element 源码学习五 —— Notice 系列组件学习
  16. 【USACO题库】5.2.1 Snail Trails蜗牛的旅行
  17. StringBuffer去掉最后一个字符
  18. python爬虫验证码的识别
  19. 石头机器人拖地水量调节_用石头扫地机器人扫地拖地是一种什么体验
  20. 74ls163是同步清零吗_74LS163是具有同步清零功能的十六进制计数器,要

热门文章

  1. 黑桃k游戏java实战_#Java小案例 扑克牌小游戏
  2. C#安装Newtonsoft.Json并调用
  3. filters与v-html联合使用(uni-app代码被编译,节点照样不能被正常渲染:解决)
  4. 还不知道 Puppeteer 的注意了,它能干大事
  5. 【Dungeon Hunter 3】地牢猎手3 v1.0.8 GameLoft最新动作游戏大作 免wifi验证
  6. Jenkins自动化部署阿里云K8s
  7. 常见CAD/CAM控件大全
  8. IOS 如何排除闪退和内存泄漏问题
  9. 【IT软件专利】---专利编写步骤
  10. 主题:分享一个靠谱的免费论文查重网站