Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClassNotFoundException #51

Open
sashaankadibhatla opened this issue Jan 29, 2018 · 3 comments
Open

ClassNotFoundException #51

sashaankadibhatla opened this issue Jan 29, 2018 · 3 comments

Comments

@sashaankadibhatla
Copy link

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
Copy link
Contributor

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
Copy link
Author

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

@jichmi
Copy link

jichmi commented Jul 4, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants