当我从DB2获得结果并尝试设置为noOfLocations属性时,出现以下错误。
Method "setNoOfLocations" with signature "(Ljava/lang/Integer;)V" is not applicable on this object以下代码显示了该问题。
我正在使用rs来设置值。
packDO.setNoOfLocations(rs.getInt("NO_LOC_PKG"));和
rs.getInt("NO_LOC_PKG") is returning 0和
NO_LOC_PKG is of datatype Integer in the DB并且使用setter方法的noOfLocations类型是,
private Integer noOfLocations; public void setNoOfLocations(Integer noOfLocations) { this.noOfLocations = noOfLocations; }When I am getting the result from the DB2 and trying to set to this attribute noOfLocations I am getting the following error.
Method "setNoOfLocations" with signature "(Ljava/lang/Integer;)V" is not applicable on this objectFollowing code shows the problem.
I am using rs to set the value.
packDO.setNoOfLocations(rs.getInt("NO_LOC_PKG"));and
rs.getInt("NO_LOC_PKG") is returning 0and
NO_LOC_PKG is of datatype Integer in the DBand noOfLocations type with setter method is,
private Integer noOfLocations; public void setNoOfLocations(Integer noOfLocations) { this.noOfLocations = noOfLocations; }最满意答案
您发布的错误消息表明它是与构建相关的问题,因为编译器和运行时错误通常不会通过其签名来描述方法。
确保您的构建是最新的,并且调试器可用的源与您正在运行的二进制文件的源相匹配。
根据您的构建系统,问题可能由以前的部分构建,文件的意外时间戳,复制/移动文件,崩溃的IDE,奇怪的构建系统等引起。
The error message you posted suggests that it's a build-related issue, as compiler and runtime errors don't generally describe methods by their signatures.
Make sure that your build is up-to-date and that the source available to your debugger matches the source of the binary you are running.
Depending on your build system, issues could result from previous partial builds, unexpected timestamps on files, copying/moving files, a crashed IDE, a quirky build system, etc.
更多推荐
发布评论