In Ahlfors' book, chapter $\textbf{V}-2.3$, we have a method to find a form to entire functions, that is: if $f$ is an entire function with a finite number of zeros $a_1, ..., a_N$, and a zero of multiplicity $m$ on the origin then $$f(z)=z^me^{g(z)}\prod_{n=1}^{N}\Big(1-\frac{z}{a_n}\Big)$$ after, generalize this for infinitely many zeros $$f(z)=z^me^{g(z)}\prod_{n=1}^{\infty}\Big(1-\frac{z}{a_n}\Big)$$
My question is: Why that generalization doesn't mean $f$ is a constant function? I said that because we know that an analytic (nonconstant) function has a finite number of zeros. My point is that there is a contradiction between this two facts.
You should mention that in the finite case multiple zeros are repeated. Ahlfors says that if there are infinitely many zeros one can try to obtain a similar representation by means of an infinite product. He states that this product converges absolutely if and only if $\sum_{n=1}^\infty 1/\lvert a_n \rvert$ is convergent.
A neccessary condition for the convergence of this series is that $a_n \to \infty$ as $n \to \infty$. This means that $(a_n)$ does not have a cluster point in $\mathbb{C}$. Therefore you cannot conclude that $f$ is constant. See Lord Shark the Unknown's comment.