pgrep xxxx will set a status code accordingly to whether or not
xxxx is a running process, this is a useful to check if a process is running:
if pgrep xxxx; then ...
In your case it seams to get Symfony to complain. Chaining the processes might help:
pgrep java || true