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.
143 stars 96 forks source link

java null pointer exception #2

Closed mehbub160 closed 2 years ago

mehbub160 commented 2 years ago

I am getting the below error while running the java files using the mobility dataset

at org.fog.mobilitydata.DataParser.parseResourceData(DataParser.java:99) at org.fog.placement.LocationHandler.parseResourceInfo(LocationHandler.java:150) at org.fog.test.perfeval.CardiovascularHealthMonitoringApplication.createFogDevices(CardiovascularHealthMonitoringApplication.java:162) at org.fog.test.perfeval.CardiovascularHealthMonitoringApplication.main(CardiovascularHealthMonitoringApplication.java:109)

vyk1 commented 2 years ago

Same here.

vyk1 commented 2 years ago

@mehbub160 Figured out that in my case the problem had to do with the missing File.separator. It appears that by default the path separator is "//", so I changed it to (for example in DataParser.parseResourseData()):

BufferedReader csvReader = new BufferedReader(new FileReader(String.format(".%sdataset%sedgeResources-melbCBD.csv", File.separator, File.separator)));

Had to change in References.java and the other files too.

Dunno if necessary but I was thinking on creating a PR to solve it.

vyk1 commented 2 years ago

Done: #4

mgoudarzi90 commented 2 years ago

As the issue is solved, I am closing it.