Fix a bug that brings down the webapp container.

Instead of using System.exit() the method addItems now throws an
exception that can be handled higher in the calling stack, or will
terminate the thread.