April 3, 2015

oracle.security.jps.JpsRuntimeException: Cannot read from policy store

While running my integrated weblogic, I got an error like below.

oracle.security.jps.JpsRuntimeException: Cannot read from policy store. Reason is PolicyStore Error, javax.xml.stream.XMLStreamException: Error at line:332 col:25  ' '

To solve this error, the weblogic domain should be deleted and start the weblogic again. Then it will create a fresh domain.

March 25, 2015

Fun Facts

Do you want to improve your knowledge?
Do you want to impress friends with some facts?
Then Fun Facts app is for you.
"Fun Facts" is an android app shows some quotes which are funny but real facts.
Install the app @ https://play.google.com/store/apps/details?id=com.sonuappz.funfacts

February 2, 2015


If you want to run a piece of code in the background at certain intervals, then AlarmManager is the class helps us to do this. It will wake up the device on the given intervals and invokes the Receiver class where we should write our code to run in the background. Below code snippet explains how to implement AlarmManager.

Intent notificationIntent = new Intent(context, LoadData.class);
PendingIntent   pendingIntentSyncDB;= PendingIntent.getBroadcast(context, 0,
                                notificationIntent, PendingIntent.FLAG_CANCEL_CURRENT);

AlarmManager alarmManager = (AlarmManager)  getSystemService(Context.ALARM_SERVICE);
int intervalTime = 1000 * 60 * 5 ;// 5min
alarmManager.setInexactRepeating(AlarmManager.RTC_WAKEUP, System.currentTimeMillis(),  intervalTime, pendingIntentSyncDB);

In the above snippet, LoadData is a broadcast receiver class which executes the background code. AlarmManager invokes the LoadData for every 5mins.