It doesn't indicate any error because you catch the error it throws, return its localized message to the caller, and the caller completely ignores the returned message. Remove the catch (Exception)
block completely, re-run your code, and you'll probably get a NullPointerException.
A session bean is not supposed to be instantiated using new GestionnaireDeCompteBancaire()
. It's supposed to be packaged inside a Java EE application, which is deployed inside a Java EE container like JBoss or Glassfish, and then invoked using a web application deployed in this same container or using a Java EE client application. I think you really need to read a book or a serious tutorial about EJBs (and exception handling).