A neutron star in a compact binary is expected to be well-approximated by a barotropic flow during the inspiral phase. During the merger phase, where tidal disruption and shock-heating occur, a baroclinic description is needed instead. In the barotropic case, a Hamiltonian formulation potentially offers unique benefits for numerical relativity simulations of the inspiral phase, including highly accurate conservation of circulation and superconvergence of the fluid variables, and is actively being explored. In this work, we investigate the viability of a Hamiltonian formulation in the baroclinic case. At odds with the barotropic case, this formulation is non-conservative, yet it can be treated well with approximate Riemann solver algorithms since the non-conservative terms vanish across genuinely nonlinear fields. Nonetheless, using numerical 1-dimensional shock tube tests we find that the weak solutions of the Hamiltonian system differ from the standard ones obtained by enforcing conservation of rest mass density, momentum density, and energy density across discontinuities. We also show that barotropic Hamiltonian formulations can admit shockwaves at fluid-vacuum interfaces, which may be related to the unstable behavior of stellar surfaces observed in past numerical tests. In light of the unphysical weak solutions, we expect that in future implementations of the Hamiltonian formulation of hydrodynamics in numerical relativity it will be necessary to use an explicitly barotropic formulation during the inspiral phase, and then switch to a robust baroclinic formulation prior to merger.