Here is the complete error log  03-27 08:08:30.264 D/SubSettings( 7079): Launching fragment com.sakura.settings.fragments.BatterybarSettings 03-27 08:08:30.275 D/AndroidRuntime( 7079): Shutting down VM 03-27 08:08:30.275 E/AndroidRuntime( 7079): FATAL EXCEPTION: main 03-27 08:08:30.275 E/AndroidRuntime( 7079): Process: com.android.settings, PID: 7079 03-27 08:08:30.275 E/AndroidRuntime( 7079): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.settings/com.android.settings.SubSettings}: java.lang.NullPointerException: Attempt to invoke virtual method 'void androidx.preference.Preference.setOnPreferenceChangeListener(androidx.preference.Preference$OnPreferenceChangeListener)' on a null object reference 03-27 08:08:30.275 E/AndroidRuntime( 7079):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3270) 03-27 08:08:30.275 E/AndroidRuntime( 7079):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409) 03-27 08:08:30.275 E/AndroidRuntime( 7079):     at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83) 03-27 08:08:30.275 E/AndroidRuntime( 7079):     at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) 03-27 08:08:30.275 E/AndroidRuntime( 7079):     at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) 03-27 08:08:30.275 E/AndroidRuntime( 7079):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016) 03-27 08:08:30.275 E/AndroidRuntime( 7079):     at android.os.Handler.dispatchMessage(Handler.java:107) 03-27 08:08:30.275 E/AndroidRuntime( 7079):     at android.os.Looper.loop(Looper.java:214) 03-27 08:08:30.275 E/AndroidRuntime( 7079):     at android.app.ActivityThread.main(ActivityThread.java:7355) 03-27 08:08:30.275 E/AndroidRuntime( 7079):     at java.lang.reflect.Method.invoke(Native Method) 03-27 08:08:30.275 E/AndroidRuntime( 7079):     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491) 03-27 08:08:30.275 E/AndroidRuntime( 7079):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) 03-27 08:08:30.275 E/AndroidRuntime( 7079): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void androidx.preference.Preference.setOnPreferenceChangeListener(androidx.preference.Preference$OnPreferenceChangeListener)' on a null object reference 03-27 08:08:30.275 E/AndroidRuntime( 7079):     at com.sakura.settings.fragments.BatterybarSettings.onCreate(BatterybarSettings.java:110) 03-27 08:08:30.275 E/AndroidRuntime( 7079):     at androidx.fragment.app.Fragment.performCreate(Fragment.java:2596) 03-27 08:08:30.275 E/AndroidRuntime( 7079):     at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:831) 03-27 08:08:30.275 E/AndroidRuntime( 7079):     at androidx.fragment.app.FragmentTransition.addToFirstInLastOut(FragmentTransition.java:1197) 03-27 08:08:30.275 E/AndroidRuntime( 7079):     at androidx.fragment.app.FragmentTransition.calculateFragments(FragmentTransition.java:1080) 03-27 08:08:30.275 E/AndroidRuntime( 7079):     at androidx.fragment.app.FragmentTransition.startTransitions(FragmentTransition.java:119) 03-27 08:08:30.275 E/AndroidRuntime( 7079):     at androidx.fragment.app.FragmentManagerImpl.executeOpsTogether(FragmentManagerImpl.java:1853)   I am unable how should I initialize onPreferenceChangeListener, I also tried looking for code references to other places but couldn't figure out how they are initializing it. My whole code is at .   Thanks a lot in advance.
129
What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?
25560
Lots of times in Java logs I'll get something like:  Caused by: java.sql.BatchUpdateException: failed batch     at org.hsqldb.jdbc.jdbcStatement.executeBatch(jdbcStatement.java:1102)     at org.hsqldb.jdbc.jdbcPreparedStatement.executeBatch(jdbcPreparedStatement.java:514)     at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)     at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:242)     ... 113 more   Does anyone know how to get the full stacktrace showing (i.e. show the other 113 lines)?    The  for Throwable have a pretty detailed explanation of what's going on.
40030
I am having this error for quite a few months. When the problem occurs, my windows freezes at boot time with black screen. After few reset attempts, sometimes it shows the entitled error. after few attempts, the windows starts but everything become slow. If I again restart, it works well. But at a point windows never starts and I have to reinstall it. I have already reinstalled 3/4 times in the past 2/3 months. I checked for any HDD errors with EASEUS Partition Master Home Edition with surface test, chkdisk at boot time etc for my C drive and F drive but no errors found. Startup repair also fails to solve the problem.  Windows Boot Manager   Windows failed to start. A recent hardware or software change might be the cause.   To fix the problem:  &nbsp;&nbsp;1. Insert your Windows installation disc and restart your computer.  &nbsp;&nbsp;2. Choose your language settings, and then click "Next." &nbsp;&nbsp;3. Click "repair your computer."  If you don't have this disc, contact your system administrator or computer manufacturer for assistance.   &nbsp;&nbsp;File: \Boot\BCD  &nbsp;&nbsp;Status: 0xc00000e9  My laptop's info:  Model: Dell n5110 corei5 OS: Windows 8 PRO 64 bit Anti-virus:  Avast Home edition  Additional info: My Program Files, Program Files (x86) and Users directory is located at F drive and linked with symbolic link (mklink). Also I have changed these basic locations from regedit. I also use eclipse android intelx86 emulator, virtualbox and Genymotion emulator most often.
61126
I am getting java.lang.NullPointerException while executing my test case , I am using Page Object Modle with PageFactory ,following are the code snippets  LoginPageObjec.java  public class LoginPageObjects {      @FindBy(xpath=".//*[@id='userName']")     private WebElement email;      @FindBy(xpath=".//*[@id='password']")     private WebElement password;      @FindBy(xpath=".//*[@id='loginFormSubmit']")     private WebElement loginBtn;      public void EnterUserName(String userName)     {         email.sendKeys(userName);     }      public void EnterPassword(String pass)     {         password.sendKeys(pass);     }      public void clickLogin()     {         loginBtn.click();     }   }   LoginTC.java  public class LoginTC extends BasePage{     private WebDriver driver;      @Test     public void login()     {         LoginPageObjects loginPage = PageFactory.initElements(driver, LoginPageObjects.class);         loginPage.EnterUserName("test.hr@domin.com.pk");         loginPage.EnterPassword("test");         loginPage.clickLogin();     } public void login1()         {             LoginPageObjects loginPage = PageFactory.initElements(driver, LoginPageObjects.class);             loginPage.EnterUserName("test.hr@domin.com.pk");             loginPage.EnterPassword("test");             loginPage.clickLogin();         }  }   BasePage.java  public class BasePage {     private WebDriver driver;      @BeforeMethod       public void initializeBrowser() {      driver=new FirefoxDriver();      driver.navigate().to("https://nexthrm-dev.vteamslabs.com/");      driver.manage().window().maximize();      }     @AfterMethod     public void closeBrowser()     {         driver.close();     }  }   I've extended BasePage class to utilize the (initialBrowser &amp; closeBrowser) functions in my test case but its producing nullpointer exception if I copy both of the functions (initialBrowser &amp; closeBrowser) into my LoginTC (testcase class) it works like charm but I dont want this redundant code i.e((initialBrowser &amp; closeBrowser) for all my testcases class could anyone explain why I am getting nullpointer exception
105199
I am trying to edit an existing page with this code. When I am setting a publishComment it is throwing this exception.  item["Title"] = pageTitle; item["PublishingPageContent"] = pageContent; item.Update(); SharePointTools.ClientContext.ExecuteQuery(); item.File.Publish(publishComment); SharePointTools.ClientContext.ExecuteQuery();   What am I doing wrong? I need your help guys.
103112
When and why would somebody do the following:  doSomething( (MyClass) null );   Have you ever done this? Could you please share your experience?
104299
When I try to start Runescape I get an error message that says: CLassNotFoundException and lists Rs2Applet.class. How do I fix this so I can play?
54460
I tried re-installing  it but it simply keeps giving me this error in a little window. When I close it, an identical error pops up some 3 seconds later without any new provocation.
57036
When I used to create the record in Event object it is showing error like:     Error: Invalid Data.   Apex trigger General_Event_Trigger caused an unexpected exception, contact your administrator: General_Event_Trigger: execution of BeforeINsert caused by: System.NullPointerException: Attempt to de-reference a null object: Class.EventClass.updateNewCustomFieldsEvent: line 369, column 1   Trigger code:  trigger General_Event_Trigger on Event (...) {     if (trigger.isBefore)     {         if (trigger.isInsert)         {             EventClass.updateNewCustomFieldsEvent(trigger.new);         }         else if (trigger.isUpdate)         {             EventClass.updateNewCustomFieldsEvent(trigger.new);         }     } }   Apex class:  public static void updateNewCustomFieldsEvent(List&lt;Event&gt; eventList) {     for (Event eve : eventList)     {         if (Administrators__c.getInstance().Update_field_Last_Modified_End_User__c)         {             String userIdString = eve.LastModifiedById;             eve.Last_Modified_By_End_User__c = userIdString.subString(0, 15);             eve.Last_Modified_Date_End_User__c = eve.LastModifiedDate;         }     } }
25839
Error Message:     Developer script exception from Nicomatic : quotepotential :   quotepotential: execution of AfterUpdate caused by:   System.DmlException: Update failed. First exception on row 0 with id   a0Q90000005PoxtEAC; first error: UNABLE_TO_LOCK_ROW, unable to obtain   exclusive access to this record: [] Trigger.quotepotential: line 14,   column 1      Apex script unhandled trigger exception by user/organization:   00590000001A6jh/00D90000000bovq      quotepotential: execution of AfterUpdate      caused by: System.DmlException: Update failed. First exception on row   0 with id a0Q90000005PoxtEAC; first error: UNABLE_TO_LOCK_ROW, unable   to obtain exclusive access to this record: []      Trigger.quotepotential: line 14, column 1   these mails are getting to my mail..........  trigger quotepotential on Quote_Line_Item__c (after insert,after update) {     Set&lt;Id&gt; quoteIds = new Set&lt;Id&gt;();     List&lt;Quote__c&gt; quotes = new List&lt;Quote__c&gt;();     for (Quote_Line_Item__c record: Trigger.new) {         if (record.Quote1__c != null){             quoteIds.add(record.Quote1__c);         }     }     for(AggregateResult ar:[                 SELECT                      Quote1__c,                      SUM(Max_Batch__c)sumMax                  FROM Quote_Line_Item__c                  WHERE Quote1__c=:quoteIds                  GROUP BY Quote1__c                 ]) {          quotes.add(new Quote__c(              Id=(Id) ar.get('Quote1__c'),              Potential__c = (Decimal) ar.get('sumMax')              ));     }     if (quotes.isempty() == false) {         update quotes;     } }
95080
I am trying to execute a web service call to our backend system when the opportunity is closed/won. I am attempting to do a  POST to our endpoint. All the api call is really carrying the account name and a few structural detail back (All listed below). My problem is that when the trigger executes I get the following error in the debug logs "System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out".  The Process Builder Passing in the company name:   APEX Class  public class Play2 { @TestVisible static HttpResponse res;  @InvocableMethod public static void sendNotification(List&lt;String&gt; name) {        HttpRequest req = new HttpRequest();     Http http = new Http();     String payload = JSON.serialize(         new Map&lt;String, String&gt; {             'companyName' =&gt; name.get(0),             'salesforceAccountType' =&gt; 'Company',             'salesforceSynchStatus' =&gt; 'Enabled'         }     );      req.setEndpoint('https://TheEndPoint');     req.setMethod('POST');     req.setHeader('Authorization', 'The Mighty API KEY');     req.setHeader('Content-Type', 'application/json');      req.setBody( payload );     req.setCompressed(true);       try {         System.debug('Point 1');         res = http.send(req);         System.debug('Point 2');     } catch(System.CalloutException e) {         System.debug('Callout error: '+ e);         System.debug(res.toString());     } } }
74634
I am trying to start share-point workflow using CSOM(Client side object model) by following means of code. But i got the following error from the line mark in comment. Please help me to figure out this error.     Error :- Cannot invoke method or retrieve property from null   object. Object returned by the following call stack is null.   "GetWorkflowDeploymentService new   Microsoft.SharePoint.WorkflowServices.WorkflowServicesManager() "    public bool StartWorkFlow()  {     string workflowName = "UpdateDealStatus";     // connect to the workflow services via a CSOM client context    var workflowServicesManager = new WorkflowServicesManager(_sharepoint,                  _sharepoint.Web);    // connect to the deployment service    var workflowDeploymentService = workflowServicesManager.GetWorkflowDeploymentService();    // get all installed workflows   var publishedWorkflowDefinitions =    workflowDeploymentService.EnumerateDefinitions(true);             _sharepoint.Load(publishedWorkflowDefinitions);     try    {       _sharepoint.ExecuteQuery();//Error thrown from this line    }    catch (Exception ex)    {      }     // find the first workflow definition    var firstWorkflowDefinition = publishedWorkflowDefinitions.First();     // connect to the subscription service    var workflowSubscriptionService = workflowServicesManager.GetWorkflowSubscriptionService();     // get all workflow associations    var workflowAssociations = workflowSubscriptionService.EnumerateSubscriptionsByDefinition(firstWorkflowDefinition.Id);     _sharepoint.Load(workflowAssociations);    _sharepoint.ExecuteQuery();     foreach (var association in workflowAssociations)    {        Console.WriteLine("{0} - {1}",        association.Id, association.Name);    }     return true; }
50659
I am trying to deploy around 80 Components which include Apex Class,Trigger and Visualforce Pages. But it is failing due to below exception,     MyTrigger: execution of BeforeInsert caused by: System.QueryException: Aggregate query does not support queryMore(), use LIMIT to restrict the results to a single batch Trigg...   All test classes are run as a part of deployement process hence few of the test classes are making this trigger fire causing error. As its a change set deployment error, could not get the complete error statement. Also my trigger includes below code.  if(trigger.isBefore &amp; trigger.isInsert) {         for(AggregateResult ar : [select ABC__c, Name, max(Revision__c) maxRev from XYZ__c                                      where ABC__c in :oppMap.keySet()                                     group by ABC__c, Name order by ABC__c, Name]) {             decimal maxRev = Integer.valueOf(ar.get('maxRev'));             string oppAppKey = String.valueOf(ar.get('ABC__c')) + String.valueOf(ar.get('Name'));             lrMap.put(oppAppKey, maxRev);         }     }   Let me know how to fix this. Should i try using limit or is there any other solution?
123206
I get this error in the deployment step of a share-point farm based project. Most of the suggested solutions on the net are a simple Visual Studio re-start, however, a simple VS restart won't fix this.   Any ideas on what might be causing this?
31189
I'm getting these errors ramdomly, and I don't know if its normal or not.   [39441.061856] ata3.00: failed to read SCR 1 (Emask=0x40) [39441.061866] ata3.01: failed to read SCR 1 (Emask=0x40) [39441.061892] ata3.15: exception Emask 0x10 SAct 0x0 SErr 0x280100 action 0x6 frozen [39441.061897] ata3.15: irq_stat 0x08000000, interface fatal error [39441.061904] ata3.15: SError: { UnrecovData 10B8B BadCRC } [39441.061910] ata3.00: exception Emask 0x100 SAct 0x0 SErr 0x0 action 0x6 frozen [39441.061917] ata3.01: exception Emask 0x100 SAct 0xe SErr 0x0 action 0x6 frozen [39441.061923] ata3.01: failed command: READ FPDMA QUEUED [39441.061933] ata3.01: cmd 60/a8:08:b0:48:62/00:00:00:00:00/40 tag 1 ncq 86016 in [39441.061940] ata3.01: status: { DRDY } [39441.061944] ata3.01: failed command: READ FPDMA QUEUED [39441.061953] ata3.01: cmd 60/a8:10:b0:49:62/00:00:00:00:00/40 tag 2 ncq 86016 in [39441.061959] ata3.01: status: { DRDY } [39441.061963] ata3.01: failed command: READ FPDMA QUEUED [39441.061972] ata3.01: cmd 60/58:18:58:4a:62/00:00:00:00:00/40 tag 3 ncq 45056 in [39441.061978] ata3.01: status: { DRDY } [39441.061987] ata3.15: hard resetting link [39441.608302] ata3.15: SATA link up 3.0 Gbps (SStatus 123 SControl 300) [39441.609090] ata3.00: hard resetting link [39441.929246] ata3.00: SATA link up 3.0 Gbps (SStatus 123 SControl 320) [39441.929333] ata3.01: hard resetting link [39442.249184] ata3.01: SATA link up 3.0 Gbps (SStatus 123 SControl 320) [39442.263242] ata3.00: configured for UDMA/133 [39442.277570] ata3.01: configured for UDMA/133 [39442.277725] ata3: EH complete   I'm also pasting smartctl -a for ,  and .  Thanks in advance for your help.
101111
We've had a community deployment and my brain is fried and I just whipped up a quick class that is throwing the below error. What have I done wrong here?     Error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, MSI_UserTrigger:   execution of AfterInsert caused by: System.StringException: Invalid   id: () : [] () : []: ()   What I am trying to accomplish is:   When a new user is created and is active, if they are linked to a ContactId and part of a specific profile (by name), add their ContactId to a Set&lt;ID> Then loop through contacts where the Id is in the set, and update the Community_User__c field to TRUE      Trigger:   trigger MSI_UserTrigger on User (after insert) {       if(Trigger.isAfter){          if(Trigger.isInsert){              MSIUserTriggerHandler.executeAfterInsert(Trigger.new);          }      } }      Class:   public with sharing class MSIUserTriggerHandler {     private static final String COMMUNITY_PROFILE = 'Community Knowledge User';     private MSIUserTriggerHandler() {}      public static void executeAfterInsert(List&lt;User&gt; newList){         setCreatedCommunityUsers(newList);     }      private static void setCreatedCommunityUsers(List&lt;User&gt; newList){         List&lt;User&gt; usersWithContacts = new List&lt;User&gt;();         List&lt;Contact&gt; contactsToUpdate = new List&lt;Contact&gt;();         Set&lt;ID&gt; contactIds = new Set&lt;ID&gt;();          for(User u: newList){             if(u.ContactId == null &amp;&amp; u.ContactId == ''){                 continue;             }             if((u.ContactId != null &amp;&amp; u.ContactId != '') &amp;&amp; u.Profile.Name == COMMUNITY_PROFILE &amp;&amp; u.isActive == true){                 contactIds.add(u.ContactId);             }         }          for(Contact c : [Select Id,Name,Community_User_Created__c from Contact where Id in :contactIds]){             if(!c.Community_User_Created__c){                 c.Community_User_Created__c = true;                 contactsToUpdate.add(c);             }         }         update contactsToUpdate;     } }   Am I not adding the ID correctly to the Set&lt;ID>, or am I querying wrong in my for(Contacts) loop?
112832
I turned developer options 'off', but is there anything else that needs to be done? Not my phone so don't want to mess anything up :-)