The original posting by zosima was "Mass-Energy equivalence means that even though a photon is massless it has energy" and that is inexact since mass-energy equivalence is usually taken to be E=mc2 and that is the rest energy of a particle. A photon is never at rest.
I think the confusion with some posters is with the thermodynamics. The formula for mass-energy equivalence isn't just for fundamental particles. It also applies to composite systems consisting of many particles. The composite system can very well have a rest mass even if individual particles in the system have zero rest mass. I this case, one can claim that the internal energy of the system has a unique rest mass.
Suppose one takes 1 ml cube of liquid water at 0 C at 1 atm. The cube of water will be 1 g in mass when the center of mass is at rest. All the molecules in that cube of water are moving very rapidly. However, the rest mass of that cube of water is still 1 g. The equivalent rest energy of that cube of liquid water is given by:
E=mc
2where m is the 1 g, c is the speed of light in cm/s and E is in units of ergs.
Suppose one heats that cube of liquid water to 90 C at 1 atm. One has added 90 calories of internal energy to the original cube. If the mass of this cube is measured in an inertial frame where the center of mass is at rest, then the measured mass is a rest mass. So the rest mass of the cube is now 1 g plus the mass equivalent of the 90 calories. I won't do the calculation. I just point out that there calculated mass of the heated cube is still a rest mass for the cube.
Note that very few, or none, of the water molecules in the cube are ever at rest. So if one measured the mass of a rapidly moving molecule in the cube of water, it won't be the rest mass of the molecule. However, if the center of mass of the composite system (the cube) is at rest, one is justified in calling it a rest mass.
Now suppose instead of molecules one had only photons. The cube is hollow, with the sides made out of perfect mirrors held together by some new type of astronomical force. A large amount of optical energy is pumped into the cube. So in the inertial frame of the center of mass of this system, the energy consists of the kinetic energy of all the photons plus the potential energy of the strain fields in the mirrors that hold the cube together plus what mass is in the initial matter of the mirrors.
Assume most of the energy in this system is in the photons. The photons just bounce back and forth. A detailed analysis has to include the strain fields, but lets ignore those for now.
Let us do measurements in the inertial frame of the center of mass of the cube. Most of the photon energy becomes part of the rest energy of the mirrored cube. However, none of the photons are at rest. Nor can you find any inertial frame where any of the photons are at rest. However, the composite system of mirrors and photons has a center of mass. There is an inertial frame where this center of mass is at rest.
So the meaning of 'rest mass' for the mirrored cube is very clear even though the phrase 'rest mass' means nothing for the photons.
The lesson here is that the internal energy of a system has a rest mass associated with it. The 'rest' in 'rest mass' is associated with the center of mass of the system. The motion of the individual components doesn't really compromise their contribution to the 'rest mass'.
If you look close, most of the weirdness comes from the classical thermodynamics. Relativity just adds a small amount of weirdness to the thermodynamics.
In any case, the OP is wrong. There is no internal contradiction in relativity. I conjecture that relativity may eventually be found to be 'slightly wrong', the way Newton's Laws are 'slightly wrong'. However, Newton's Laws don't have a internal contradiction and neither does relativity.