In Paillier homomorphism, how do you deal with bit length?
What you're missing is the fact that your $c$ value can get waaay beyond what the library is expecting there and thus issues an error which can be read as "your value is too large".

The solution is simple: Reduce the multiplication result $\bmod N^2$, where $N=pq$ is the actual value of your modulus.

The code-line which you would need to add there would then be

 c=c.remained(p.getNsquare())


after the multiplication.