NullPointerException with GeneralCacheAdministrator

View: New views
1 Messages — Rating Filter:   Alert me  

NullPointerException with GeneralCacheAdministrator

by Daniel I. Applebaum :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Everybody,
                   I am using GeneralCacheAdministrator in my application with a wrapper class.
The application has been deployed in cluster environment of weblogic server 8.1. I have followed the correct procedure to write oscache.properties file.
         
                     But a NullPointerException is coming from the follwing line of code

                try {
                value = (String) admin.getFromCache(sourceName); -- NullPointerException
                } catch (NeedsRefreshException nre) {
                        boolean updated = false;
                        try {
                                //instance = new AppConfigDBReader();
                                instance.init();
                                updated = true;
                                value = (String) admin.getFromCache(sourceName);
                        } catch (Exception e) {
                                //log.error(e.getStackTrace(), e);
                                admin.cancelUpdate(sourceName);
                        }finally{
                                if (!updated) {
                                  admin.cancelUpdate(sourceName);
                                }
                        }
                } catch (Exception e) {
                        log.error(e.getStackTrace(), e);
                }

Here admin is a object of GeneralCacheAdministrator which was initialized earlier. It was working fine but intermittently raising the exception with total outage of the application as i am getting most of the config param from this cache.

   Can somebody help out, what to do here.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=376791&messageID=463287#463287


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...