It's possible that you didn't set the
EJB server up with a large enough stack, though not likely. I suspect, however, that you may be invoking one of the "ejbXXX" methods directly when it's supposed to be invoked automatically from the container and a recursive calling process is being set off.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.