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

Errors when testing DCNS #10

Open
sharlec opened this issue May 3, 2022 · 15 comments
Open

Errors when testing DCNS #10

sharlec opened this issue May 3, 2022 · 15 comments

Comments

@sharlec
Copy link

sharlec commented May 3, 2022

Hi,
I am trying to make the ifogsim and ifogsim2 running. They both have the same error messages as:

Starting DCNS...
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
The constructor AppModule(int, String, String, int, double, int, long, long, String, CloudletScheduler, Map<Pair<String,String>,SelectivityModel>) refers to the missing type Pair
Pair cannot be resolved to a type

at ifogsim_1/org.fog.application.Application.addAppModule(Application.java:65)
at ifogsim_1/org.fog.test.perfeval.DCNSFog.createApplication(DCNSFog.java:233)
at ifogsim_1/org.fog.test.perfeval.DCNSFog.main(DCNSFog.java:68)

I am using JDK13.0.2.

@Samodhap
Copy link
Collaborator

Samodhap commented May 4, 2022

Hi,
AppModule class uses the Pair implementation available in "org.apache.commons.math3.util.Pair". So please make sure to add all the the external libraries in the "JARs" Folder (https://github.com/Cloudslab/iFogSim/tree/main/jars) to your project when running.
Hope this helps.

@sharlec
Copy link
Author

sharlec commented May 4, 2022

Hi,

Thanks for mentioning the libraries. I just double checked my external libraries and I realized that I forget to unzip the common_math.jar.

However, after unzip the jars and have the same library setting as tutorial https://www.youtube.com/watch?v=uqg7TcOQS5Q,

I get a new error showing as:
The archive: /ifogsim_1/jars/commons-math3-3.5-javadoc.jar which is referenced by the classpath, does not exist.

What is the commons-math3-3.5-javadoc.jar? it is not in the tutorial but in a folder.

@sharlec
Copy link
Author

sharlec commented May 4, 2022

I also noticed that some test cases work, but some do not.

In the test.perfeval folder, if I run DCNSFog.java or TranslationService then the previous errors show up; if i run microserviceAppSample2.java, TwoApps.java or VRGameFog.java then they work as expected.

@Samodhap
Copy link
Collaborator

Samodhap commented May 4, 2022

Hi,
i guess your class path refers to a different jar.
https://github.com/Cloudslab/iFogSim/tree/main/jars/commons-math3-3.5
The jar inside this folder is the one it should be referring to.

@sharlec
Copy link
Author

sharlec commented May 4, 2022

thanks for quick response. I just double check my files and I am sure the class path refer to the file in the mentioned folder.

@Samodhap
Copy link
Collaborator

Samodhap commented May 4, 2022

Hi, To assist further with this, would it be possible to post screenshots of your class path libraries either from run configurations or the project structure ?

@sharlec
Copy link
Author

sharlec commented May 4, 2022

image

@Samodhap
Copy link
Collaborator

Samodhap commented May 4, 2022

Please try removing commons-math3-3.5-javadoc.jar in your classpath and running again
166620104-0022f72c-7ec3-46ca-a416-1a42ed26fcf7
.

@sharlec
Copy link
Author

sharlec commented May 4, 2022

That is the extra jre in the folder and once remove it, the error message is gone.

However, the DCNS file is still not working. I tested all other samples in the test.perfeval folder, all other files either work or missing input files(reasonable), but DCNS give me the error message:

Error: Could not find or load main class org.fog.test.perfeval.DCNSFog
Caused by: java.lang.ClassNotFoundException: org.fog.test.perfeval.DCNSFog

This should not happen as the main function starts in line 52

@Samodhap
Copy link
Collaborator

Samodhap commented May 4, 2022

Doing a clean build might help solve it.

@sharlec
Copy link
Author

sharlec commented May 4, 2022

I just clean build, did not work; I also remove all files and re-downloaded them from Github again, with proper JRE configurations. The error is still there.

@Samodhap
Copy link
Collaborator

Samodhap commented May 4, 2022

Sorry to hear that. Please try following all the instructions in the Readme. The software has been tested and should work properly. (https://github.com/Cloudslab/iFogSim/blob/main/README.md)

@sharlec
Copy link
Author

sharlec commented May 4, 2022

Thanks for the assistance. I did follow the readme instructions, and the ifogsim seems working well just other than the DCSNs file. I guess I may ignore some details in the configuration. I will keep trying. Thank you!

@Inzark
Copy link

Inzark commented Dec 7, 2023

@paghikia
Copy link

i have these problem too but i can't solved them
Screenshot 2024-01-11 at 5 14 49 PM

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

4 participants