function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Chris CalhounChris Calhoun 

Error when adding implements Database.Batchable<sObject>

Getting error 'Object reference not set to an instance of an object.' when adding 'implements Database.Batchable<sObject> to a class.
I'm using BrainEngine 5.0.1.81. Eclipse won't save to the server either.


global  class TransactionExclusionFromSSISHiHwBatch implements Database.Batchable<sObject>
{
}
Best Answer chosen by Chris Calhoun
EnreecoEnreeco
You also need then to implement all the required methods in the link I provided

All Answers

EnreecoEnreeco
Follow this link http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_batch_interface.htm
It seems you are opening a square braket and closing with a curly parenthesis.
Does it answer to your question?
EnreecoEnreeco
You also need then to implement all the required methods in the link I provided
This was selected as the best answer
Chris CalhounChris Calhoun
I uncommented out my start and execute method and copied my finish method into the class and it saved.  I've written about three classes so far that use the batchable interface and IIRC, I've written the start, execute and finish methods one at the time (saving in between). Maybe something changed in  Summer 14?
Thanks for your help. 

EnreecoEnreeco
Start and execute methods are mandatory as per the batchable interface and also by sense (how can you start a batch without querying records or how can you process them without an execute method?).
I've tried in an org without the summer 14 and cannot save a class without one of the methods in different order...so it may be that the saves occurred only locally (if using an IDE) and actually work only when all methods where written.
Bye
E.