This is so confusing: books are saying that connected correlator is given by
$$\langle \phi(x_1) \phi(x_2) ... \phi(x_n) \rangle_C = \left.(-i)^{n-1}\frac{\delta }{\delta J(x_1)} \frac{\delta}{\delta J(x_2)}... \frac{\delta W}{\delta J(x_n)}\right|_{J=0} \tag{1}$$
evaluated at source $J=0$ but for $n=0$ point function I am getting
$$\langle 1 \rangle_C=iW[J=0]= \log(Z[J=0])\tag{2}$$
(by definition of cumulant generating functional $W$). For $n>0$ I get only connected diagrams (as expected).
Is this formula valid only for $n>0$ for some reason?
Also, usually by normalization $Z[J=0]$ is set to $1$ but if I actually evaluate it I get divergent sum of bubble diagrams. Why the discrepancy?