Throwing System.QueryException on Batch Class for field "IsArchived" on Product2

You should check if the field is accessible before adding it to your query.

for (SObjectField field : SObjectType.Product2.fields.getMap().values())
{
    if (field.getDescribe().isAccessible())
    {
        // now you can include it in your query
    }
}

It sounds like you've got a mix of API versions in your classes and/or triggers, and this is causing a problem. If you use a utility class to generate your dynamic queries, please make sure the API version is no higher than all other classes that use this utility class. This can cause new fields/objects to be exposed to older versions and cause runtime exceptions such as this one. In this case, it appears your utility class is either API version 43.0 or 44.0, and the class that's trying to use the dynamic query is lower than version 43.0. For an example of a prior version of this error, see this Known Issue. Also read this answer I wrote about why you should keep your API versions all the same.


As for a solution, consider reducing your utility class(es) down to version 27.0 or so (this is the first time I'm aware of where API versions break describe calls), or bump up the classes that use this/these utility classes to at least version 43.0.