No, it does not violate the principle of conservation of energy. There is a force of attraction between glass and water, which is why the liquid rises in the tube. However, when water and glass are not in contact, there exists a potential energy in the system. When they are brought into contact, this potential energy is first converted into kinetic energy, which lets the liquid rush upwards in the tube, and then into gravitational potential energy. Therefore,  energy is not created in the process.