【发布时间】:2012-09-21 22:53:51
【问题描述】:
我正在实现 AbstractFactory 模式,允许外部人员创建工厂。我正在从属性文件中读取工厂实现名称,加载工厂类并使用它来构造对象。问题是,当我尝试创建任务对象时,在我的工厂实现中的某个地方出现以下错误:
线程“Thread-1”java.lang.ClassFormatError 中的异常:代码 类文件中的段长度错误 com/testsuite/loadperformancetesterusage/tasks/GetUrl
下面是 GetUrl 构造函数,没什么花哨的!
public GetUrl( String protocol, String port, String hostname, String path, String producerClassName ) {
super(producerClassName);
this.protocol = protocol;
this.hostname = hostname;
this.port = port;
this.path = path;
}
对这里可能发生的事情有任何反馈吗?交叉发帖here
【问题讨论】:
标签: classloader abstract-factory classformaterror