Instead of printing the whole stack trace and the error message
Unable to discover destination for request for EJB StatelessEJBLocator for "ejbca/cesecore-ejb/GlobalConfigurationSessionBean", view is interface org.cesecore.configuration.GlobalConfigurationSessionRemote, affinity is None
Catch the exception and print a friendly error message.
Other exceptions can be caught as well. The average user don't want to see the stack trace and it is logged server side anyway if it is needed for debugging.