Livedata上的空指针异常

我编写了此程序,该程序在recyclerview中显示了表格数据,但是出现以下运行时错误,但我无法修复它, 我已经检查了是否可以通过从方法返回非null ArrayList来解决问题,但是仍然会出现相同的错误,

java.lang.NullPointerException: Attempt to invoke virtual method 'void androidx.lifecycle.LiveData.observeForever(androidx.lifecycle.Observer)' on a null object reference

这是我的Recyclerview片段,其中包含有问题的代码,如所示

public class RcyFrag extends Fragment {
    Button b1,b2;
    EditText nem1,werk1;
    PersonDatabase pdd;
    APPmodel apd;
    File jap;
    Observer<ArrayList<Datap>> ppl;
    RcyAdap dddp;
    DatabaseService ddbs;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
    {


        jap=new File(getActivity().getExternalFilesDir(null),"Data");
        apd= ViewModelProviders.of(getActivity()).get(APPmodel.class);
        pdd= Room.databaseBuilder(getActivity().getApplicationContext(),
                PersonDatabase.class, jap.toString()).build();
        ddbs=new DatabaseService("Nameei",pdd);
        apd.getPersonList(pdd);
        return inflater.inflate( R.layout.rcyfragm, container, false);
    }
    @Override
    public void onStart()
    {




        super.onStart();
        Person ppk=new Person();
        Intent it=new Intent(getActivity(), DatabaseService.class);
        it.putExtra("Name","Aditya");
        it.putExtra("Work","Engineer");
        it.putExtra("ID","add");
        getActivity().startService(it);
        b2=(Button) getView().findViewById(R.id.buttonadd);
        final RecyclerView recw = (RecyclerView) getView().findViewById(R.id.recw);

        ppl=new Observer<ArrayList<Datap>>() {
            @Override
            public void onChanged(ArrayList<Datap> dataps) {
                dddp= new RcyAdap(dataps);
                recw.setLayoutManager(new LinearLayoutManager(getActivity()));
                recw.setAdapter(dddp);
                Toast.makeText(getActivity(),"Change Happened",Toast.LENGTH_LONG).show();
            }
        };
 ??       apd.getPersonList().observe( this, ppl);// Problematic code here <-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-

        nem1 = (EditText) getView().findViewById(R.id.nem1);
        werk1 = (EditText) getView().findViewById(R.id.werk1);
        b1 = (Button) getView().findViewById(R.id.buttonad);
        b1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent it=new Intent(getActivity(), DatabaseService.class);
                it.putExtra("Name",nem1.getText().toString());
                it.putExtra("Work",werk1.getText().toString());
                it.putExtra("ID","add");
                getActivity().startService(it);
            }
        });
        recw.addOnItemTouchListener(new CustomRVItemTouchListener(getActivity(), recw, new RecyclerViewItemClickListener() {
            @Override
            public void onClick(View view, int position) {

            }

            @Override
            public void onLongClick(View view, int position) {
                dddp.remelem(position);
                Intent it=new Intent(getActivity(),DatabaseService.class);
                it.putExtra("Name",nem1.getText().toString());
                it.putExtra("Work",werk1.getText().toString());
                it.putExtra("ID","delete");
                getActivity().startService(it);
                Toast.makeText(getActivity(),"Element deletd",Toast.LENGTH_LONG).show();

            }
        }));
        b2.setOnClickListener(new View.OnClickListener() {
            @RequiresApi(api = Build.VERSION_CODES.M)
            @Override
            public void onClick(View v) {
                File aha= new File(getActivity().getExternalFilesDir(null),"Here.txt");
                try {
                    aha.createNewFile();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                nem1.setText(aha.toString());
            }
     });

    }

}

这是我的名为APPmodel的View模型

public class APPmodel extends ViewModel {
    private LiveData<List<Person>> PersonList;
    private LiveData<ArrayList<Datap>> DatapList= Transformations.map(PersonList, persons -> {
        ArrayList<Datap> pp = null;
        for(int i=0; i<persons.size();i++)
        {
            pp.add(new Datap(persons.get(i).name, persons.get(i).work));
        }
        return pp;
    });
    public LiveData<ArrayList<Datap>> getPersonList(PersonDatabase pd)
    {
        if(PersonList==null)
        {
            PersonList = pd.personDao().getAll();
        }
        return DatapList;
    }
    public LiveData<ArrayList<Datap>> getPersonList() {
        return DatapList;
    }
}

有人可以帮我吗?