项目场景:

提示:这里简述项目相关背景:

若依vue-plus版本项目在启动的时候报错,JDK使用的是17,启动的时候报错如下
Java HotSpot™ 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.

问题描述

具体报错如下:

D:\Java\jdk17.0.12\bin\java.exe -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:56947,suspend=y,server=n -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -javaagent:C:\Users\Administrator\AppData\Local\JetBrains\IntelliJIdea2021.3\captureAgent\debugger-agent.jar=file:/C:/Users/Administrator/AppData/Local/Temp/capture18435.props -Dfile.encoding=UTF-8 @C:\Users\Administrator\AppData\Local\Temp\idea_arg_file971555315 org.dromara.DromaraApplication
Java HotSpot(TM) 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.
Connected to the target VM, address: '127.0.0.1:56947', transport: 'socket'
错误: 找不到或无法加载主类 org.dromara.DromaraApplication
原因: java.lang.ClassNotFoundException: org.dromara.DromaraApplication
Disconnected from the target VM, address: '127.0.0.1:56947', transport: 'socket'

Process finished with exit code 1

解决方案:

根据提示,将Modify options中的Disable launch optimization选中
在这里插入图片描述
在这里插入图片描述

然后重新启动,结果还是报错,报错如下:

D:\Java\jdk17.0.12\bin\java.exe -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:57631,suspend=y,server=n -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -javaagent:C:\Users\Administrator\AppData\Local\JetBrains\IntelliJIdea2021.3\captureAgent\debugger-agent.jar=file:/C:/Users/Administrator/AppData/Local/Temp/capture6.props -Dfile.encoding=UTF-8 @C:\Users\Administrator\AppData\Local\Temp\idea_arg_file857300947 org.dromara.DromaraApplication
Connected to the target VM, address: '127.0.0.1:57631', transport: 'socket'
错误: 找不到或无法加载主类 org.dromara.DromaraApplication
原因: java.lang.ClassNotFoundException: org.dromara.DromaraApplication
Disconnected from the target VM, address: '127.0.0.1:57631', transport: 'socket'

Process finished with exit code 1

解决方案:

项目路径中含有中文,将中文改成英文,成功启动!

2025-01-23 10:22:45 [main] INFO  o.d.s.runner.SystemApplicationRunner
 - 初始化OSS配置成功
  ______                  _  __       _____      __        
.' ____ \                (_)[  |     |_   _|    [  |       
| (___ \_| _ .--.  ,--.  __  | |       | | .--.  | |.--.   
 _.____`. [ `.-. |`'_\ :[  | | |   _   | / .'`\ \| '/'`\ \ 
| \____) | | | | |// | |,| | | |  | |__' | \__. ||  \__/ | 
 \______.'[___||__]'-;__[___|___] `.____.''.__.'[__;.__.'  
:: Snail Job ::                                 (v1.1.2)  

2025-01-23 10:22:45 [main] INFO  c.a.s.c.c.init.SnailJobStartListener
 - snail-job client is preparing to start... v1.1.2
2025-01-23 10:22:45 [Thread-5] INFO  c.a.s.c.c.r.s.SnailNettyHttpServer
 - ------> snail-job client remoting server start success, nettype = com.aizuda.snailjob.client.common.rpc.server.SnailNettyHttpServer, port = 28080
2025-01-23 10:22:45 [main] ERROR c.a.s.c.c.r.c.NettyHttpConnectClient
 - connect error:Connection refused: no further information: /127.0.0.1:17888
2025-01-23 10:22:46 [main] INFO  c.a.s.c.c.init.SnailJobStartListener
 - snail-job client started successfully v1.1.2
(♥◠‿◠)ノ゙  RuoYi-Vue-Plus启动成功   ლ(´ڡ`ლ)
Logo

中国智能体开发者社区,聚焦智能体与大模型开发,提供前沿资讯、实用工具链、开源项目及行业案例。通过技术沙龙、开发者大赛等活动,促进经验交流与协作,助力开发者快速构建创新智能应用。

更多推荐