bonjour a tous
je realise uu petit programme pour une commande client ""pour avoir le bon de commande client ""....pour cela j'ai afficher les données (qui se trouve dans un serveur) qui me faut dans des spinner pour choisir la données voulu ( nom de client .type de vente......) ,aprés avoir choisi les données je dois les renvoyer au serveur dans une autre table [commandeclient] : en premier lieu j'ai afficher les données dans j'ai besoin dans les spinner ,aprés j'ai créé une class pour envoyer les données choisi au serveur et c'est la ou je bloque ,dés que je clic sur le button enregistrer j'aurai le message d'erreur
Code : Sélectionner tout - Visualiser dans une fenêtre à part
the application has stoped unexpectedly

voici le code que j'ai realiser
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
 
 
 
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;
 
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
 
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
 
 
 
/**
 * 
 */
public class PasserCommande extends Activity {
    InputStream is=null;
    InputStream is1=null;
    String result=null;
    String result1=null;
    String line=null;
    String line1=null;
    String[] client , codclient ,prod ,codprd,modpai;
    String[] codeclient,nomclient;
    Spinner spinnermod,spinnerclinet,spinnercodeclient,spinnertarif;
Button btnenregistrer;
    Button choisirProduit ,choimod;
    private ProgressDialog pDialog ;
    JSONParser jsonParser = new JSONParser();
   Spinner inputNom,inputmodpai,inputtarif,inputNtel2 ,inputcode;
    TextView wid;
 
 
    // url  create  product
    private static String url_create_product = "http://192.168.1.16/ajoutcomnd.php";
 
    private static final String TAG_SUCCESS = "success";
 
 
 
    @Override
    public void onCreate (Bundle savedInstanceState){
        super.onCreate (savedInstanceState);
        setContentView(R.layout.passercommande );
 
       // inputcode = (Spinner) findViewById (R.id.codclient);
    //    inputNom = (Spinner)  findViewById(R.id.client);
      //  inputmodpai=(Spinner) findViewById(R.id.mod);
        //inputtarif=(Spinner)findViewById (R.id.tarif );
       // inputInum=(TextView)findViewById(R.id.wid1);
        btnenregistrer =(Button) findViewById(R.id.btnenregistr);
        btnenregistrer.setOnClickListener(new View.OnClickListener() {
 
            @Override
            public void onClick(View view) {
                new CreateNewProduct1().execute();
            }
        });
 
              afficherspinnermod();
               affichenum();
                new affichespinner3().execute();
              new affichespinner1().execute();
 
    }
 
//************************* affiche moidpaye
    public void afficherspinnermod(){
        //Ton code affichant des choses
 
 
 
 
            spinnermod = (Spinner) findViewById(R.id.mod);
 
 
 
 
 
            final List<String> list11 = new ArrayList<String>();
            final List<String> list22 = new ArrayList<String>();
            final List<String> list3=new ArrayList<String>() ;
 
 
            // TODO Auto-generated method stub
 
            try
            {
                HttpClient httpclient = new DefaultHttpClient();
                HttpPost httppost = new HttpPost("http://192.168.1.16/modpai.php");
                HttpResponse response = httpclient.execute(httppost);
                Log.e("Fail 1", "3");
 
                HttpEntity entity = response.getEntity();
                Log.e("Fail 1", "4");
 
                is = entity.getContent();
                Log.e("Pass 1", "connection success ");
            }
            catch(Exception e)
            {
                Log.e("Fail 1", e.toString());
                Toast.makeText(getApplicationContext(), "Invalid IP Address",Toast.LENGTH_LONG).show();
                finish();
            }
 
 
            try
            {
                BufferedReader reader = new BufferedReader(new InputStreamReader(is,"iso-8859-1"),8);
                StringBuilder sb = new StringBuilder();
                while ((line = reader.readLine()) != null)
                {
                    sb.append(line + "\n");
                }
                is.close();
                result = sb.toString();
            }
            catch(Exception e)
            {
                Log.e("Fail 2", e.toString());
            }
 
 
            try
            {
                JSONArray JA=new JSONArray(result);
                JSONObject json= null;
                client = new String[JA.length()];
                //  codclient = new String[JA.length()];
 
                for(int i=0;i<JA.length();i++)
                {
                    json=JA.getJSONObject(i);
                    client[i] = json.getString("D_MODE");
                    //  codclient[i]=json.getString("D_MODE");
                    // prod[i]=json.getString("MODEPAIE");
 
 
                }
 
                Toast.makeText(getApplicationContext(), "sss", Toast.LENGTH_LONG).show();
 
                for(int i=0;i< client.length;i++)
                {
                    list11.add(client[i]);
                    // list22.add(codclient[i]);
 
                }
 
                spinner_fn();
 
            }
            catch(Exception e)
            {
 
                Log.e("Fail 3", e.toString());
//login.this.finish();
 
            }
        }
 
 
 
