Context. For the spectral analysis of high-resolution and high-signal-to-noise (S/N) spectra of hot stars, state-of-the-art non-local thermodynamic equilibrium (NLTE) model atmospheres are mandatory. These are strongly dependent on the reliability of the atomic data that is used for their calculation.Aims. Reliable Ba v-vii oscillator strengths are used to identify Ba lines in the spectra of the DA-type white dwarf G191−B2B and the DO-type white dwarf RE 0503−289 and to determine their photospheric Ba abundances.Methods. We newly calculated Ba v-vii oscillator strengths to consider their radiative and collisional bound-bound transitions in detail in our NLTE stellar-atmosphere models for the analysis of Ba lines exhibited in high-resolution and high-S/N UV observations of G191−B2B and RE 0503−289.Results. For the first time, we identified highly ionized Ba in the spectra of hot white dwarfs. We detected Ba vi and Ba vii lines in the Far Ultraviolet Spectroscopic Explorer (FUSE) spectrum of RE 0503−289. The Ba vi/Ba vii ionization equilibrium is well reproduced with the previously determined effective temperature of 70 000 K and surface gravity of log g = 7.5. The Ba abundance is 3.5 ± 0.5 × 10 −4 (mass fraction, about 23 000 times the solar value). In the FUSE spectrum of G191−B2B, we identified the strongest Ba vii line (at 993.41 Å) only, and determined a Ba abundance of 4.0 ± 0.5 × 10−6 (about 265 times solar). Conclusions. Reliable measurements and calculations of atomic data are a pre-requisite for stellar-atmosphere modeling. Observed Ba vi-vii line profiles in two white dwarfs' (G191−B2B and RE 0503−289) far-ultraviolet spectra were well reproduced with our newly calculated oscillator strengths. This allowed to determine the photospheric Ba abundance of these two stars precisely.