EdR,
Thermal stresses in the 3rd direction arn't necessarily generated by constraints, they can be generated by differential thermal expansion if there is a non-uniform temperature distribution. As such if there are no loads, no constraints, there can be a longitudianl stress within a long bar, but zero at the ends.
corus