gpt4 book ai didi

运行程序时出现java.lang.NoSuchMethodError

转载 作者:行者123 更新时间:2023-11-29 07:53:46 25 4
gpt4 key购买 nike

我读过这个thread正如它所说,我必须有 public static void main(java.lang.String[] args)我的主要功能是这样的:

public static void main(String[] args) throws FileNotFoundException, IOException, TrieException, TSException  {
CSVReader reader=new CSVReader(new FileReader(".//Data//test1.csv"));
String[] nextline;
int linenumber=0;
double[] numbers=new double[10];
double[] times=new double[10];
for(int i=0;i<=7;i++)
{
nextline = reader.readNext();
numbers[i]= Double.parseDouble(nextline[0]);
times[i]=i;
}
DiscordsAndMotifs dr= edu.hawaii.jmotif.sax.SAXFactory.series2DiscordsAndMotifs(numbers, 4, 2, 2, 2,null);// If I comment this line of code, my programm works without any error

}

如果我运行我的程序,我得到这个错误:

Exception in thread "main" java.lang.NoSuchMethodError: org.hackystat.utilities.logger.HackystatLogger.getLogger(Ljava/lang/String;Ljava/lang/String;) Ljava/util/logging/Logger;
at edu.hawaii.jmotif.sax.SAXFactory.<clinit>(SAXFactory.java:51)
at motif.discovery.MotifDiscovery.main(MotifDiscovery.java:35)`

我的项目中有必需的库。这个错误的原因是什么?你能帮我解决这个问题吗?

最佳答案

听起来您正在使用的 hackystat-utilities 版本与构建 jmotif 所针对的版本不同 - 因此 jmotif jar 文件包含对执行时不存在的方法的引用。

我建议您找出 jmotif 库需要哪个版本的 hackystat-utilities,然后使用它。

关于运行程序时出现java.lang.NoSuchMethodError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19363850/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com