    private void spinner_fn() {
        // TODO Auto-generated method stub
 
        ArrayAdapter<String> dataAdapter1 = new ArrayAdapter<String>(getApplicationContext(),
                android.R.layout.simple_spinner_item, client);
        dataAdapter1.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
        spinnermod.setAdapter(dataAdapter1);
 
 
        spinnermod.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener()
 
        {
            @Override
            public void onItemSelected(AdapterView<?> arg0, View arg1, int position, long id) {
// TODO Auto-generated method stub
 
 
            }
 
            @Override
            public void onNothingSelected(AdapterView<?> arg0) {
// TODO Auto-generated method stub
            }
 
        });
 
 
    }
 
 
//*****************************
 
 
public void  affichenum() {
 
 
 
 
 
 
       wid = (TextView) findViewById(R.id.wid1);
 
 
        JSONObject json = null;
        String str = "";
        HttpResponse response;
        HttpClient myClient = new DefaultHttpClient();
        HttpPost myConnection = new HttpPost("http://192.168.1.16/num_comnd.php");
 
        try {
            response = myClient.execute(myConnection);
            str = EntityUtils.toString(response.getEntity(), "UTF-8");
 
        } catch (ClientProtocolException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
 
        try {
            JSONArray jArray = new JSONArray(str);
            json = jArray.getJSONObject(0);
 
            wid.setText(json.getString("ADD"));
            // name.setText(json.getString("name"));
            //url.setText(json.getString("url"));
 
        } catch (JSONException e) {
            e.printStackTrace();
        }
 
 
    }
 
 
 
 
 
 
 
//*************************************
        class affichespinner1 extends AsyncTask <String,String,String>{
            @Override
            protected String doInBackground(String... params) {
                return null;
            }
 
            @Override
            protected void onPreExecute() {
                super.onPreExecute();
 
 
            spinnerclinet = (Spinner) findViewById(R.id.client);
                      spinnercodeclient = (Spinner) findViewById(R.id.codclient);
 
 
 
 
 
        final List<String> list1 = new ArrayList<String>();
        final List<String> list2 = new ArrayList<String>();
        final List<String> list3=new ArrayList<String>() ;
 
 
        // TODO Auto-generated method stub
 
                try
                {
                    HttpClient httpclient = new DefaultHttpClient();
                    HttpPost httppost = new HttpPost("http://192.168.1.16/SPINNER.php");
                    HttpResponse response = httpclient.execute(httppost);
                    Log.e("Fail 1", "3");
 
                    HttpEntity entity = response.getEntity();
                    Log.e("Fail 1", "4");
 
                    is = entity.getContent();
                    Log.e("Pass 1", "connection success ");
                }
                catch(Exception e)
                {
                    Log.e("Fail 1", e.toString());
                    Toast.makeText(getApplicationContext(), "Invalid IP Address",Toast.LENGTH_LONG).show();
                    finish();
                }
 
 
                try
                {
                    BufferedReader reader = new BufferedReader(new InputStreamReader(is,"iso-8859-1"),8);
                    StringBuilder sb = new StringBuilder();
                    while ((line = reader.readLine()) != null)
                    {
                        sb.append(line + "\n");
                    }
                    is.close();
                    result = sb.toString();
                }
                catch(Exception e)
                {
                    Log.e("Fail 2", e.toString());
                }
 
 
                try
                {
                    JSONArray JA=new JSONArray(result);
                    JSONObject json= null;
                    client = new String[JA.length()];
                    codclient = new String[JA.length()];
 
                    for(int i=0;i<JA.length();i++)
                    {
                        json=JA.getJSONObject(i);
                        client[i] = json.getString("C_PRODUIT");
                       codclient[i]=json.getString("D1_PROD");
                       // prod[i]=json.getString("MODEPAIE");
 
 
                    }
 
                   Toast.makeText(getApplicationContext(), "sss", Toast.LENGTH_LONG).show();
 
                    for(int i=0;i< client.length;i++)
                    {
                        list1.add(client[i]);
                        list2.add(codclient[i]);
 
                    }
 
                    spinner_fn();
 
                }
                catch(Exception e)
                {
 
                    Log.e("Fail 3", e.toString());
//login.this.finish();
 
                }
            }
 
 
 
   private void spinner_fn() {
                   // TODO Auto-generated method stub
 
        ArrayAdapter<String> dataAdapter1 = new ArrayAdapter<String>(getApplicationContext(),
                android.R.layout.simple_spinner_item, client);
        dataAdapter1.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
        spinnerclinet.setAdapter(dataAdapter1);
 
 
        ArrayAdapter<String> dataAdapter2 = new ArrayAdapter<String>(getApplicationContext(),
                android.R.layout.simple_spinner_item, codclient);
        dataAdapter2.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
        spinnercodeclient.setAdapter(dataAdapter2);
 
 
 
 
        spinnerclinet.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener()
 
        {
            @Override
            public void onItemSelected(AdapterView<?> arg0, View arg1,int position, long id)
            {
// TODO Auto-generated method stub
 
                spinnercodeclient.setSelection(position);
 
            }
 
            @Override
            public void onNothingSelected(AdapterView<?> arg0)
            {
// TODO Auto-generated method stub
            }
 
        });
 
 
        spinnercodeclient.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
 
            @Override
            public void onItemSelected(AdapterView<?> arg0, View arg2,int position, long arg3) {
// TODO Auto-generated method stub
 
                spinnerclinet.setSelection(position);
 
            }
 
            @Override
            public void onNothingSelected(AdapterView<?> arg0) {
// TODO Auto-generated method stub
            }
        });
 
    }}
 
 
 
 
 
 
   // ***************************
 
//***************************************************
 
 
 
 
      class affichespinner3 extends AsyncTask <String,String,String>{
           @Override
           protected String doInBackground(String... params) {
               return null;
           }
 
           @Override
           protected void onPreExecute() {
               super.onPreExecute();
 
 
               spinnertarif = (Spinner) findViewById(R.id.tarif);
 
 
 
 
 
               final List<String> list11 = new ArrayList<String>();
               final List<String> list22 = new ArrayList<String>();
               final List<String> list3=new ArrayList<String>() ;
 
 
               // TODO Auto-generated method stub
 
               try
               {
                   HttpClient httpclient = new DefaultHttpClient();
                   HttpPost httppost = new HttpPost("http://192.168.1.16/typevent.php");
                   HttpResponse response = httpclient.execute(httppost);
                   Log.e("Fail 1", "3");
 
                   HttpEntity entity = response.getEntity();
                   Log.e("Fail 1", "4");
 
                   is = entity.getContent();
                   Log.e("Pass 1", "connection success ");
               }
               catch(Exception e)
               {
                   Log.e("Fail 1", e.toString());
                   Toast.makeText(getApplicationContext(), "Invalid IP Address",Toast.LENGTH_LONG).show();
                   finish();
               }
 
 
               try
               {
                   BufferedReader reader = new BufferedReader(new InputStreamReader(is,"iso-8859-1"),8);
                   StringBuilder sb = new StringBuilder();
                   while ((line = reader.readLine()) != null)
                   {
                       sb.append(line + "\n");
                   }
                   is.close();
                   result = sb.toString();
               }
               catch(Exception e)
               {
                   Log.e("Fail 2", e.toString());
               }
 
 
               try
               {
                   JSONArray JA=new JSONArray(result);
                   JSONObject json= null;
                   client = new String[JA.length()];
                   //  codclient = new String[JA.length()];
 
                   for(int i=0;i<JA.length();i++)
                   {
                       json=JA.getJSONObject(i);
                       client[i] = json.getString("D_VENTE");
                       //  codclient[i]=json.getString("D_MODE");
                       // prod[i]=json.getString("MODEPAIE");
 
 
                   }
 
                   Toast.makeText(getApplicationContext(), "sss", Toast.LENGTH_LONG).show();
 
                   for(int i=0;i< client.length;i++)
                   {
                       list11.add(client[i]);
                       // list22.add(codclient[i]);
 
                   }
 
                   spinner_fn();
 
               }
               catch(Exception e)
               {
 
                   Log.e("Fail 3", e.toString());
//login.this.finish();
 
               }
           }
 
 
 
           private void spinner_fn() {
               // TODO Auto-generated method stub
 
               ArrayAdapter<String> dataAdapter1 = new ArrayAdapter<String>(getApplicationContext(),
                       android.R.layout.simple_spinner_item, client);
               dataAdapter1.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
               spinnertarif.setAdapter(dataAdapter1);
 
 
               spinnertarif.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener()
 
               {
                   @Override
                   public void onItemSelected(AdapterView<?> arg0, View arg1, int position, long id) {
// TODO Auto-generated method stub
 
 
                   }
 
                   @Override
                   public void onNothingSelected(AdapterView<?> arg0) {
// TODO Auto-generated method stub
                   }
 
               });
 
 
           }}
 
 
 
//**************************************************************
 
    class CreateNewProduct1 extends AsyncTask<String, String, String> {
        @Override
        protected void onPreExecute() {
            super.onPreExecute();
            pDialog = new ProgressDialog(PasserCommande.this);
            pDialog.setMessage("patientez svp ..... .... .. ... ... .. ....    .");
            pDialog.setIndeterminate(false);
            pDialog.setCancelable(true);
            pDialog.show();
        }
 
        protected String doInBackground(String... args) {
 
 
            /**
             * Creating product
             * */
 
            String code=spinnercodeclient.getSelectedItem().toString();
            String mod = spinnermod.getSelectedItem().toString();
            String tarif=spinnertarif.getSelectedItem().toString();
            String nom = spinnerclinet.getSelectedItem().toString();
            String num= wid.getText().toString();
 
 
 
 
            //
            List<NameValuePair> params = new ArrayList<NameValuePair>();
 
 
            params.add(new BasicNameValuePair("CLIENT", code));
            //    params.add(new BasicNameValuePair("CLIENT", nom));
            params.add(new BasicNameValuePair("TYPEVENT", mod));
            // params.add(new BasicNameValuePair("CLIENT", tarif));
            params.add(new BasicNameValuePair("NUMBON", num));
            // params .add(new BasicNameValuePair("NUM"))
 
            //
            //
            JSONObject json = jsonParser.makeHttpRequest(url_create_product, "POST", params);
 
 
            Log.d("Create Response", json.toString());
 
            try {
                int success = json.getInt(TAG_SUCCESS);
 
                if (success == 1) {
                    // succes created product
                    Intent i = new Intent(getApplicationContext(), Afficher_listCL.class);
                    startActivity(i);
 
 
                    finish();
                }
            }
            catch (JSONException e) {
                e.printStackTrace();
            }
 
            return null;
        }
 
 
        protected void onPostExecute(String file_url) {
 
            pDialog.dismiss();
        }
    }}


voici aussi le script php que j'ai créer pour l'envoi de données au serveur ""ajoutcomnd"

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
 
  $dbName = 'localhost:D:/attouch/CONTACT.MSC';
  $dbUser = 'SYSDBA';
  $dbPswd = 'masterkey';
// ouvrir la cox a une bdd 
   @($db = ibase_connect($dbName, $dbUser, $dbPswd)) or $db = nul;
// array for JSON response
 
   $response = array();
 
// check for required fields
    if ( isset($_POST['CLIENT']) &&isset($_POST['NUMBON']) && isset($_POST['TYPEVENT']) ) {
 
 
  $CLIENT = $_POST['CLIENT'];
   $NUMBON = $_POST['NUMBON'];
    $TYPEVENT = $_POST['TYPEVENT'];
 
 
 
 
 
 $result = ibase_query("INSERT INTOCOMMANDC(CLIENT, NUMBON,TYPEVENT) 
 
								VALUES
 
								('$CLIENT','$NUMBON','$TYPEVENT')");
 
    // check if row inserted or not
   if ($result) {
        // successfully inserted into database                                     
        $response["success"] = 1;
        $response["message"] = "Product successfully created.";
 
        // echoing JSON response
      echo json_encode($response);
    } else {
        // failed to insert row
        $response["success"] = 0;
        $response["message"] = "Oops! An error occurred.";
 
        // echoing JSON response
    echo json_encode($response);
    }
} else {
    // required field is missing
    $response["success"] = 0;
    $response["message"] = "Required field(s) is missing";
     //echoing JSON response
    echo json_encode($response);
}
?>
le logcat m'affiche les erreur suivante


Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
 
06-22 12:05:17.219      802-814/riro15.exemple_web_service E/JSON Parser﹕ Error parsing data org.json.JSONException: Value <br of type java.lang.String cannot be converted to JSONObject
06-22 12:05:17.579      802-814/riro15.exemple_web_service W/dalvikvm﹕ threadid=11: thread exiting with uncaught exception (group=0x40015560)
06-22 12:05:17.649      802-814/riro15.exemple_web_service E/AndroidRuntime﹕ FATAL EXCEPTION: AsyncTask #3
    java.lang.RuntimeException: An error occured while executing doInBackground()
            at android.os.AsyncTask$3.done(AsyncTask.java:200)
            at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:274)
            at java.util.concurrent.FutureTask.setException(FutureTask.java:125)
            at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:308)
            at java.util.concurrent.FutureTask.run(FutureTask.java:138)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
            at java.lang.Thread.run(Thread.java:1019)
     Caused by: java.lang.NullPointerException
            at samah.webservice.PasserCommande$CreateNewProduct1.doInBackground(PasserCommande.java:756)
            at samah.webservice.PasserCommande$CreateNewProduct1.doInBackground(PasserCommande.java:713)
            at android.os.AsyncTask$2.call(AsyncTask.java:185)
            at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
************at java.util.concurrent.FutureTask.run(FutureTask.java:138)
************at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
************at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
************at java.lang.Thread.run(Thread.java:1019)
06-22 12:05:21.759      802-802/riro15.exemple_web_service E/WindowManager﹕ Activity samah.webservice.PasserCommande has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@40aa1b90 that was originally added here
    android.view.WindowLeaked: Activity samah.webservice.PasserCommande has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@40aa1b90 that was originally added here
            at android.view.ViewRoot.<init>(ViewRoot.java:258)
            at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:148)
            at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
            at android.view.Window$LocalWindowManager.addView(Window.java:424)
            at android.app.Dialog.show(Dialog.java:241)
            at samah.webservice.PasserCommande$CreateNewProduct1.onPreExecute(PasserCommande.java:721)
            at android.os.AsyncTask.execute(AsyncTask.java:391)
            at samah.webservice.PasserCommande$1.onClick(PasserCommande.java:82)
            at android.view.View.performClick(View.java:2485)
            at android.view.View$PerformClick.run(View.java:9080)
            at android.os.Handler.handleCallback(Handler.java:587)
            at android.os.Handler.dispatchMessage(Handler.java:92)
            at android.os.Looper.loop(Looper.java:123)
            at android.app.ActivityThread.main(ActivityThread.java:3683)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:507)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
            at dalvik.system.NativeStart.main(Native Method)
si quelqu'un a une idée pour quoi j'arrive pas a envoyé les données au serveur d'apré les erreur merci d'intervenir ""je serai reconnaissante ""

et j'ai besoin aussi de savoir est se que je suis sur la bonne voie
merci a l'avance ,toutes reponses est la bienvenue