新建的网站 采用jfinal-undertow 服务器模式 出现权限问题。
Starting JFinal 3.7 -> http://127.0.0.1:80
Info: jfinal-undertow 1.6, undertow 2.0.19.Final, jvm 10.0.1
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by net.sf.cglib.core.ReflectUtils$1 (file:/Users/zhangji/Documents/apache-maven-3.6.0/repostory/cglib/cglib-nodep/3.2.5/cglib-nodep-3.2.5.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of net.sf.cglib.core.ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
java.lang.RuntimeException: java.net.SocketException: Permission denied
at io.undertow.Undertow.start(Undertow.java:247)
at com.jfinal.server.undertow.UndertowServer.doStart(UndertowServer.java:271)
at com.jfinal.server.undertow.UndertowServer.start(UndertowServer.java:159)
at cn.jbolt.common.config.MainConfig.main(MainConfig.java:179)
Caused by: java.net.SocketException: Permission denied
at java.base/sun.nio.ch.Net.bind0(Native Method)
at java.base/sun.nio.ch.Net.bind(Net.java:433)
at java.base/sun.nio.ch.Net.bind(Net.java:425)
at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:225)
at java.base/sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at org.xnio.nio.NioXnioWorker.createTcpConnectionServer(NioXnioWorker.java:190)
at org.xnio.XnioWorker.createStreamConnectionServer(XnioWorker.java:243)
at io.undertow.Undertow.start(Undertow.java:193)
... 3 more
使用jfinal-jetty就没有问题。
windows系统下没问题,
就是我的mac电脑有问题,mac是最新的mojave系统。
myecplise和ecplise问题相同。
初步判断 和数据库没有关系,也在小木老师指导下对java目录和工作空间 chmod 777操作了,无效。 改为ipv4的参数 -Djava.net.preferIPv4Stack=true 也加过了 好像也没有效果。
请假mac作为开发的用户。