异常描述:进入 管理首页 出现以下错误
An error has occurred.
For detailed error information, please see the HTML source code, and contact the forum Administrator.
java.lang.ArrayIndexOutOfBoundsException: 2
控制台出错信息如下:
AdminAction.java中
private void matchVersion(String latest)
{
String current = SystemGlobals.getValue(ConfigKeys.VERSION);
String[] currentParts = current.split("\\.");
String[] latestParts = latest.split("\\.");
if (currentParts[2].indexOf('-') > -1) {
currentParts[2] = currentParts[2].substring(0, currentParts[2].indexOf('-'));
}
if (Integer.parseInt(latestParts[2]) > Integer.parseInt(currentParts[2]) // Revision
|| Integer.parseInt(latestParts[1]) > Integer.parseInt(currentParts[1]) // Minor
|| Integer.parseInt(latestParts[0]) > Integer.parseInt(currentParts[0])) { // Major
this.context.put("upToDate", false);
}
else {
this.context.put("upToDate", true);
}
this.context.put("latestVersion", latest);
this.context.put("currentVersion", current);
this.context.put("developmentVersion", current.indexOf("-dev") > -1);
}
原因分析:
在配置文件SystemGlobals.properties做过了修改,改动了原来自带的相关配置项
jforum.version.url = http://www.jforum.net/latest_version.txt
改成了现在的
jforum.version.url = http://bbs.eworkday.net
解决方法:
做修改将
jforum.version.url = http://bbs.eworkday.net
改成
jforum.version.url = http://bbs.eworkday.net/latest_version.txt
latest_version.txt内容如下:
测试结果:
参考文章:
JForum 的错误页面中文乱码的问题