Cloudslab / iFogSim

The iFogSimToolkit (with its new release iFogSim2) for Modeling and Simulation of Resource Management Techniques in Internet of Things, Edge and Fog Computing Environments. In the new release Mobili Management, Microservice Management, and Dynamic Clustering mechanisms are added as new features.
142 stars 95 forks source link

Errors when testing DCNS #10

Open sharlec opened 2 years ago

sharlec commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

image

Samodhap commented 2 years ago

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

sharlec commented 2 years ago

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 commented 2 years ago

Doing a clean build might help solve it.

sharlec commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 11 months ago

follow steps here - it worked for me https://stackoverflow.com/questions/49520858/error-occurred-during-initialization-of-boot-layer-findexception-module-not-fou

paghikia commented 10 months ago

i have these problem too but i can't solved them

Screenshot 2024-01-11 at 5 14 49 PM
mkabeer24 commented 3 months ago

Why is this error so prominent, someone should give a comprehensive guide on how to install iFogSim properly all the responses and youtube videos are not addressing this particular error. Thank you

mkabeer24 commented 3 months ago

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

Were you able to fix this?

mkabeer24 commented 3 months ago

Why is this error so prominent, someone should give a comprehensive guide on how to install iFogSim properly all the responses and youtube videos are not addressing this particular error. Thank you

I installed the following:

  1. JDK 22
  2. Eclipse 2024-06 What could be the issue? Thanks
mkabeer24 commented 3 months ago

Why is this error so prominent, someone should give a comprehensive guide on how to install iFogSim properly all the responses and youtube videos are not addressing this particular error. Thank you

I installed the following:

  1. JDK 22
  2. Eclipse 2024-06 What could be the issue? Thanks

ifogsim error jre library ifogsim

mehuli12 commented 3 months ago

Hi,

I'm a student working on a project related to edge computing, and I recently came across your iFogSim tutorials on YouTube. I was really impressed by your expertise and wanted to reach out to see if you'd be open to a meeting to help me with some challenges I'm facing with Veins, OMNET++, and SUMO.

My project is focused on simulating traffic scenarios to demonstrate the benefits of deploying Fog devices for traffic management, specifically by reducing network latency to improve outcomes. I'm using the SUMO simulator to model these scenarios and compare different network latencies, as iFogSim doesn't support this directly. Before I can use iFogSim, I need to gather specific computational and network requirements, which I'm planning to do by implementing a traffic management application with SUMO and OMNET++, and then profiling the data for use in iFogSim simulations.

Right now, I'm mainly focusing on edge computing, but if time permits, I hope to use the profiling data from Veins, SUMO, and OMNET++ for iFogSim simulations later. However, I'm running into some errors with Veins and could really use your guidance. It would be great if we could set up a virtual meeting to discuss these issues in more detail. I'm not sure if you can help with Veins or the other software I'm working with, but any assistance would be greatly appreciated.

Thanks so much for your time, and I look forward to hearing from you!

Best regards, Mehuli

On Sun, 25 Aug 2024 at 09:36, mkabeer24 @.***> wrote:

Why is this error so prominent, someone should give a comprehensive guide on how to install iFogSim properly all the responses and youtube videos are not addressing this particular error. Thank you

I installed the following:

  1. JDK 22
  2. Eclipse 2024-06 What could be the issue? Thanks

ifogsim.error.jpg (view on web) https://github.com/user-attachments/assets/6b6ebf9c-f672-4861-a64f-07a5baa3d198 jre.library.ifogsim.jpg (view on web) https://github.com/user-attachments/assets/34a2e777-9de6-4a14-8c53-d7ab99c05d6c

— Reply to this email directly, view it on GitHub https://github.com/Cloudslab/iFogSim/issues/10#issuecomment-2308734224, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASUDNW63VLRKM733KCZWTYTZTGJSNAVCNFSM5VAKAWF2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMZQHA3TGNBSGI2A . You are receiving this because you commented.Message ID: @.***>

3603 commented 2 months ago

Why is this error so prominent, someone should give a comprehensive guide on how to install iFogSim properly all the responses and youtube videos are not addressing this particular error. Thank you

I installed the following:

  1. JDK 22
  2. Eclipse 2024-06 What could be the issue? Thanks

ifogsim error jre library ifogsim

I was facing same issue I deleted module-info.java file ... problem sloved image

mkabeer24 commented 2 months ago

I fixed it too, remove everything, register eclipse PATH, then everything worked.

3603 commented 2 months ago

I fixed it too, remove everything, register eclipse PATH, then everything worked.

ohh another method .. Thank you Hermano