yahoo / egads

A Java package to automatically detect anomalies in large scale time-series data
Other
1.17k stars 331 forks source link

ClassNotFoundException #51

Open sashaankadibhatla opened 6 years ago

sashaankadibhatla commented 6 years ago

i installed the latest version of java JDK and maven on win10, then i successfully compiled using command mvn clean compile assembly:single, but when i type this java -Dlog4j.configurationFile=src/test/resources/log4j2.xml -cp target/egads-*-jar-with-dependencies.jar com.yahoo.egads.Egads src/test/resources/sample_config.ini src/test/resources/sample_input.csv an error occurs: Error: Could not find or load main class com.yahoo.egads.Egads Caused by: java.lang.ClassNotFoundException: com.yahoo.egads.Egads

jigs1993 commented 6 years ago

I think this might be your class-path entry in MANIFEST.MF, can you try specifying main class file com.yahoo.egads.Egads in pom.xml and build again

sashaankadibhatla commented 6 years ago

i modified the code in pom.xml , build is succeeded but the command after running shows same exeption

jichmi commented 6 years ago

To access this project you can run:

'java -Dlog4j.configurationFile=src/test/resources/log4j2.xml -cp target/egads-*-jar-with-dependencies.jar;target/classes com.yahoo.egads.Egads src/test/resources/sample_config.ini src/test/resources/sample_input.csv'

but when i type this command other exception occurred:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/logging/log4j/LogManager at com.yahoo.egads.models.tsmm.TimeSeriesAbstractModel.(TimeSeriesAbstractModel.java:34) at java.base/java.lang.Class.forName0(Native Method) at java.base/java.lang.Class.forName(Unknown Source) at com.yahoo.egads.control.ProcessableObjectFactory.buildTSModel(ProcessableObjectFactory.java:59) at com.yahoo.egads.control.ProcessableObjectFactory.create(ProcessableObjectFactory.java:26) at com.yahoo.egads.utilities.FileInputProcessor.processInput(FileInputProcessor.java:30) at com.yahoo.egads.Egads.main(Egads.java:57) Caused by: java.lang.ClassNotFoundException: org.apache.logging.log4j.LogManager at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source) at java.base/java.lang.ClassLoader.loadClass(Unknown Source) ... 7 more

Maybe there are some setting need to be modified