it will be either the igntion switch that is faulty the primary igntion coil in the generator windings or possibly the secondary coil that the ht lead is joined to apart from that a wire could be chafing the loom,get a manual and see what colour wire kills the spark.then disconnect it from the cdi and see if it sparks then if it does then find out where its being earthed.
adam bike doctor(of milton keynes motorcycle centre)
February 2011