橙单后端项目下载编译遇到的问题与解决
创始人
2024-12-16 20:34:28
0

今天下载orange-admin项目,不过下载下来运行出现一些问题。

1、涉及到XMLStreamException的几个类都出现下面的错误

The package javax.xml.stream is accessible from more than one module: , java.xml

ctrl-shift-t 可以找到这个引入是哪些包里包括的,看到下面有一个xml-apis也包含了,应该需要去掉这个才行

运行工程,输入dependency:tree  如下:运行

运行出来后,搜索会出现

从上面可以看到poi-ooxml包含了这个,所以需要去掉这个,如下:

2、解决了编译问题,运行又出现下面问题

Unable to make field protected java.lang.reflect.InvocationHandler

INFO ] [2024-07-27 14:04:33] [main] ==> Started WebAdminApplication in 13.577 seconds (process running for 14.219) [ERROR] [2024-07-27 14:04:33] [main] ==> Application run failed java.lang.reflect.InaccessibleObjectException: Unable to make field protected java.lang.reflect.InvocationHandler java.lang.reflect.Proxy.h accessible: module java.base does not "opens java.lang.reflect" to unnamed module @125290e5 	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354) 	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297) 	at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:178) 	at java.base/java.lang.reflect.Field.setAccessible(Field.java:172) 	at cn.hutool.core.util.ReflectUtil.setAccessible(ReflectUtil.java:1122) 	at cn.hutool.core.util.ReflectUtil.getFieldValue(ReflectUtil.java:271) 	at cn.hutool.core.util.ReflectUtil.getFieldValue(ReflectUtil.java:239) 	at com.orangeforms.common.datafilter.interceptor.MybatisDataFilterInterceptor.loadInfoWithDataFilter(MybatisDataFilterInterceptor.java:97) 	at com.orangeforms.common.datafilter.listener.LoadDataFilterInfoListener.onApplicationEvent(LoadDataFilterInfoListener.java:23) 	at com.orangeforms.common.datafilter.listener.LoadDataFilterInfoListener.onApplicationEvent(LoadDataFilterInfoListener.java:1) 	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:174) 	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:167) 	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:145) 	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:445) 	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:378) 	at org.springframework.boot.context.event.EventPublishingRunListener.ready(EventPublishingRunListener.java:109) 	at org.springframework.boot.SpringApplicationRunListeners.lambda$ready$6(SpringApplicationRunListeners.java:80) 	at java.base/java.lang.Iterable.forEach(Iterable.java:75) 	at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:118) 	at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:112) 	at org.springframework.boot.SpringApplicationRunListeners.ready(SpringApplicationRunListeners.java:80) 	at org.springframework.boot.SpringApplication.run(SpringApplication.java:335) 	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306) 	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1295) 	at com.orangeforms.webadmin.WebAdminApplication.main(WebAdminApplication.java:21) [INFO ] [2024-07-27 14:04:33] [main] ==> Pausing ProtocolHandler ["http-nio-8082"]

看到相关使用 JDK17+ 版本时,需要为服务启动项 VM Options 添加选项 --add-opens java.base/java.lang.reflect=ALL-UNNAMED。

STS是在下面两个地方增加

1、是启动参数,在SpringToolSuite4.ini

增加--add-opens java.base/java.lang.reflect=ALL-UNNAMED,如下

2、同时需要再下面增加如下

这样就能正常运行了

相关内容

热门资讯

终于发现!微信炸金花购买房卡,... 微信游戏中心:炸金花房卡,添加微信【71319951】,进入游戏中心或相关小程序,搜索“微信炸金花房...
终于发现!微信群链接拼三张房卡... 微信游戏中心:拼三张房卡,添加微信【56001354】,进入游戏中心或相关小程序,搜索“微信拼三张房...
终于发现!微信里玩炸金花房卡在... 微信游戏中心:炸金花房卡,添加微信【66336574】,进入游戏中心或相关小程序,搜索“微信炸金花房...
终于发现!微信里面拼三张链接房... 微信游戏中心:拼三张房卡,添加微信【71319951】,进入游戏中心或相关小程序,搜索“微信拼三张房...
终于发现!微信斗牛房卡找谁买,... 微信游戏中心:斗牛房卡,添加微信【56001354】,进入游戏中心或相关小程序,搜索“微信斗牛房卡”...
终于发现!拼三张房卡专卖店联系... 微信游戏中心:拼三张房卡,添加微信【66336574】,进入游戏中心或相关小程序,搜索“微信拼三张房...
终于发现!创建斗牛链接房间房卡... 微信游戏中心:斗牛房卡,添加微信【71319951】,进入游戏中心或相关小程序,搜索“微信斗牛房卡”...
科普!微信里玩炸金花房卡在哪弄... 微信游戏中心:拼三张房卡,添加微信【55051770】,进入游戏中心或相关小程序,搜索“微信拼三张房...
科普!微信玩金花房卡在哪买,微... 微信游戏中心:牌九房卡,添加微信【33903369】,进入游戏中心或相关小程序,搜索“微信牌九房卡”...
科普!炸金花链接房卡如何购买,... 微信游戏中心:炸金花房卡,添加微信【8488009】,进入游戏中心或相关小程序,搜索“微信炸金花房卡...
科普!金花房卡如何购买,微信拼... 微信游戏中心:牛牛房卡,添加微信【55051770】,进入游戏中心或相关小程序,搜索“微信牛牛房卡”...
科普!微信里玩金花房卡如何买,... 微信游戏中心:牛牛房卡,添加微信【33903369】,进入游戏中心或相关小程序,搜索“微信牛牛房卡”...
科普!金花好友房卡哪里买,微信... 微信游戏中心:牌九房卡,添加微信【8488009】,进入游戏中心或相关小程序,搜索“微信牌九房卡”,...
科普!微信上打炸金花房卡怎么买... 微信游戏中心:炸金花房卡,添加微信【55051770】,进入游戏中心或相关小程序,搜索“微信炸金花房...
科普!微信炸金花房卡怎样开,牛... 微信游戏中心:炸金花房卡,添加微信【33903369】,进入游戏中心或相关小程序,搜索“微信炸金花房...
科普!炸金花房卡链接怎样购买,... 微信游戏中心:拼三张房卡,添加微信【8488009】,进入游戏中心或相关小程序,搜索“微信拼三张房卡...
科普!金花房间如何购买房卡,微... 微信游戏中心:牛牛房卡,添加微信【33903369】,进入游戏中心或相关小程序,搜索“微信牛牛房卡”...
科普!微信上炸金花房卡链接购买... 微信游戏中心:拼三张房卡,添加微信【8488009】,进入游戏中心或相关小程序,搜索“微信拼三张房卡...
科普!炸金花的房卡找谁买,微信... 微信游戏中心:拼三张房卡,添加微信【55051770】,进入游戏中心或相关小程序,搜索“微信拼三张房...
科普!炸金花链接房卡哪里买,牌... 微信游戏中心:炸金花房卡,添加微信【33903369】,进入游戏中心或相关小程序,搜索“微信炸金花房...