Recommended solutions based on your search
When a member (Variables, methods, and constructors) is private, it is only accessible within the same class as it is declared. Attempting to access or instantiate it from another class would throw java.lang.IllegalAccessException exception.
Solutions on the web
java.lang.IllegalAccessException: Class org.apache.spark.serializer.KryoSerializer$$anonfun$newKryo$2 can not access a member of class com.MyRegistrator with modifiers