I'm not very familiar with the SQL shutdown statement, but it seems clear what is happening. By shutting down the database you invalidate the
JDBC connection. (You understand the Ant task is implemented by JDBC, right?) The connection naturally complains about that. However, as long as shutdown is the last statment, I think you can safely ignore that message.
However, I'm not sure how to make Ant ignore it. You could try setting oneror=continue in the sql task, and see if that helps. (I had to spell error wrong for this post to work.)