Changed the code to:
Context context = new InitialContext();
getLogger().info("Context retrieved. Getting HttpDestination: " + SUCCESS_FACTOR_HCP_JNDI_NAME);
HttpDestination httpDestination = (HttpDestination) context.lookup(FINAL_SERVICE_JNDI_NAME);
getLogger().info("Successfully got HttpDestination from: " + FINAL_SERVICE_JNDI_NAME);
this.httpClient = httpDestination.createHttpClient();The same exception is thrown at line 3. Even using the InitialContext.doLookup should not matter IMHO.
Thanks