Hooke's law and dynamics

No.14346146 ViewReplyOriginalReport
If I have a mass attached to a spring vertically (see picture) and the mass is still, why do I get a different result for the elastic costant (k) of the spring if I use conservation of energy (mg*?L = 1/2*k*?L^2, which leads to k = 2mg/?L) and balancing forces (k*?L = mg, => k = mg/?L)? What am I missing?