Skip to content

Troubleshooting Installation of PureEdgeSim: ClassNotFoundException #43

@khadija-djarraya

Description

@khadija-djarraya

I tried the following on an intel MacOS and a Windows.

  • JDK Version: 20
  • Apache Maven Version: 3.9.6

I installed git and maven, and followed the CLI steps to install PureEdgeSim.

git clone https://github.com/CharafeddineMechalikh/PureEdgeSim.git -> Done
cd PureEdgeSim (directory of the project)
mvn clean install -> BUILD SUCCESS
mvn exec:java -Dexec.mainClass="examples.Example1" -> BUILD FAILURE

This is the complete message received:


[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for com.mechalikh:pureedgesim:jar:5.2.0
[WARNING] 'dependencies.dependency.systemPath' for net.sourceforge.jFuzzyLogic:jFuzzyLogic:jar should not point at files within the project directory, ${project.basedir}/PureEdgeSim/libs/jFuzzyLogic_v3.0.jar will be unresolvable by dependent projects @ line 378, column 16
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO] 
[INFO] ---------------------< com.mechalikh:pureedgesim >----------------------
[INFO] Building PureEdgeSim 5.2.0
[INFO]   from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- exec:3.2.0:java (default-cli) @ pureedgesim ---
[WARNING] 
java.lang.ClassNotFoundException: examples.Example1
    at org.codehaus.mojo.exec.URLClassLoaderBuilder$ExecJavaClassLoader.loadClass (URLClassLoaderBuilder.java:181)
    at java.lang.ClassLoader.loadClass (ClassLoader.java:526)
    at org.codehaus.mojo.exec.ExecJavaMojo.doExec (ExecJavaMojo.java:371)
    at org.codehaus.mojo.exec.ExecJavaMojo.lambda$execute$0 (ExecJavaMojo.java:296)
    at java.lang.Thread.run (Thread.java:1583)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.836 s
[INFO] Finished at: 2024-03-28T16:32:18+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.2.0:java (default-cli) on project pureedgesim: An exception occurred while executing the Java class. examples.Example1 -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Please let me know if I am doing something wrong throughout this installation. I have also tried to install PureEdgeSim on IntelliJ and Eclipse using the steps provided in the README file, but I am still facing the same errors and I'm unable to resolve the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions