This is because you have just declared variable for MyPackageInfo temp_MyPackageInfo = null;
not initialized it. So you need to initialize.
temp_MyPackageInfo = new MyPackageInfo();
Need to make Constructor in your MyPackageInfo
class like
public void MyPackageInfo() {
}