Token 'env' should be a valid type. Please declare it virtual if it is an Interface

In reply to rajashekar.merugu:

class env extends uvm_env;
  `uvm_object_utils(env)
  
   
  monitor_after  ma;
  monitor_before mb;
  
  scoreboard sb;
  agent ag;
  
  
 
  function new(string name="env");
    super.new(name);
    
    /*ma=new("ma",this);
    mb=new("mb",this);
    sb=new("sb",this);*/
      

endfunction
  
  function void build_phase(uvm_phase phase);
    super.phase(uvm_phase); // this is wrong it has to be super.phase(phase);

Also, please update your factory registering macros from uvm_object_utils to uvm_component_utils for all the components.