简体   繁体   English

关于哈德逊 Java 编译的问题

[英]Issue regarding Java Compilation in Hudson

Let say I have a Transformation class that extending a CommonDomain class.假设我有一个转换 class 扩展了一个 CommonDomain class。

and I create a DaoUtil just to inserting a default parameter for insert.我创建一个 DaoUtil 只是为了插入插入的默认参数。

public static void populateValuesForInsert(CommonDomain domain, Long userId)
{
    java.util.Date today = new java.util.Date();
    domain.setCreatedBy(userId);
    domain.setCreatedDate(today);
    domain.setUpdatedBy(userId);
    domain.setUpdatedDate(today);
}

public class Transformation  extends CommonDomain
{
    //private static final long serialVersionUID = -2800564185309854734L;
    private Long id;
    private Long scenarioType;
    private String description;
    //.... get set here ... 

}

public class CommonDomain implements Serializable 
{

    private static final long serialVersionUID = 1L;
    public static final Integer DEFAULT_BASELINE_ID = 0;

    public static final String DATE_FORMAT_DEFAULT = "MM/dd/yyyy";
    public static final String DATE_FORMAT_WITH_TIME = "MM/dd/yyyy HH:mm:ss";
    public long maxRowCount;
    private String roleName;
        private Date createdDate;
    private Date updatedDate;   
        private Long createdBy;
    private Long updatedBy;   
        //..get set here
}

when I run the JUnit Testing, it's working perfectly in local.当我运行 JUnit 测试时,它在本地运行良好。 However running the testing in Hudson resulting this error:但是在 Hudson 中运行测试会导致此错误:

populateValuesForInsert(com.domain.CommonDomain,java.lang.Long) in 
com.utils.DaoUtil
cannot be applied to (com.domain.Transformation,java.lang.Long)

I use JDK 1.5.0_14 in my Local and JDK 1.5.0_21 in my Hudson.我在本地使用 JDK 1.5.0_14,在 Hudson 使用 JDK 1.5.0_21。

Any idea why does this error happen?知道为什么会发生此错误吗?

I don't know Hudson's internals, but maybe there's some sort of cache which holds an old version of some of the class files.我不知道 Hudson 的内部结构,但也许有某种缓存保存了一些 class 文件的旧版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM