javascript - java.lang.RuntimeException: An error occurred while executing doInBackground() -


i have problem in sending data , getting "java.lang.runtimeexception: error occurred while executing doinbackground()" error. please me. thanks.

this logcat error :

09-10 17:24:50.175 13087-13456/com.example.asus.mywarehouse e/androidruntime: fatal exception: asynctask #3                                                                                process: com.example.asus.mywarehouse, pid: 13087                                                                                java.lang.runtimeexception: error occurred while executing doinbackground()                                                                                    @ android.os.asynctask$3.done(asynctask.java:309)                                                                                    @ java.util.concurrent.futuretask.finishcompletion(futuretask.java:354)                                                                                    @ java.util.concurrent.futuretask.setexception(futuretask.java:223)                                                                                    @ java.util.concurrent.futuretask.run(futuretask.java:242)                                                                                    @ android.os.asynctask$serialexecutor$1.run(asynctask.java:234)                                                                                    @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1113)                                                                                    @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:588)                                                                                    @ java.lang.thread.run(thread.java:818)                                                                                 caused by: java.lang.nullpointerexception: attempt read null array                                                                                    @ com.example.asus.mywarehouse.manualactivity$1addbpb.doinbackground(manualactivity.java:285)                                                                                    @ com.example.asus.mywarehouse.manualactivity$1addbpb.doinbackground(manualactivity.java:266)                                                                                    @ android.os.asynctask$2.call(asynctask.java:295)                                                                                    @ java.util.concurrent.futuretask.run(futuretask.java:237)                                                                                    @ android.os.asynctask$serialexecutor$1.run(asynctask.java:234)                                                                                     @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1113)                                                                                     @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:588)                                                                                     @ java.lang.thread.run(thread.java:818) 

this code :

public void addbpb(){          class addbpb extends asynctask<void, void, string[]> {              progressdialog loading;              @override              protected void onpreexecute() {                  super.onpreexecute();                  loading = progressdialog.show(manualactivity.this, "proses...", "wait...", false, false);              }                @override              protected void onpostexecute(string[] s) {                  super.onpostexecute(s);                  loading.dismiss();                  savedbpb(s);                  toast.maketext(manualactivity.this, s[i], toast.length_long).show();              }              @override              protected string[] doinbackground(void... v) {                    hashmap<string, string> param = new hashmap<>();                  param.put(konfigurasi.key_reg_bpb, reg_bpb1[i]);                  param.put(konfigurasi.key_tgl_bpb, tgl_bpb1[i]);                  param.put(konfigurasi.key_no_part, no_part1[i]);                  param.put(konfigurasi.key_part_desc, part_desc1[i]);                  param.put(konfigurasi.key_spec1, spec11[i]);                  param.put(konfigurasi.key_spec2, spec21[i]);                  param.put(konfigurasi.key_location, location1[i]);                  param.put(konfigurasi.key_qty_bpb, qty_bpb1[i]);                  param.put(konfigurasi.key_line_bpb, line_bpb1[i]);                    requesthandler rh = new requesthandler();                  rh.sendpostrequest(konfigurasi.url_insert_bpb, param);                  return null;              }          }          addbpb ab = new addbpb();          ab.execute();      }      private void savedbpb(string[] args){          x = tl1new.getchildcount();          try {              (i = 0; < x; i++) {                  row[i] = (tablerow) tl1new.getchildat(i);                  reg1[i] = (textview) row[i].getchildat(1);                  reg2[i] = (textview) row[i].getchildat(2);                  reg3[i] = (textview) row[i].getchildat(3);                  reg4[i] = (textview) row[i].getchildat(4);                  reg5[i] = (textview) row[i].getchildat(5);                  reg6[i] = (textview) row[i].getchildat(6);                  reg7[i] = (textview) row[i].getchildat(7);                  reg8[i] = (edittext) row[i].getchildat(8);                  reg9[i] = (edittext) row[i].getchildat(9);                  reg_bpb1[i] = reg1[i].gettext().tostring().trim();                  tgl_bpb1[i] = reg2[i].gettext().tostring().trim();                  no_part1[i] = reg3[i].gettext().tostring().trim();                  part_desc1[i] = reg4[i].gettext().tostring().trim();                  spec11[i] = reg5[i].gettext().tostring().trim();                  spec21[i] = reg6[i].gettext().tostring().trim();                  location1[i] = reg7[i].gettext().tostring().trim();                  qty_bpb1[i] = reg8[i].gettext().tostring().trim();                  line_bpb1[i] = reg9[i].gettext().tostring().trim();              }          } catch (exception e){              e.printstacktrace();          }

please me solved problem.thank's

we cannot see initialization or line numbers because did not provide them - 1 of arrays not initialized - reg_bpb1 or tgl_bpb1 or of others..


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -