cloudsim icon indicating copy to clipboard operation
cloudsim copied to clipboard

CloudSimWorkloadWebExample

Open qwsdl opened this issue 1 year ago • 1 comments

java.lang.NullPointerException: Cannot invoke "org.cloudbus.cloudsim.EX.disk.HddHost.getGuestScheduler()" because the return value of "org.cloudbus.cloudsim.EX.disk.HddVm.getHost()" is null
	at org.cloudbus.cloudsim.EX.disk.HddVm.getCurrentRequestedMips(HddVm.java:199)
	at org.cloudbus.cloudsim.core.GuestEntity.getCurrentRequestedMaxMips(GuestEntity.java:57)
	at org.cloudbus.cloudsim.core.HostEntity.isSuitableForGuest(HostEntity.java:405)
	at org.cloudbus.cloudsim.VmAllocationWithSelectionPolicy.findHostForGuest(VmAllocationWithSelectionPolicy.java:41)
	at org.cloudbus.cloudsim.VmAllocationPolicy.allocateHostForGuest(VmAllocationPolicy.java:82)
	at org.cloudbus.cloudsim.EX.DatacenterEX.processVmCreate(DatacenterEX.java:56)
	at org.cloudbus.cloudsim.Datacenter.processEvent(Datacenter.java:194)
	at org.cloudbus.cloudsim.core.SimEntity.run(SimEntity.java:453)
	at org.cloudbus.cloudsim.core.CloudSim.runClockTick(CloudSim.java:500)
	at org.cloudbus.cloudsim.core.CloudSim.run(CloudSim.java:751)
	at org.cloudbus.cloudsim.core.CloudSim.startSimulation(CloudSim.java:182)
	at org.cloudbus.cloudsim.examples.web.CloudSimWorkloadWebExample.main(CloudSimWorkloadWebExample.java:110)
The simulation has been terminated due to an unexpected error

When running the CloudSimWorkloadWebExample, the above issue occurs.

qwsdl avatar Mar 22 '25 08:03 qwsdl

Hello @qwsdl ,Please try out this fix. Thank You

Astabol avatar Aug 05 '25 18:08 Astabol