java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at org.directwebremoting.util.VersionUtil.loadProperties(VersionUtil.java:119)
看了下源代码,会读取dwr-version.properties文件,这个在dwr.jar中。
使用eclipse,原来是因为没有把这个jar放到lib目录下,放到WEB-INF\lib目录下就可以了。
InputStream in = LocalUtil.getInternalResourceAsStream("/dwr-version.properties");
Properties props = new Properties();
props.load(in);
major = Integer.parseInt(props.getProperty("major"));
minor = Integer.parseInt(props.getProperty("minor"));
revision = Integer.parseInt(props.getProperty("revision"));
String buildString = props.getProperty("bamboo.build.number");
if ((null != buildString) && (buildString.length() > 0))
build = Integer.parseInt(props.getProperty("bamboo.build.number"));
title = props.getProperty("title");
if (title.length() == 0) { label = major + "." + minor + "." + revision; } else if (build > -1) { label = major + "." + minor + "." + revision + "-" + title + "-" + build; } else { label = major + "." + minor + "." + revision + "-" + title; }