CloudSimExample6 is Not Working Due to Null Pointer Exception
Hello Folks, While Executing of CloudSimExample6.java is encountered Null Pointer Exception.
Snapshot Attached Below:
Current Result Vs Expected Result Current Result: Throwing Null Exception Expected Result: It should execute correctly without any error
Java Version: 21 & 23 CloudSim Version: 7.0
How to Regenerate the issue: Simply Execute the CloudSimExample6.java, It will be recreated.
Thank You
Hi @Astabol
I've fixed it in my (private) work-in-progress patch to CloudSim7G. I can't share the code yet, unfortunately, but you could try to apply the patch yourself in the meantime (just don't commit it locally, or you'll eventually have a merge conflict with the official release)
Just add:
if (host == null) {
return false;
}
At the beginning of allocateHostForGuest(GuestEntity guest, HostEntity host) method in VmAllocationPolicy.java
Thanks @deRemo