下载及基本配置参考博客:
https://blog.csdn.net/hudie_1993/article/details/78186970
1、本机jboss无法启动,运行启动脚本后闪退,eclipse中启动正常,启动页能出来;
原因:环境变量有问题,要单独配置环境变量,不要在系统变量中直接配置。

image.png
2、Unsupported major.minor version 52.0;
15:55:17,364 WARN [org.jboss.modules] (MSC service thread 1-6) Failed to define class com.servlet.redirect.PolicyHolderRedirect in Module "deployment.cpictrans.war:main" from Service Module Loader: java.lang.UnsupportedClassVersionError: com/servlet/redirect/PolicyHolderRedirect : Unsupported major.minor version 52.0
原因:执行代码的jdk版本低于编译的jdk版本,jdk版本对应关系如下:
J2SE 8 = 52,
J2SE 7 = 51,
J2SE 6.0 = 50,
J2SE 5.0 = 49,
JDK 1.4 = 48,
JDK 1.3 = 47,
JDK 1.2 = 46,
JDK 1.1 = 45
eclipse--project--clean
3、Address already in use;
JBAS014777: Services which failed to start: service jboss.remoting.server.management: org.jboss.msc.service.StartException in service jboss.remoting.server.management: JBAS017112: Address already in use: bind localhost/127.0.0.1:9999
原因:端口重复,可以修改端口,也可以找到所重复端口的服务,直接kill掉 。
查看端口:netstat -an|grep 9999
netstat -ano | findstr "80"
杀掉端口:进入任务管理器关闭进程
4、Not installing optional component com.servlet.redirect.PolicyHolderRedirect ;
09:10:27,367 WARN [org.jboss.as.ee] (MSC service thread 1-8) JBAS011006: Not installing optional component com.servlet.redirect.PolicyHolderRedirect due to exception: java.lang.ClassNotFoundException: com.servlet.redirect.PolicyHolderRedirect from [Module "deployment.cpictrans.war:main" from Service Module Loader]
原因:PolicyHolderRedirect 类有问题,需要检查类PolicyHolderRedirect ,可能代码有问题,也可能依赖的包有问题,比如这次是因为依赖的servlet包有问题:

image.png
5、Received an invalid message length;
09:10:30,181 ERROR [org.jboss.remoting.remote.connection] (Remoting "dell-pc:MANAGEMENT" read-1) JBREM000200: Remote connection failed: java.io.IOException: Received an invalid message length of 1195725856
09:10:30,206 ERROR [org.jboss.remoting.remote.connection] (Remoting "dell-pc:MANAGEMENT" read-1) JBREM000200: Remote connection failed: java.io.IOException: Received an invalid message length of 1195725856
09:10:32,455 ERROR [org.jboss.remoting.remote.connection] (Remoting "dell-pc:MANAGEMENT" read-1) JBREM000200: Remote connection failed: java.io.IOException: Received an invalid message length of 1195725856
09:10:32,462 ERROR [org.jboss.remoting.remote.connection] (Remoting "dell-pc:MANAGEMENT" read-1) JBREM000200: Remote connection failed: java.io.IOException: Received an invalid message length of 1195725856
09:10:34,709 ERROR [org.jboss.remoting.remote.connection] (Remoting "dell-pc:MANAGEMENT" read-1) JBREM000200: Remote connection failed: java.io.IOException: Received an invalid message length of 1195725856
09:10:34,720 ERROR [org.jboss.remoting.remote.connection] (Remoting "dell-pc:MANAGEMENT" read-1) JBREM000200: Remote connection failed: java.io.IOException: Received an invalid message length of 1195725856
此问题还未找出原因,留待以后进一步研究。