Context. Radio U-bursts and J-bursts are signatures of electron beams propagating along magnetic loops confined to the corona. The more commonly observed type III radio bursts are signatures of electron beams propagating along magnetic loops that extend into interplanetary space. Given the prevalence of solar magnetic flux to be closed in the corona, it is an outstanding question why type III bursts are more frequently observed than U-bursts or J-bursts. Aims. We use LOFAR imaging spectroscopy between 30-80 MHz of low-frequency U-bursts and J-bursts, for the first time, to understand why electron beams travelling along coronal loops produce radio emission less often. Radio burst observations provide information not only about the exciting electron beams but also about the structure of large coronal loops with densities too low for standard EUV or X-ray analysis. Methods. We analysed LOFAR images of a sequence of two J-bursts and one U-burst. The different radio source positions were used to model the spatial structure of the guiding magnetic flux tube and then deduce the energy range of the exciting electron beams without the assumption of a standard density model. We also estimated the electron density along the magnetic flux rope and compared it to coronal models. Results. The radio sources infer a magnetic loop 1 solar radius in altitude, with the highest frequency sources starting around 0.6 solar radii. Electron velocities were found between 0.13 c and 0.24 c, with the front of the electron beam travelling faster than the back of the electron beam. The velocities correspond to energy ranges within the beam from 0.7-11 keV to 0.7-43 keV. The density along the loop is higher than typical coronal density models and the density gradient is smaller. Conclusions. We found that a more restrictive range of accelerated beam and background plasma parameters can result in U-bursts or J-bursts, causing type III bursts to be more frequently observed. The large instability distances required before Langmuir waves are produced by some electron beams, and the small magnitude of the background density gradients make closed loops less facilitating for radio emission than loops that extend into interplanetary space.