IDEA的maven项目,怎么调试都是这个错误

IDEA的maven项目,调试不出来,运行时总是这个错误,没办法了,请各位大佬帮帮忙。
加粗部分都在网上搜过,没有解决。
1.搜索过这个错误Exception in thread "restartedMain" java.lang.reflect.InvocationTargetException,没有解决。
2. [ERROR] [ org.springframework.boot.SpringApplication at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
] - at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
Application run failed
也搜索过这个错误,还是不行。
Exception in thread "restartedMain" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)
Caused by: java.lang.IllegalStateException: Logback configuration error detected:
ERROR in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - Failed to create parent directories for [/home/demo/logs/admin/admin.log]
ERROR in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - openFile(/home/demo/logs/admin/admin.log,true) call failed. java.io.FileNotFoundException: /home/demo/logs/admin/admin.log (No such file or directory)

2020-04-15 22:02:28 at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:201)
[ERROR] [ org.springframework.boot.SpringApplication at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
] - at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
Application run failed
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
java.lang.IllegalStateException: Logback configuration error detected:
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127)
ERROR in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - Failed to create parent directories for [/home/demo/logs/admin/admin.log]
at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:75)
at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:54)
at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:347)
ERROR in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - openFile(/home/demo/logs/admin/admin.log,true) call failed. java.io.FileNotFoundException: /home/demo/logs/admin/admin.log (No such file or directory)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:306)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260)
at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:169)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248)
at com.prj.PrjApplication.main(PrjApplication.java:33)
at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithConventions(AbstractLoggingSystem.java:82)
... 5 more

2个回答

只贴异常不好判断呢,建议把项目结构,配置之类的文件贴出来,如果是学习项目方便的话代码上传到某个可访问的位置。

看异常从下往上看Failed to create parent directories for [/home/demo/logs/admin/admin.log],看这个错误应该是没有指定目录的写权限,看一下这个文章 https://my.oschina.net/zerzer/blog/3192573

weixin_44700117
-======- 回复weixin_46225519: /data是路径,你需要改成你要赋予权限的路径
6 个月之前 回复
weixin_46225519
weixin_46225519 这个试过了回车之后是这样的chmod: /data: No such file or directory
6 个月之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