We present a new measurement of the inclusive and differential production cross sections of J/psi mesons and b hadrons in proton-antiproton collisions at roots=1960 GeV. The data correspond to an integrated luminosity of 39.7 pb(-1) collected by the CDF run II detector. We find the integrated cross section for inclusive J/psi production for all transverse momenta from 0 to 20 GeV/c in the rapidity range |y|<0.6 to be 4.08+/-0.02(stat)(-0.33)(+0.36)(syst) mub. We separate the fraction of J/psi events from the decay of the long-lived b hadrons using the lifetime distribution in all events with p(T)(J/psi)>1.25 GeV/c. We find the total cross section for b hadrons, including both hadrons and antihadrons, decaying to J/psi with transverse momenta greater than 1.25 GeV/c in the rapidity range |y(J/psi)|<0.6 is 0.330+/-0.005(stat)(-0.033)(+0.036)(syst) mub. Using a Monte Carlo simulation of the decay kinematics of b hadrons to all final states containing a J/psi, we extract the first measurement of the total single b-hadron cross section down to zero transverse momentum at roots=1960 GeV. We find the total single b-hadron cross section integrated over all transverse momenta for b hadrons in the rapidity range |y|<0.6 to be 17.6+/-0.4(stat)(-2.3)(+2.5)(syst) mub.