We have successfully deployed EJBs running in a Weblogic clustered environment
for about 6 months already. In short, the application (running in a clustered
environment) is set up to call EJBs running in another weblogic clustered environment.
Recently, we are noticing one of the clustered environment (where the application
runs on) is throwing NullPointerExceptions when attempting to close the context.

// The following code is where it creates the InitialContext
Context ctx = new InitialContext(env);
/* where env is a hashtable with values for java.naming.factory.initial, java.naming.provider.url,
java.naming.security.principal and java.naming.security.credentials */
ctx = new InitialContext(env);
Object obj = ctx.lookup(beanName);

// And this is when it is throwing NullPointerExceptions at the finally clause
catch(NamingException e)
System.out.println("WARNING: could not close context");

There were no exceptions thrown when creating the Context, so it appers that the
context is somehow "lost" when it tries to close it. The strange thing is that
this problem is only happening on one of the clustered weblogic instance (where
the application runs on) but the instances are sharing the same configuration

It would be greatly appreciated if you can share some thoughts on this.