答:
I faced a similar problem when plotting numbers containing a lot of zeros. If your number is represented like 10E-38 format in the csv file, try multiplying all the rows by 1 and then read the data using pandas.

This solved the problem in my case.

Title: Plotting x and y axis in log scale

Body:
Everything is fine when I plot only y axis in log scale.

import pandas as pd
import numpy
import matplotlib.pyplot as plt

iplevel = pd.read_csv('iplevel.csv')
fig = plt.figure()
#plt.xscale('log')
plt.yscale('log')
plt.title(' Size Vs Duration (at IP level) for ')

plt.xlabel('Duration (in seconds)')
plt.ylabel('Size (in bytes)')
plt.scatter(iplevel['Time'], iplevel['Length'])
fig.tight_layout()
fig.savefig('iplevel_timevdur.png', dpi=fig.dpi)

Something strange happens when I plot both x and y axis in log scale.

iplevel = pd.read_csv('iplevel.csv')
fig = plt.figure()
plt.xscale('log')
plt.yscale('log')
plt.title(' Size Vs Duration (at IP level) for ')

plt.xlabel('Duration (in seconds)')
plt.ylabel('Size (in bytes)')
plt.scatter(iplevel['Time'], iplevel['Length'])
fig.tight_layout()
fig.savefig('iplevel_timevdur.png', dpi=fig.dpi)

I am not sure where I am going wrong. How can the data be correctly plotted with log-log?

My trace file can be downloaded from here. Here are the top 1800 of 2715 rows sorted by 'Time'.

Length,Time
64,0.0
64,0.0
64,0.0
863,0.0
259,0.0
64,0.0
64,0.0
78,0.0
64,0.0
64,0.0
64,0.0
86,0.0
64,0.0
102,0.0
64,0.0
140,0.0
90,0.0
140,0.0
152,0.0
260,0.0
64,0.0
1419,0.0
64,0.0
64,0.0
64,0.0
64,0.0
64,0.0
64,0.0
140,0.0
64,0.0
140,0.0
64,0.0
64,0.0
64,0.0
64,0.0
64,0.0
64,0.0
634,0.0
64,0.0
64,0.0
64,0.0
64,0.0
78,0.0
64,0.0
1241,0.0
64,0.0
64,0.0
64,0.0
64,0.0
64,0.0
66,0.0
64,0.0
64,0.0
64,0.0
66,0.0
66,0.0
64,0.0
64,0.0
64,0.0
64,0.0
64,0.0
64,0.0
64,0.0
64,0.0
78,0.0
66,0.0
66,0.0
66,0.0
64,0.0
66,0.0
66,0.0
64,0.0
64,0.0
64,0.0
140,0.0
140,0.0
140,0.0
66,0.0
64,0.0
64,0.0
64,0.0
64,0.0
64,0.0
64,0.0
64,0.0
70,0.0
64,0.0
64,0.0
64,0.0
64,0.0
64,0.0
64,0.0
70,0.0
64,0.0
64,0.0
64,0.0
70,0.0
64,0.0
82,0.0
70,0.0
122,0.0
70,0.0
174,0.0
64,0.0
911,0.0
64,0.0
64,0.0
64,0.0
128,0.0
129,0.0
64,0.0
64,0.0
140,0.0
140,0.0
64,0.0
94,0.0
1518,0.0
64,0.0
64,0.0
68,0.0
127,0.0
70,0.0
86,0.0
66,0.0
66,0.0
64,0.0
66,0.0
66,0.0
66,0.0
64,0.0
70,0.0
86,0.0
64,0.0
66,0.0
64,0.0
64,0.0
64,0.0
64,0.0
140,0.0
1045,0.0
64,0.0
70,0.0
64,0.0
64,0.0
70,0.0
64,0.0
140,0.0
66,0.0
70,0.0
140,0.0
64,0.0
64,0.0
171,0.0
128,4.00000000411e-06
128,4.99999999803e-06
128,8.00000000112e-06
128,2.29999999988e-05
448,3.00000000002e-05
140,4.40000000026e-05
256,7.19999999959e-05
384,0.000106999999986
320,0.000121000000007
384,0.000253999999984
128,0.000342
204,0.000381000000004
140,0.000453
204,0.000878999999998
358,0.001082
448,0.001192
315,0.00134000000003
448,0.00136600000002
280,0.001679
128,0.001698
635,0.001723
324,0.00185
174,0.00224799999998
128,0.002389
128,0.002625
128,0.002629
128,0.00279799999999
635,0.00283899999997
635,0.002866
2917,0.00290999999999
128,0.002927
761,0.00293099999999
198,0.00299800000001
128,0.003002
198,0.003066
128,0.00318299999998
128,0.003261
391,0.00328500000001
128,0.003311
128,0.003378
1372,0.00350099999997
128,0.003875
634,0.00393600000001
128,0.00412900000001
128,0.00423000000001
642,0.00425000000001
128,0.00425200000001
128,0.00436499999995
128,0.00437899999999
128,0.00458800000001
128,0.00463000000002
128,0.00491100000001
128,0.00500199999999
724,0.005042
856,0.00510100000002
128,0.00520300000005
128,0.005244
146,0.00525199999999
128,0.005268
128,0.0054
128,0.005458
128,0.005505
128,0.005516
213,0.00555099999997
146,0.00557399999997
1128,0.00558500000001
128,0.00563299999999
128,0.0057
128,0.00574699999999
1454,0.00586200000001
2202,0.00588400000001
128,0.00593999999995
128,0.00594099999995
128,0.00600400000002
128,0.00604500000003
128,0.00613000000001
1638,0.00623899999999
128,0.00624499999998
128,0.00663800000001
420,0.006648
128,0.00665499999999
2917,0.00671500000001
889,0.00673999999998
128,0.00673999999998
128,0.00719199999997
213,0.007203
146,0.00725600000004
128,0.00731100000002
128,0.00731200000001
128,0.00744800000001
128,0.00780899999995
128,0.008038
128,0.00837999999999
128,0.00841500000001
128,0.008512
128,0.00854400000009
128,0.00867199999999
128,0.00873899999999
194,0.00874200000001
128,0.00896799999998
128,0.00931600000001
128,0.00939499999993
128,0.00957499999998
128,0.00968400000002
128,0.00969899999998
128,0.00976299999999
128,0.00981899999999
146,0.00988299999997
128,0.010383
128,0.010574
128,0.010702
128,0.011247
256,0.011263
128,0.0114830000001
128,0.011669
128,0.012947
128,0.013
128,0.013004
128,0.013068
128,0.013546
128,0.013569
134,0.013771
128,0.013863
128,0.013904
128,0.013956
128,0.014034
488,0.014187
128,0.014252
768,0.014261
128,0.014387
128,0.014798
128,0.015014
128,0.015765
128,0.015956
637,0.01609
128,0.016199
128,0.016338
128,0.018201
128,0.018332
340,0.019342
174,0.019462
128,0.019505
128,0.020325
248,0.020937
128,0.021647
2291,0.021786
1685,0.021814
128,0.022295
637,0.022531
128,0.024646
555,0.025917
194,0.029173
637,0.030238
1096,0.033326
1186,0.033387
1416,0.039525
1282,0.04019
37292,0.042872
1920,0.050076
198,0.05401
2613,0.0541250000001
5408,0.058094
194,0.062085
1163,0.063978
4145,0.064394
401,0.065523
256,0.069589
194,0.071795
174,0.073762
1835,0.07433
1763,0.074372
5808,0.07657
1198,0.078694
192,0.079372
740,0.079504
1017,0.083836
357,0.084731
1311,0.084966
646,0.085513
382,0.085933
355,0.089751
356,0.092304
354,0.095439
375,0.095455
64438,0.097073
356,0.098272
1085,0.104543
1707,0.106295
128,0.107193
128,0.116315
128,0.11694
256,0.117687
194,0.120159
128,0.121077
274,0.12117
128,0.121954
128,0.121982
128,0.122509
128,0.123191
128,0.123441
421,0.124742
128,0.127664
128,0.128375
128,0.129587
128,0.129691
12298,0.129699
151,0.129914
716,0.130497
128,0.131315
128,0.132431
128,0.132454
128,0.132505
143,0.133811
128,0.133967
502,0.136675
401,0.137227
128,0.137713
128,0.138319
158,0.140466
158,0.140539
772,0.142128
128,0.142269
128,0.143148
128,0.143635
635,0.144937
158,0.145076
1895,0.146925
2319,0.147019
128,0.147344
128,0.1482
128,0.149632
128,0.150156
392,0.150575
128,0.153975
128,0.155053
128,0.155361
491,0.155367
1036,0.155489
815,0.155604
256,0.155636
158,0.155997
391,0.156097
128,0.156179
128,0.15667
128,0.157108
194,0.158414
487,0.158753
24731,0.159841
128,0.15987
2080,0.160029
128,0.160672
128,0.161457
128,0.163697
129,0.164798
128,0.165359
692,0.165807
176,0.167277
169,0.168042
128,0.168774
128,0.169179
196,0.172226
827,0.172598
644,0.174389
5952,0.174891
929,0.174913
293,0.176155
128,0.177965
143,0.178284
128,0.178395
128,0.178532
128,0.178967
128,0.179142
1234,0.180979
2687,0.180993
132,0.181699
128,0.182471
575,0.182731
1056,0.182738
128,0.185525
128,0.185713
583,0.185903
128,0.18656
579,0.186636
128,0.187764
128,0.188738
565,0.191839
128,0.193028
201,0.193634
128,0.193767
128,0.194193
128,0.194831
128,0.194946
189,0.194996
128,0.19509
128,0.195895
128,0.196691
302,0.196983
151,0.197677
128,0.198477
128,0.198502
128,0.199194
158,0.199917
128,0.200496
187,0.202062
128,0.205278
151,0.205333
128,0.205422
580,0.20576
128,0.206018
128,0.207292
128,0.208323
128,0.210094
188,0.210111
132,0.215272
128,0.216109
192,0.216621
158,0.218086
132,0.21816
5295,0.219534
913,0.219622
342,0.221066
158,0.224464
128,0.225023
158,0.226123
463,0.228006
493,0.231975
706,0.232099
158,0.232812
128,0.233406
2696,0.23379
128,0.233908
634,0.235822
129,0.23812
129,0.23883
329,0.239234
638,0.242231
445,0.243746
158,0.244659
1663,0.246321
158,0.249088
747,0.249402
158,0.2499
21044,0.250114
198,0.25574
348,0.258529
128,0.260478
4082,0.261739
2284,0.262233
192,0.262749
128,0.263667
306,0.264054
128,0.26577
1373,0.270913
1888,0.271282
1274,0.275812
12018,0.275892
10476,0.276982
583,0.277477
216,0.282457
14545,0.284088
192,0.286135
128,0.286502
192,0.288131
192,0.290647
128,0.291587
192,0.291958
192,0.292444
192,0.292899
192,0.29314
192,0.29407
192,0.29408
192,0.294389
128,0.295584
192,0.295769
192,0.296455
192,0.296522
192,0.297143
128,0.299582
192,0.300152
128,0.303719
10901,0.304753
158,0.311613
15294,0.311968
169,0.318904
16637,0.323573
128,0.323853
1131,0.326026
5624,0.32706
858,0.327223
193160,0.327704
5027,0.328746
16486,0.328849
16519,0.33159
16614,0.332795
16499,0.334356
13759,0.337339
17856,0.338391
16494,0.338654
17719,0.34317
9415,0.343345
930,0.346175
381,0.34628
16303,0.348078
15178,0.348412
775,0.348559
19238,0.350086
18700,0.353331
256,0.359896
382,0.359918
2558,0.360789
46880,0.361324
15910,0.365415
1264,0.365972
679,0.366998
15467,0.368123
5525,0.369106
12990,0.371463
17966,0.372187
17663,0.372509
134,0.375373
719,0.375583
17571,0.375708
1364,0.379144
1879,0.379576
2607,0.381864
1703,0.388304
17350,0.388741
13914,0.389419
660,0.394224
2618,0.405323
59357,0.405666
843,0.40665
26746,0.407601
3840,0.409754
4956,0.410115
1368,0.412279
815,0.413427
892,0.416514
839,0.418113
17118,0.418644
827,0.419991
810,0.421766
877,0.422231
901,0.422979
1276,0.426812
17086,0.427301
17470,0.428345
18848,0.432816
1013,0.433402
15324,0.44241
1187,0.442809
651,0.442949
1674,0.443054
725,0.445347
984,0.446618
19421,0.447274
812,0.447613
20072,0.448172
198,0.453756
846,0.454722
823,0.455468
3000,0.458553
74223,0.45879
811,0.464353
17925,0.465033
957,0.466624
903,0.46717
853,0.471707
883,0.474617
15265,0.475074
2859,0.479295
69231,0.479809
22274,0.482061
1430,0.482937
1152,0.483017
192,0.495713
1256,0.496494
262,0.512057
945,0.514055
882,0.516906
813,0.521878
1190,0.526782
16500,0.531624
1392,0.531651
1146,0.533169
11746,0.534001
731,0.547279
69763,0.562352
2269,0.562531
814,0.567499
1155,0.567765
15278,0.568393
2280,0.571201
8595,0.571894
649,0.577326
27680,0.580275
45720,0.580645
925,0.587776
610,0.587808
13084,0.58785
811,0.591747
15561,0.610443
805,0.612655
1393,0.612754
8595,0.614398
16450,0.615835
747,0.616062
632,0.617268
130,0.617361
128,0.619322
709,0.624645
18616,0.625252
128,0.626572
22915,0.630266
1471,0.630274
3278,0.632551
2644,0.633244
14472,0.638248
1007,0.645869
927,0.648553
612,0.64867
742,0.652169
1869,0.65374
944,0.654074
629,0.654108
11976,0.657089
944,0.66175
923,0.662101
608,0.66242
923,0.662682
608,0.662912
629,0.663036
1199,0.663707
1392,0.665542
942,0.670232
627,0.670315
3276,0.672378
16473,0.68492
15610,0.687139
981,0.690428
966,0.696134
742,0.696406
15377,0.696902
15390,0.697062
4036,0.698605
14278,0.698683
2145,0.699245
973,0.700019
979,0.707477
900,0.720126
1014,0.72825
1338,0.728329
21603,0.734982
4417,0.73812
29601,0.738155
815,0.739386
15692,0.752112
904,0.767532
16403,0.769054
9863,0.77061
256,0.7783
908,0.778677
876,0.78051
1039,0.783406
906,0.785664
80790,0.798551
8024,0.81017
1144,0.810329
1071,0.820726
5029,0.82554
9165,0.829863
1747,0.829993
24116,0.836781
910,0.839971
14206,0.844666
256,0.860852
939,0.863164
21119,0.878541
12890,0.895014
145219,0.898687
1126,0.904611
262,0.906134
2287,0.918069
39641,0.919033
1161,0.920171
819,0.928013
766,0.957101
89878,0.958262
2229,0.990084
3440,0.997017
192,1.002555
1455,1.005322
198,1.006339
129423,1.020995
93375,1.036018
177021,1.042311
3976,1.04486
1485,1.04614
116872,1.056224
2031,1.068529
14510,1.072201
143841,1.099723
1391,1.113283
2606,1.116592
2594,1.12213
198,1.124238
192,1.124257
2478,1.132794
4272,1.137188
198,1.144263
192,1.144285
3183,1.14648
121979,1.170081
2168,1.179906
4143,1.196728
228562,1.199929
316231,1.206644
1323,1.237462
229051,1.249463
19961,1.258074
1946,1.258145
3375,1.259435
15663,1.28884
1575,1.288916
7408,1.288983
530,1.322116
627,1.322308
16002,1.323453
529,1.327567
626,1.327778
53706,1.347712
160416,1.361633
149,1.37606
412,1.381473
6267,1.406762
1014,1.407138
5616,1.423929
2990,1.445728
1927,1.451354
534,1.472753
647,1.47312
861,1.498473
4334,1.513561
1298,1.538317
150,1.568103
1553,1.585452
71503,1.590587
1852,1.618126
723,1.618197
121256,1.622943
16237,1.622989
4602,1.624606
6117,1.627509
535,1.633484
1241,1.671162
994,1.673655
693,1.676804
12577,1.67702
1103,1.702646
396,1.732566
31302,1.778889
3096,1.779305
5547,1.805192
536,1.81023
634,1.810236
537,1.840026
16989,1.870537
24671,1.885863
5787,1.907246
4702,1.920082
10970,1.928192
785,1.928722
14565,1.93629
18750,1.945438
2355,1.94557
1756,1.947581
2671,1.969702
8263,1.994232
501,1.995956
851,1.996988
3033,2.029218
454182,2.036176
827,2.069595
1888,2.070088
2892,2.104399
2300,2.108769
2681,2.108788
877,2.114206
12283,2.121828
1632,2.122034
11827,2.147509
1506,2.186309
969740,2.188838
12461,2.189016
2248,2.20968
371473,2.210276
8181,2.225332
786,2.225418
2248,2.232343
23839,2.241228
11621,2.242529
1111,2.242709
2184,2.292833
63730,2.299825
2893,2.301329
20601,2.301606
2124,2.301609
281,2.311735
8304,2.314339
11800,2.370985
1728,2.371172
2306,2.393358
22640,2.429165
4812,2.460628
531,2.491491
652,2.491733
33066,2.501009
11801,2.50768
11433,2.51471
1586,2.515188
101935,2.52349
2766,2.555168
1454,2.568969
132,2.605332
10128,2.641432
152430,2.657356
132,2.662684
713590,2.666913
16449,2.677721
510270,2.682183
62273,2.682551
132,2.709093
1861,2.760515
4997,2.763797
32183,2.788247
28203,2.819616
188,2.829825
132,2.829845
132,2.859078
132,2.874831
132,2.877107
6717,2.880421
140,2.883029
132,2.888551
132,2.89541
231583,2.896035
14649,2.896089
188,2.905811
132,2.905864
140,2.909935
132,2.921413
132,2.926216
594179,2.934438
132,2.935134
132,2.937042
132,2.937339
188,2.944347
132,2.944383
132,2.945864
132,2.948357
188,2.949984
132,2.950012
132,2.955311
132,2.955782
132,2.973507
132,2.974241
188,2.974255
140,2.974314
4154,2.980287
132,2.987635
132,2.989622
196,2.995861
140,2.995898
132,2.996507
132,3.003683
132,3.010068
196,3.03095
140,3.030982
132,3.046541
188,3.059764
132,3.059767
798,3.065923
2490,3.065944
51757,3.069919
15939,3.070065
132,3.091565
188,3.134578
132,3.134596
132,3.156098
23862,3.328135
1188,3.403315
182006,3.525185
46909,3.550847
600,3.561394
33015,3.571232
4870,3.588634
3186,3.594933
4684,3.596317
778064,3.711828
194351,3.749875
44380,3.757992
187189,3.773862
37403,3.788837
1294,3.792151
25557,3.84727
33263,3.867362
2674,3.955699
29556,3.956341
46507,3.9855
3409,3.986021
1235477,3.988403
15875,3.988542
828,4.011879
1642,4.017698
1456,4.018648
2380,4.019865
9151,4.021732
1126,4.02323
5623,4.046406
713163,4.167962
1138,4.190889
433256,4.194556
55913,4.194586
3361,4.31616
1638,4.327699
590,4.352503
600,4.418513
2699,4.510693
7632,4.510712
5732,4.573728
17280,4.643326
95087,4.655412
526,4.740544
438,4.795442
343843,4.808577
7627,4.814397
96013,4.943395
30328,4.946314
1536,5.000289
128,5.007982
256,5.010265
2678,5.046594
108964,5.049791
528,5.059995
256,5.064265
1517,5.089856
11573,5.090594
78826,5.201509
1151,5.207485
2133,5.250767
29456,5.251277
33735,5.261163
16623,5.276747
42689,5.342746
1578,5.343163
29444,5.346298
1153,5.346504
147161,5.514467
52188,5.515374
624020,5.538305
68841,5.658944
1645,5.802095
17463,5.803419
713838,5.852344
15658,5.888079
3077,5.890258
664872,5.901925
39695,5.938682
1593,5.954034
1389,5.969967
1085,5.997283
140,6.04
140,6.04123
60023,6.084361
205925,6.126518
783,6.14439
2804,6.167283
3314,6.205787
1247,6.226351
17093,6.258374
3157,6.303904
349,6.314832
9493,6.330734
1268,6.334715
1528,6.357317
1217,6.374559
11084,6.380871
1585,6.42386
320,6.499766
320,6.499791
5154,6.515548
282,6.54565
204,6.545663
10451,6.637603
2220,6.648446
2251,6.648522
1506,6.680879
11085,6.712411
1527,6.754794
2825316,6.779147
25802,6.817031
13099,6.872689
900,6.877447
1441,6.877451
54541,6.889001
2074,6.915496
2687,6.968536
249574,6.987169
13218,7.017736
7711,7.099515
352023,7.110319
2322,7.115379
1388,7.116264
10820,7.201955
9918,7.24047
1491,7.244958
3269,7.253851
1626,7.346073
1297,7.346165
2753,7.441404
712036,7.442135
530719,7.512059
72747,7.584628
13279,7.612756
873,7.652044
422192,7.734609
5654,7.813552
56336,7.828346
18947,7.828442
8672,7.832183
2927,7.864585
2086,8.020411
297890,8.288307
49866,8.316907
2679191,8.443889
54472,8.44592
18266,8.47401
75025,8.560657
54681,8.560782
50640,8.618459
129755,8.677643
2475,8.70625
30004,8.725894
5663,8.725984
9659,8.739858
398797,8.777131
525040,8.801648
13069,8.894148
198,8.919396
198,8.921098
282,8.969387
198,8.970145
198,9.020337
2212,9.044279
198,9.077682
198,9.077699
2096,9.080032
2026,9.095516
2026,9.142681
34823,9.64438
5231,9.664765
5699,9.67643
1362,9.684836
23987,9.743977
1424,9.748782
2346,9.835181
1518,10.031819
179966,10.052435
5316,10.135265
11575,10.198598
1683,10.198796
247109,10.216616
196622,10.421853
577104,10.460021
33069,10.488937
43901,10.505849
37936,10.509159
4288,10.551961
726986,10.747564
1592,10.78032
8584,10.806417
1707,10.806453
5689,11.103723
1982,11.112576
5740,11.115402
20958,11.166415
31286,11.166668
2821,11.348105
26873,11.58282
1803,11.605445
2530,11.625458
134,11.749506
44771,11.872257
3266,11.954945
6154,12.033907
653,12.053118
6375,12.079911
3026,12.081055
80914,12.102561
45120,12.102651
1432,12.190595
37698,12.200103
2205,12.283717
71186,12.314994
98181,12.373568
4526,12.386216
45161,12.521104
2569,12.615017
6428,12.68426
2900,12.789244
2392,12.831736
294,12.840956
26584,12.943789
225408,13.010517
1494,13.037758
1262,13.094175
3106,13.129601
5777,13.320724
52969,13.564688
1910,13.597492
14116,13.636178
2837,13.64823
947329,13.671967
24962,13.841465
3414,13.884591
31428,14.11272
1725,14.191999
32116,14.240096
1790,14.31921
514411,14.400074
12109,14.503665
4259,14.583757
54489,14.605187
89140,14.670161
118040,14.68613
2616,14.687748
3625,14.753408
3550,14.775092
2667,14.838907
199391,14.981492
502475,15.034957
68310,15.047907
4473,15.071961
1762,15.072868
6980,15.113657
2218,15.114614
2474,15.1178
12562,15.124192
62042,15.124814
9370,15.129725
1301,15.129822
25905,15.244145
90338,15.27131
3060,15.271499
5639,15.329547
531,15.352791
1070,15.35291
114628,15.366236
809,15.370167
1062,15.390823
1256,15.391084
263968,15.516799
799084,15.632512
29650,15.696052
57678,15.698549
407386,15.712358
5944,15.77841
116952,15.785632
9870,15.801099
925,15.819658
34372,15.869178
1890,15.86919
418675,15.88866
3815,15.91148
134840,15.943084
10240,16.029456
11193,16.075111
1436,16.200987
323252,16.225831
88551,16.246452
560031,16.264048
3424,16.323389
4350,16.328874
6622,16.340168
5379,16.466085
717612,16.488558
8133,16.532172
3040,16.543965
149357,16.544136
84531,16.596882
2980,16.664897
449500,16.707105
4986,16.721756
1417,16.722774
538,16.734443
94481,16.742802
8070,16.747063
702,16.768075
10775,16.795328
644059,16.81496
22434,16.819927
1314,16.82004
4829,16.824694
8306,16.897107
906,16.897211
505157,16.972408
27913,17.13434
27633,17.20429
317523,17.497567
8658,17.590233
5715,17.729557
833,17.766507
15812,17.821605
3530,17.849879
1058,17.849992
8230,17.9448
28636,18.20919
24460,18.209265
19120,18.271989
644776,18.286225
407274,18.332685
112007,18.333745
492731,18.34942
24630,18.349489
16994,18.378234
66928,18.383215
14629,18.945454
2034,18.945639
11373,19.010612
642,19.196347
12015,19.589997
3438,19.731085
66889,19.737977
23965,19.782133
4320,19.785513
2970,19.820395
3107,19.824928
1971,19.943671
769,19.954189
611641,19.959002
446724,19.995426
141059,20.079737
13368,20.08528
571,20.258671
4745,20.273819
1166,20.273899
47907,20.556494
3006,20.708383
3291,20.755402
249609,20.787413
23878,20.78834
4183,20.888357
312,20.999668
4024,21.012693
3297,21.025931
15203,21.151285
1741,21.319021
65524,21.333669
3111,21.348425
524,21.360434
26692,21.507034
63530,21.577631
7335,21.597375
620149,21.666426
11520,21.776047
1740,21.855938
38501,21.89331
1349300,22.046762
23319,22.072729
1647,22.072921
130221,22.090043
9698,22.090074
48847,22.110029
32929,22.13989
13668,22.315371
39121,22.417911
47503,22.425679
531,22.470069
1012,22.470076
2654,22.504981
78373,22.534094
3169,22.53411
1952,22.731617
652,22.860808
71260,22.889169
280,23.67373
1280,23.858748
6897,23.858754
788,24.077096
15276,24.07718
98794,24.303238
17302,24.427564
543642,24.428689
27671,24.611463
38699,24.995687
6222,24.996029
2873288,25.231955
86285,25.257784
6686,25.257889
69079,25.311085
5944,25.311302
1074,25.324982
243135,25.368159
27917,25.368168
30655,25.368997
1261,25.489908
38458,25.50374
1144,25.516606
2514,25.865317
24687,25.906181
1859,25.906215
759,26.008009
3823,26.008012
66709,26.171423
813735,26.175811
6106,26.181863
107495,26.225621
86934,26.248716
22479,26.346586
1805,26.346726
1992,26.88706
2612,27.065898
35738,27.078808
17603,27.2851
2420,27.311494
26981,27.329572
1811,27.406894
1454,27.428484
165752,27.579631
26634,27.579883
355225,28.270421
24083,28.352348
38999,28.437802
3456,28.437945
62276,28.63386
7179,28.677111
93952,28.786779
31441,28.817192
3313190,29.013922
127847,29.014028
714673,29.051341
17262,29.051488
24051,29.181351
11178,29.433397
4306,29.437851
531,29.929673
1087,29.92979
531,29.965691
1063,29.965791
531,29.999856
702,29.99997
531,30.039245
1076,30.039403
648956,30.135851
531,30.192547
862,30.192678
46927,30.26733
75148,30.56572
3255,30.565759
38229,30.592666
696,30.596425
8265,30.633897
7831,30.679427
144682,30.68018
183986,30.734917
15399,30.735086
174593,30.89045
262854,31.139566
5047,31.208535
1319501,31.757493
144984,31.778943
7976,31.790462
2282,31.84105
253761,31.848902
286,31.861067
5160,31.924957
234937,32.065854
90860,32.116785
4018,32.17334
25402,32.259085
2046,32.394248
38189,32.42135
11985,32.461412
37494,32.621786
16545,32.849907
1450,32.849914
37102,33.006097
2716331,33.050446
183787,33.125286
173371,33.139898
7193,33.290161
8589,33.423485
983357,33.645422
27182,33.728863
1014463,33.786794
273499,33.787715
11977,33.947355
594,34.020515
704,34.080337
15199,34.085748
8800,34.222183
2134,34.222414
5050,34.362907
505,34.84883
25015,35.91236
388110,35.959975
22895,35.960173
180581,36.483239
114452,36.930489
42334,37.30298
777272,37.309641
80679,37.309641
20647,37.435307
13939,38.071366
107041,38.255479
97060,38.259734
12046,38.302566
6040,38.361512
259958,38.39528
30340,38.395342
36330,38.480358
1692,38.550147
5689,38.756063
1466,39.532572
3892,39.545631
4090,39.549844
313,39.654378
825,39.775182
498,40.001939
2454,40.437087
113061,40.651704
27877,40.689322
690436,40.689357
7518,40.706097
134,41.217181
503640,41.346102
46424,41.346184
2528,41.525264
272,41.634874
11442,41.735403
8147,41.888466
4361,41.8925
213512,41.914314
22772,41.981599
306,42.145969
138344,42.278215
5119,42.278317
294783,42.387569
20395,42.719608
4947,42.723395
121070,42.739822
27248,42.739904
273578,43.095881
24079,43.095925
63229,43.220255
38577,43.557258
296008,43.645345
39551,43.703207
7553,43.748187
4275,44.013087
11755,44.035453
2416,44.145391
12624,44.391945
7358,44.44709
656,44.447107
6504,44.593117
3481,45.094834
474,45.316682
1825,45.802535
62238,45.866822
6304,45.866996
101247,45.936041
10906,45.936193
945304,46.523501
199162,46.523556
8519,47.023755
232098,47.303509
19611,47.303864
4345,47.316668
48447,47.334848
215039,47.419507
3862,47.531149
5095,47.531621
2562,47.547162
2188,47.54719
13484,47.625049
83016,47.625054
37218,47.706859
4680,47.706996
924124,48.229764
8220,48.248572
835,48.260978
86903,48.510108
23828,48.872943
1269358,49.530466
143153,49.530552
17149,49.833841
1931,49.848023
14333,50.568468
4274110,50.865795
133154,50.865916
6748,51.51256
5190,51.726476
1357163,53.059792
51140,53.068219
21065,53.399836
35627,53.483549
7496,53.57655
224892,54.105722
29373,54.105744
3157,54.348155
1098,54.539727
112085,55.201775
3951,55.999234
4399,55.99924
330639,56.104462
9230,56.184859
13889,56.442553
618,56.628394
7727,56.642208
763,57.081764
194,57.247853
72928,57.55269
5082,57.732792
208932,57.752764
45829,57.754376
182045,57.980041
578067,58.648434
116063,59.15431
26323,59.237634
40128,59.409216
877235,59.449063
42607,59.449305
130,60.007782
142,60.010747
62371,60.061641
7523202,60.217694
238881,60.293171
7497567,60.38191
289643,60.383579
7740,60.531986
7165,60.53255
860268,60.69553
206685,60.718911
923938,60.844208
312019,60.844329
144231,60.897993
288592,60.98422
10461,61.032568
4516,61.214711
239426,61.38159
180793,61.384589
1475338,61.537067
11203,61.548899
13834,61.697431
291005,61.98104
9852,62.041266
685199,62.685529
10352,62.701585
3870,62.927755
30233,62.989964
8322,63.385158
434,63.490238
444,63.494546
516,63.517739
990,63.550179
990,63.569317
990,63.609584
40510,63.694394
586256,63.707081
40275,63.707214
5423,63.717189
5176,64.021134
321106,64.179988
2394,64.196669
172533,64.238676
34148,64.238883
74402,64.259353
5395,64.386833
756,64.393092
578180,64.419819
58720,64.502113
39874,64.515607
2217,64.749261
1740,64.84502
4573,65.323704
3341,65.328661
70923,65.540771
3805,65.541094
3907,65.578878
6869,65.618099
17087,66.047671
1786,66.222081
409544,66.270789
51348,66.270808
54781,66.332495
1274,66.506467
3368,67.24144
24804,67.250076
301830,67.38352
13143128,67.38359
21208,67.402999
9525,67.900118
159334,67.979435
220818,67.980609
2417,68.16081
178408,68.450988
68762,68.513756
781722,69.034629
72671,69.038871
51138,69.112505
1783,69.173793
37105,69.293479
9320,69.405619
126380,70.092419
45764,70.092521
340,70.100955
400,70.341957
40201,70.634954
1122,70.878428
7692,71.236748
495,71.376121
7969,71.498784
71272,71.744812
256,71.780953
513,72.361659
3426,72.679651
25754,72.855446
3138,72.898703
967684,72.964736
140193,72.965858
30718,73.927057
169972,73.92873
71904,74.250059
9633,74.292473
813489,75.265507
80186,75.267345
664370,75.559644
62891,75.574494
831419,76.170656
77500,76.170763
4119912,77.167787
136589,77.228586
202960,77.953329
58197,77.968376
61174,77.970839
50129,78.008272
55737,78.023063
88501,78.101457
4081,78.50574
5210,78.729249
32269,79.720171
1319594,80.045536
78989,80.12059
69298,80.896048
1307027,81.30112
143693,81.301294
57426,81.57793
8304,81.577972
91381,83.50384
30620,83.664825
13727,83.846204
3478,83.846206
7506,83.925089
3819,83.989647
5104,84.640743
27209,85.36404
3591,85.589149
10126,85.675895
256,86.908636
128,86.908746
185868,88.071019
95634,88.215253
6800,88.215487
9213,88.232729
3624,88.403285
128,89.278097
128,89.349884
38449,89.377359
1634,89.45749
121518,89.713747
15101,89.756951
256569,90.153255
33304,90.153344
188702,90.598513
5790,90.683421
18631,90.81176
1163,90.813804
4831523,91.090815
181810,91.128753
7442,91.182673
6814,91.214459
1024,91.274712
680,91.451607
2084,92.052753
1466,92.052881
282034,92.714117
14276,92.750992
2404,92.780962
5855,92.821541
61415,94.646201
136112,94.646398
760324,94.851389
33374,95.278172
1733,95.399137
11691,95.740427
122691,95.790113
23060,96.403934
4822,96.535412
118832,96.639535
39278,96.640788
59051,97.125313
30452,97.13008
80318,97.225792
11657,97.234077
224960,97.368725
5254,97.368772
550324,97.545758
11783,98.071066
3100,98.094897
32986,98.102005
553250,98.11665
227806,98.255325
14572,98.441067
809326,98.686678
610262,98.698431
44082,98.698752
58989,98.767098
200947,99.189988
58898,99.550885
802123,99.550911
209940,99.716739
11214,99.847681
6180,100.297679
625,100.29772
11694,101.719796
1158,101.937427
303005,104.272234
30019,104.272365
45270,105.142618
370,106.259291
15739,106.392927
528,106.43275
2536,106.555733
1078,106.592073
762,106.6994
1198530,107.86163


来源: stackexchange

问:
CSS positioning of a text and underline
I'm trying to achieve the following effect, but I have some trouble positioning the text and making the underline go to end of the screen.

.header {
  height: 550px;
  width: 100%;
  background-color: #1F2041;
  position: relative;
}

.header h1, .header h2{
  color: white;
  font-size: 52px;
  text-transform: uppercase;
  margin-bottom: 20px;
  border-bottom: 1.5px solid currentColor;
  line-height: 0.7;
  position: absolute;
  top: 210px;
}

.header p {
  margin-top: 40px;
  color: white;
}```
<pre class="snippet-code-html lang-html prettyprint-override"><code><div class="header">
  <h2>About</h2>
  <h2>Nikola</h2>
  <p>Simple. Modern. Yours.</p>
</div></code>```

This is what I'm trying to achieve

答:
Maybe you need something like that?
With an absolute div you can change his position inside the parent relative div.

You set a static height, so approximately with a 150px top and bottom as margin you got what you need

Remember that when use position:absolute; it is relative to the parent div with a position:relative

.header {
  height: 550px;
  width: 100%;
  background-color: #1F2041;
  position: relative;
}

.content-div{
  position:absolute;
  margin: 150px 0 150px auto;
  width: 250px;
  right: 0;
}

.header h1, .header h2{
  color: white;
  font-size: 52px;
  text-transform: uppercase;
  margin-bottom: 20px;
  border-bottom: 1.5px solid currentColor;
  line-height: 0.7;
}

.header p {
  margin-top: 40px;
  color: white;
}```
<pre class="snippet-code-html lang-html prettyprint-override"><code><div class="header">
  <div class="content-div">
    <h2>About</h2>
    <h2>Nikola</h2>
    <p>Simple. Modern. Yours.</p>
  </div>
</div></code>```

ContentLicense: CC BY-SA 4.0

Title: CSS positioning of a text and underline

Body:
I'm trying to achieve the following effect, but I have some trouble positioning the text and making the underline go to end of the screen.

.header {
  height: 550px;
  width: 100%;
  background-color: #1F2041;
  position: relative;
}

.header h1, .header h2{
  color: white;
  font-size: 52px;
  text-transform: uppercase;
  margin-bottom: 20px;
  border-bottom: 1.5px solid currentColor;
  line-height: 0.7;
  position: absolute;
  top: 210px;
}

.header p {
  margin-top: 40px;
  color: white;
}

About

Nikola

Simple. Modern. Yours.

This is what I'm trying to achieve

Body:
Maybe you need something like that?
With an absolute div you can change his position inside the parent relative div.

You set a static height, so approximately with a 150px top and bottom as margin you got what you need

Remember that when use position:absolute; it is relative to the parent div with a position:relative

.header {
  height: 550px;
  width: 100%;
  background-color: #1F2041;
  position: relative;
}

.content-div{
  position:absolute;
  margin: 150px 0 150px auto;
  width: 250px;
  right: 0;
}

.header h1, .header h2{
  color: white;
  font-size: 52px;
  text-transform: uppercase;
  margin-bottom: 20px;
  border-bottom: 1.5px solid currentColor;
  line-height: 0.7;
}

.header p {
  margin-top: 40px;
  color: white;
}

<div class="header">
  <div class="content-div">
    <h2>About</h2>
    <h2>Nikola</h2>
    <p>Simple. Modern. Yours.</p>
  </div>
</div>


问:
How do you post data from JS to Flask, manipulate the data then send it back to JS?
I'm posting data from my HTML to Flask with:

```<code>$.ajax({
            let name = 'ari_victor'
            url: '/send_data',
            contentType: "application/json;charset=utf-8",
            data: JSON.stringify({name}),
            dataType: "json",
            type: 'POST',
            success: function(response){
                console.log(response);
            },
            error: function(error){
                console.log(error);
            }
        });
</code>```

It arrives on the Backend

```<code>@app.route('/send_data', methods=['POST'])
def send_data():
    if request.method == 'POST':
        data = request.get_json()
        name = data['name'].replace('_', ' ').title()
</code>```

Now how do I send it back? to the HTML/JS?

```<code>        return name # ?
</code>```

Edit: I'm doing an ajax post so I dont have to refresh the page, and I'd like to not refresh the page when getting the data back if possible. I know how to easily do this with a form and rendering a new template but I'd like to have a go at developing a single page application

Thanks!

答:
In flask view you have to define some kind of response return 'Hello World' for instance, or preferably json response jsonify(msg=success). Then you have to "catch" the response from ajax.
It is done here in your ajax statement:

```<code>success: function(response){
                console.log(response);
            },
</code>```

response object contains all response information, just printing here but you can provide callback of your own and do whatever you like :)

Body:
I'm posting data from my HTML to Flask with:

$.ajax({
            let name = 'ari_victor'
            url: '/send_data',
            contentType: "application/json;charset=utf-8",
            data: JSON.stringify({name}),
            dataType: "json",
            type: 'POST',
            success: function(response){
                console.log(response);
            },
            error: function(error){
                console.log(error);
            }
        });

It arrives on the Backend

@app.route('/send_data', methods=['POST'])
def send_data():
    if request.method == 'POST':
        data = request.get_json()
        name = data['name'].replace('_', ' ').title()

Now how do I send it back? to the HTML/JS?

        return name # ?

Edit: I'm doing an ajax post so I dont have to refresh the page, and I'd like to not refresh the page when getting the data back if possible. I know how to easily do this with a form and rendering a new template but I'd like to have a go at developing a single page application

Thanks!

Body:
In flask view you have to define some kind of response return 'Hello World' for instance, or preferably json response jsonify(msg=success). Then you have to "catch" the response from ajax.
It is done here in your ajax statement:

success: function(response){
                console.log(response);
            },

response object contains all response information, just printing here but you can provide callback of your own and do whatever you like :)


问:
how to add meta tags to AppMaker head
I am trying to add a meta tag to the head of my deployed AppMaker application so it can display in fullscreen on the ios via the homescreen button.

I searched the settings but could not a way to achieve this.
Any ideas?

答:
I am guessing you want to insert a tag similiar

```<code><meta name="apple-mobile-web-app-capable" content="yes">
</code>```

This is a hack and I am not sure if it will work but you can add an html widget and mark it as unsafe and put the above in there. This seems to work in Chrome, it respects those tags once it deciphers in body instead of the head.

Title: how to add meta tags to AppMaker head

Body:
I am guessing you want to insert a tag similiar

<meta name="apple-mobile-web-app-capable" content="yes">

This is a hack and I am not sure if it will work but you can add an html widget and mark it as unsafe and put the above in there. This seems to work in Chrome, it respects those tags once it deciphers in body instead of the head.


问:
Install R latest verison on ubuntu 16.04
So I tried to install R (after repairing ubuntu on my system) using following command :

```<code>sudo apt-get install r-base-core
sudo apt-get install r-recommended
</code>```

It installs R 3.2 , but the latest version of R currently available to use is R 3.4, any idea why it is not installing R 3.4 ?

I lately installed R.3.4  manually, it works fine. just curious to know why it didn't installed at the first place using the command.

答:
The xenial-cran35/ version of the repo does NOT work if you have a "default release" set in apt, as is the case in some distros that work on top of Ubuntu, such as Mint. For my Mint distro, there exists a file /etc/apt/apt.conf.d/01ubuntu inside of which it declares the Default-Release "xenial"; What this means is that, since r-base exists in the ubuntu repo at version 3.2, with release "xenial", it'll never use the 3.6 branch from the other repo, because the release name for that repo is "xenial-cran35". You need to edit that file to change the default release to "xenail-cran35", or do something more pointed using apt preference files (https://wiki.debian.org/AptPreferences#A.2Fetc.2Fapt.2Fpreferences).

This is basically R's fault for having a poorly formatted repo. They should have had 2 repos, each of which had a "xenial" release folder, one url for their 3.2 branch work and one for the 3.5+ branch work. Instead they have one repo, and have bastardized the "release name" instead, which just sort of happens to work for base Ubuntu, but won't work if you have non-base configuration of apt in this way.

ContentLicense: CC BY-SA 3.0

Body:
So I tried to install R (after repairing ubuntu on my system) using following command :

sudo apt-get install r-base-core
sudo apt-get install r-recommended

It installs R 3.2 , but the latest version of R currently available to use is R 3.4, any idea why it is not installing R 3.4 ?

I lately installed R.3.4  manually, it works fine. just curious to know why it didn't installed at the first place using the command.


问:
how can i track which page i am on in asp.net-mvc
i have a link in a master page that says "Send feedback" which brings up a new web page:

When i go to that new page, i have a form and i want to populate a textbox with the URL that the person was on when they clicked the "Send Feedback" button.

How can i grab the current URL to pass that over?  should i do this on teh client side (jquery) or on the asp.net-mvc server side??

答:
You could pass Request.Url.RawUrl as query string parameter to the Send feedback action which could itself store it as a hidden field in the form which will be reposted back and allowing to redirect back to the original page once the feedback is submitted. Example:

```<code>@Html.ActionLink(
    "Send feedback",
    "Index",
    "Feedback",
    new { returnUrl = Request.Url.RawUrl }
)
</code>```

Body:
You could pass Request.Url.RawUrl as query string parameter to the Send feedback action which could itself store it as a hidden field in the form which will be reposted back and allowing to redirect back to the original page once the feedback is submitted. Example:

@Html.ActionLink(
    "Send feedback",
    "Index",
    "Feedback",
    new { returnUrl = Request.Url.RawUrl }
)


问:
Swagger generated JAX-RS server breaks with ElasticSearch dependency
I have generated JAX-RS server code with Swagger which runs with the following command:

```<code>mvn clean package jetty:run
</code>```

Now, the purpose of the server is, among other things, to index POST requests in ElasticSearch. However, adding elastic search high level rest client in the pom makes the server break on start. See Error message at bottom.

I want to add that I'm actually importing another project into the server as a maven dependency, that's where I first encountered the error, because the other project has elasticsearch as a dependency. I narrowed it down and it turns out everything works fine without the elasticsearch dependency. Adding elasticsearch depency in the server pom directly gives the same error so that's where the issue must lie.

I've tried with multiple versions of elasticsearch, no difference.

I will also attach the contents of the POM file at the bottom.

Maven dependency tree attached at the bottom.

Following the advice of Joakim Erdfelt I've tried changing javax-servlet to version 3.1 and Jetty 9.2.28.v20190418. The problem persists but with new error message, se bottom.

Original error Message:

Failed startup of context o.e.j.m.p.JettyWebAppContext@29c53c4f{/,file:/home/administrator/Documents/company/projects/gefion/repos/gefmail-db/jaxrs-server/src/main/webapp/,STARTING}{file:/home/administrator/Documents/company/projects/gefion/repos/gefmail-db/jaxrs-server/src/main/webapp/}

org.eclipse.jetty.util.MultiException: Multiple exceptions
  at org.eclipse.jetty.annotations.AnnotationConfiguration.scanForAnnotations (AnnotationConfiguration.java:536)

at org.eclipse.jetty.annotations.AnnotationConfiguration.configure (AnnotationConfiguration.java:447)

at org.eclipse.jetty.webapp.WebAppContext.configure (WebAppContext.java:479)

at org.eclipse.jetty.webapp.WebAppContext.startContext (WebAppContext.java:1337)

at org.eclipse.jetty.server.handler.ContextHandler.doStart (ContextHandler.java:741)

at org.eclipse.jetty.webapp.WebAppContext.doStart (WebAppContext.java:505)

at org.eclipse.jetty.maven.plugin.JettyWebAppContext.doStart (JettyWebAppContext.java:365)

at org.eclipse.jetty.util.component.AbstractLifeCycle.start (AbstractLifeCycle.java:68)

at org.eclipse.jetty.util.component.ContainerLifeCycle.start (ContainerLifeCycle.java:132)

at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart (ContainerLifeCycle.java:114)

at org.eclipse.jetty.server.handler.AbstractHandler.doStart (AbstractHandler.java:61)

at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart (ContextHandlerCollection.java:163)

at org.eclipse.jetty.util.component.AbstractLifeCycle.start (AbstractLifeCycle.java:68)

at org.eclipse.jetty.util.component.ContainerLifeCycle.start (ContainerLifeCycle.java:132)

at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart (ContainerLifeCycle.java:114)

at org.eclipse.jetty.server.handler.AbstractHandler.doStart (AbstractHandler.java:61)

at org.eclipse.jetty.util.component.AbstractLifeCycle.start (AbstractLifeCycle.java:68)

at org.eclipse.jetty.util.component.ContainerLifeCycle.start (ContainerLifeCycle.java:132)

at org.eclipse.jetty.server.Server.start (Server.java:387)

at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart (ContainerLifeCycle.java:114)

at org.eclipse.jetty.server.handler.AbstractHandler.doStart (AbstractHandler.java:61)

at org.eclipse.jetty.server.Server.doStart (Server.java:354)

at org.eclipse.jetty.maven.plugin.JettyServer.doStart (JettyServer.java:73)

at org.eclipse.jetty.util.component.AbstractLifeCycle.start (AbstractLifeCycle.java:68)

at org.eclipse.jetty.maven.plugin.AbstractJettyMojo.startJetty (AbstractJettyMojo.java:534)

at org.eclipse.jetty.maven.plugin.AbstractJettyMojo.execute (AbstractJettyMojo.java:357)

at org.eclipse.jetty.maven.plugin.JettyRunMojo.execute (JettyRunMojo.java:167)

at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)

at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)

at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)

at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)

at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)

at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)

at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)

at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)

at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)

at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)

at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)

at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)

at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)

at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)

at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke (Method.java:498)

at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)

at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)

at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)

at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)

original pom file:

```<code><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>io.swagger</groupId>
  <artifactId>swagger-jaxrs-server</artifactId>
  <packaging>jar</packaging>
  <name>swagger-jaxrs-server</name>
  <version>1.0.0</version>

  <licenses>
    <license>
      <name>Unlicense</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <build>
    <sourceDirectory>src/main/java</sourceDirectory>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <version>3.1.0</version>
      </plugin>
      <plugin>
        <artifactId>maven-failsafe-plugin</artifactId>
        <version>2.6</version>
        <executions>
          <execution>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-maven-plugin</artifactId>
        <version>${jetty-version}</version>
        <configuration>
          <webApp>
            <contextPath>/</contextPath>
          </webApp>
          <webAppSourceDirectory>target/${project.artifactId}-${project.version}</webAppSourceDirectory>
          <stopPort>8079</stopPort>
          <stopKey>stopit</stopKey>
          <stopWait>10</stopWait>
          <httpConnector>
            <port>8080</port>
            <idleTimeout>60000</idleTimeout>
          </httpConnector>
        </configuration>
        <executions>
          <execution>
            <id>start-jetty</id>
            <phase>pre-integration-test</phase>
            <goals>
              <goal>start</goal>
            </goals>
            <configuration>
              <scanIntervalSeconds>0</scanIntervalSeconds>
              <daemon>true</daemon>
            </configuration>
          </execution>
          <execution>
            <id>stop-jetty</id>
            <phase>post-integration-test</phase>
            <goals>
              <goal>stop</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>1.9.1</version>
        <executions>
          <execution>
            <id>add-source</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>src/gen/java</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>io.swagger</groupId>
      <artifactId>swagger-jersey2-jaxrs</artifactId>
      <scope>compile</scope>
      <version>${swagger-core-version}</version>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>${logback-version}</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-core</artifactId>
      <version>${logback-version}</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit-version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>servlet-api</artifactId>
      <version>${servlet-api-version}</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.containers</groupId>
      <artifactId>jersey-container-servlet-core</artifactId>
      <version>${jersey2-version}</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.media</groupId>
      <artifactId>jersey-media-multipart</artifactId>
      <version>${jersey2-version}</version>
    </dependency>
    <dependency>
        <groupId>com.fasterxml.jackson.datatype</groupId>
        <artifactId>jackson-datatype-joda</artifactId>
        <version>${jackson-version}</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.jaxrs</groupId>
      <artifactId>jackson-jaxrs-json-provider</artifactId>
      <version>${jackson-version}</version>
    </dependency>
    <!-- Base64 encoding that works in both JVM and Android -->
    <dependency>
      <groupId>com.brsanthu</groupId>
      <artifactId>migbase64</artifactId>
      <version>2.2</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.elasticsearch.client/elasticsearch-rest-high-level-client -->
    <dependency>
      <groupId>org.elasticsearch.client</groupId>
      <artifactId>elasticsearch-rest-high-level-client</artifactId>
      <version>7.0.0</version>
    </dependency>

    <!-- Bean Validation API support -->
    <dependency>
        <groupId>javax.validation</groupId>
        <artifactId>validation-api</artifactId>
        <version>1.1.0.Final</version>
    </dependency>

  </dependencies>
  <repositories>
    <repository>
      <id>sonatype-snapshots</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>
  <properties>
    <java.version>1.7</java.version>
    <maven.compiler.source>${java.version}</maven.compiler.source>
    <maven.compiler.target>${java.version}</maven.compiler.target>
    <swagger-core-version>1.5.18</swagger-core-version>
    <jetty-version>9.2.9.v20150224</jetty-version>
    <jersey2-version>2.22.2</jersey2-version>
    <jackson-version>2.8.9</jackson-version>
    <junit-version>4.12</junit-version>
    <logback-version>1.1.7</logback-version>
    <servlet-api-version>2.5</servlet-api-version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
</project>
</code>```

mvn dependency:tree

```<code>[INFO] io.swagger:swagger-jaxrs-server:jar:1.0.0
[INFO] +- org.elasticsearch.client:elasticsearch-rest-high-level-client:jar:7.0.0:compile
[INFO] |  +- org.elasticsearch:elasticsearch:jar:7.0.0:compile
[INFO] |  |  +- org.elasticsearch:elasticsearch-core:jar:7.0.0:compile
[INFO] |  |  +- org.elasticsearch:elasticsearch-secure-sm:jar:7.0.0:compile
[INFO] |  |  +- org.elasticsearch:elasticsearch-x-content:jar:7.0.0:compile
[INFO] |  |  |  +- org.yaml:snakeyaml:jar:1.17:compile
[INFO] |  |  |  +- com.fasterxml.jackson.dataformat:jackson-dataformat-smile:jar:2.8.11:compile
[INFO] |  |  |  +- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.8.11:compile
[INFO] |  |  |  \- com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:jar:2.8.11:compile
[INFO] |  |  +- org.elasticsearch:elasticsearch-geo:jar:7.0.0:compile
[INFO] |  |  +- org.apache.lucene:lucene-core:jar:8.0.0:compile
[INFO] |  |  +- org.apache.lucene:lucene-analyzers-common:jar:8.0.0:compile
[INFO] |  |  +- org.apache.lucene:lucene-backward-codecs:jar:8.0.0:compile
[INFO] |  |  +- org.apache.lucene:lucene-grouping:jar:8.0.0:compile
[INFO] |  |  +- org.apache.lucene:lucene-highlighter:jar:8.0.0:compile
[INFO] |  |  +- org.apache.lucene:lucene-join:jar:8.0.0:compile
[INFO] |  |  +- org.apache.lucene:lucene-memory:jar:8.0.0:compile
[INFO] |  |  +- org.apache.lucene:lucene-misc:jar:8.0.0:compile
[INFO] |  |  +- org.apache.lucene:lucene-queries:jar:8.0.0:compile
[INFO] |  |  +- org.apache.lucene:lucene-queryparser:jar:8.0.0:compile
[INFO] |  |  +- org.apache.lucene:lucene-sandbox:jar:8.0.0:compile
[INFO] |  |  +- org.apache.lucene:lucene-spatial:jar:8.0.0:compile
[INFO] |  |  +- org.apache.lucene:lucene-spatial-extras:jar:8.0.0:compile
[INFO] |  |  +- org.apache.lucene:lucene-spatial3d:jar:8.0.0:compile
[INFO] |  |  +- org.apache.lucene:lucene-suggest:jar:8.0.0:compile
[INFO] |  |  +- org.elasticsearch:elasticsearch-cli:jar:7.0.0:compile
[INFO] |  |  |  \- net.sf.jopt-simple:jopt-simple:jar:5.0.2:compile
[INFO] |  |  +- com.carrotsearch:hppc:jar:0.7.1:compile
[INFO] |  |  +- com.tdunning:t-digest:jar:3.2:compile
[INFO] |  |  +- org.hdrhistogram:HdrHistogram:jar:2.1.9:compile
[INFO] |  |  +- org.apache.logging.log4j:log4j-api:jar:2.11.1:compile
[INFO] |  |  \- org.elasticsearch:jna:jar:4.5.1:compile
[INFO] |  +- org.elasticsearch.client:elasticsearch-rest-client:jar:7.0.0:compile
[INFO] |  |  +- org.apache.httpcomponents:httpclient:jar:4.5.7:compile
[INFO] |  |  +- org.apache.httpcomponents:httpcore:jar:4.4.11:compile
[INFO] |  |  +- org.apache.httpcomponents:httpasyncclient:jar:4.1.4:compile
[INFO] |  |  +- org.apache.httpcomponents:httpcore-nio:jar:4.4.11:compile
[INFO] |  |  +- commons-codec:commons-codec:jar:1.11:compile
[INFO] |  |  \- commons-logging:commons-logging:jar:1.1.3:compile
[INFO] |  +- org.elasticsearch.plugin:parent-join-client:jar:7.0.0:compile
[INFO] |  +- org.elasticsearch.plugin:aggs-matrix-stats-client:jar:7.0.0:compile
[INFO] |  +- org.elasticsearch.plugin:rank-eval-client:jar:7.0.0:compile
[INFO] |  \- org.elasticsearch.plugin:lang-mustache-client:jar:7.0.0:compile
[INFO] |     \- com.github.spullara.mustache.java:compiler:jar:0.9.3:compile
[INFO] +- io.swagger:swagger-jersey2-jaxrs:jar:1.5.18:compile
[INFO] |  \- io.swagger:swagger-jaxrs:jar:1.5.18:compile
[INFO] |     +- io.swagger:swagger-core:jar:1.5.18:compile
[INFO] |     |  +- org.apache.commons:commons-lang3:jar:3.2.1:compile
[INFO] |     |  \- io.swagger:swagger-models:jar:1.5.18:compile
[INFO] |     |     \- io.swagger:swagger-annotations:jar:1.5.18:compile
[INFO] |     +- org.reflections:reflections:jar:0.9.11:compile
[INFO] |     |  \- org.javassist:javassist:jar:3.21.0-GA:compile
[INFO] |     \- com.google.guava:guava:jar:20.0:compile
[INFO] +- ch.qos.logback:logback-classic:jar:1.1.7:compile
[INFO] |  \- org.slf4j:slf4j-api:jar:1.7.20:compile
[INFO] +- ch.qos.logback:logback-core:jar:1.1.7:compile
[INFO] +- junit:junit:jar:4.12:test
[INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- javax.servlet:servlet-api:jar:2.5:compile
[INFO] +- org.glassfish.jersey.containers:jersey-container-servlet-core:jar:2.22.2:compile
[INFO] |  +- org.glassfish.hk2.external:javax.inject:jar:2.4.0-b34:compile
[INFO] |  +- org.glassfish.jersey.core:jersey-common:jar:2.22.2:compile
[INFO] |  |  +- javax.annotation:javax.annotation-api:jar:1.2:compile
[INFO] |  |  +- org.glassfish.jersey.bundles.repackaged:jersey-guava:jar:2.22.2:compile
[INFO] |  |  +- org.glassfish.hk2:hk2-api:jar:2.4.0-b34:compile
[INFO] |  |  |  +- org.glassfish.hk2:hk2-utils:jar:2.4.0-b34:compile
[INFO] |  |  |  \- org.glassfish.hk2.external:aopalliance-repackaged:jar:2.4.0-b34:compile
[INFO] |  |  +- org.glassfish.hk2:hk2-locator:jar:2.4.0-b34:compile
[INFO] |  |  \- org.glassfish.hk2:osgi-resource-locator:jar:1.0.1:compile
[INFO] |  +- org.glassfish.jersey.core:jersey-server:jar:2.22.2:compile
[INFO] |  |  +- org.glassfish.jersey.core:jersey-client:jar:2.22.2:compile
[INFO] |  |  \- org.glassfish.jersey.media:jersey-media-jaxb:jar:2.22.2:compile
[INFO] |  \- javax.ws.rs:javax.ws.rs-api:jar:2.0.1:compile
[INFO] +- org.glassfish.jersey.media:jersey-media-multipart:jar:2.22.2:compile
[INFO] |  \- org.jvnet.mimepull:mimepull:jar:1.9.6:compile
[INFO] +- com.fasterxml.jackson.datatype:jackson-datatype-joda:jar:2.8.9:compile
[INFO] |  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.8.0:compile
[INFO] |  +- com.fasterxml.jackson.core:jackson-core:jar:2.8.9:compile
[INFO] |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.8.9:compile
[INFO] |  \- joda-time:joda-time:jar:2.7:compile
[INFO] +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:jar:2.8.9:compile
[INFO] |  +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:jar:2.8.9:compile

[INFO] |  \- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.8.9:compile
[INFO] +- com.brsanthu:migbase64:jar:2.2:compile
[INFO] \- javax.validation:validation-api:jar:1.1.0.Final:compile
</code>```

Error message with changed versions:
javax-servlet version 3.1
Jetty 9.2.28.v20190418

```<code>org.eclipse.jetty.util.MultiException: Multiple exceptions
    at org.eclipse.jetty.annotations.AnnotationConfiguration.scanForAnnotations (AnnotationConfiguration.java:537)
    at org.eclipse.jetty.annotations.AnnotationConfiguration.configure (AnnotationConfiguration.java:448)
    at org.eclipse.jetty.webapp.WebAppContext.configure (WebAppContext.java:479)
    at org.eclipse.jetty.webapp.WebAppContext.startContext (WebAppContext.java:1337)
    at org.eclipse.jetty.server.handler.ContextHandler.doStart (ContextHandler.java:741)
    at org.eclipse.jetty.webapp.WebAppContext.doStart (WebAppContext.java:505)
    at org.eclipse.jetty.maven.plugin.JettyWebAppContext.doStart (JettyWebAppContext.java:366)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start (AbstractLifeCycle.java:68)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start (ContainerLifeCycle.java:132)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart (ContainerLifeCycle.java:114)
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart (AbstractHandler.java:61)
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart (ContextHandlerCollection.java:163)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start (AbstractLifeCycle.java:68)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start (ContainerLifeCycle.java:132)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart (ContainerLifeCycle.java:114)
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart (AbstractHandler.java:61)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start (AbstractLifeCycle.java:68)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start (ContainerLifeCycle.java:132)
    at org.eclipse.jetty.server.Server.start (Server.java:387)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart (ContainerLifeCycle.java:114)
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart (AbstractHandler.java:61)
    at org.eclipse.jetty.server.Server.doStart (Server.java:354)
    at org.eclipse.jetty.maven.plugin.JettyServer.doStart (JettyServer.java:73)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start (AbstractLifeCycle.java:68)
    at org.eclipse.jetty.maven.plugin.AbstractJettyMojo.startJetty (AbstractJettyMojo.java:535)
    at org.eclipse.jetty.maven.plugin.AbstractJettyMojo.execute (AbstractJettyMojo.java:358)
    at org.eclipse.jetty.maven.plugin.JettyRunMojo.execute (JettyRunMojo.java:167)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: java.lang.RuntimeException: Error scanning entry META-INF/versions/9/org/elasticsearch/core/internal/io/Streams.class from jar file:/home/administrator/.m2/repository/org/elasticsearch/elasticsearch-core/7.0.0/elasticsearch-core-7.0.0.jar
    at org.eclipse.jetty.annotations.AnnotationParser.parseJar (AnnotationParser.java:913)
    at org.eclipse.jetty.annotations.AnnotationParser.parse (AnnotationParser.java:831)
    at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call (AnnotationConfiguration.java:164)
    at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run (AnnotationConfiguration.java:549)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob (QueuedThreadPool.java:635)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run (QueuedThreadPool.java:555)
    at java.lang.Thread.run (Thread.java:748)
Caused by: java.lang.IllegalArgumentException
    at org.objectweb.asm.ClassReader.<init> (Unknown Source)
    at org.objectweb.asm.ClassReader.<init> (Unknown Source)
    at org.objectweb.asm.ClassReader.<init> (Unknown Source)
    at org.eclipse.jetty.annotations.AnnotationParser.scanClass (AnnotationParser.java:973)
    at org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry (AnnotationParser.java:956)
    at org.eclipse.jetty.annotations.AnnotationParser.parseJar (AnnotationParser.java:909)
    at org.eclipse.jetty.annotations.AnnotationParser.parse (AnnotationParser.java:831)
    at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call (AnnotationConfiguration.java:164)
    at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run (AnnotationConfiguration.java:549)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob (QueuedThreadPool.java:635)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run (QueuedThreadPool.java:555)
    at java.lang.Thread.run (Thread.java:748)
</code>```

答:
The cause ...

```<code>Error scanning entry
META-INF/versions/9/org/elasticsearch/core/internal/io/Streams.class
from jar file:/home/administrator/.m2/repository/org/elasticsearch/elasticsearch-core/7.0.0/elasticsearch-core-7.0.0.jar
</code>```

... is telling you that you have a JEP-238 Multi-Release JAR file present in your project.

The first version of Jetty to support JEP-238 Multi-Release JAR files was Jetty 9.4.9.

See past questions (and answers on this topic):

Error scanning entry "module-info.class" when starting Jetty server

Failed startup of context c.g.g.d.s.j.WebAppContextWithReload

Bytecode Scanning error on META-INF/versions/9/* and Elasticsearch 6.2.2+ with Jetty 9.2

Body:
I have generated JAX-RS server code with Swagger which runs with the following command:

mvn clean package jetty:run

Now, the purpose of the server is, among other things, to index POST requests in ElasticSearch. However, adding elastic search high level rest client in the pom makes the server break on start. See Error message at bottom.

I want to add that I'm actually importing another project into the server as a maven dependency, that's where I first encountered the error, because the other project has elasticsearch as a dependency. I narrowed it down and it turns out everything works fine without the elasticsearch dependency. Adding elasticsearch depency in the server pom directly gives the same error so that's where the issue must lie.

I've tried with multiple versions of elasticsearch, no difference.

I will also attach the contents of the POM file at the bottom.

Maven dependency tree attached at the bottom.

Following the advice of Joakim Erdfelt I've tried changing javax-servlet to version 3.1 and Jetty 9.2.28.v20190418. The problem persists but with new error message, se bottom.

Original error Message:

Failed startup of context o.e.j.m.p.JettyWebAppContext@29c53c4f{/,file:/home/administrator/Documents/company/projects/gefion/repos/gefmail-db/jaxrs-server/src/main/webapp/,STARTING}{file:/home/administrator/Documents/company/projects/gefion/repos/gefmail-db/jaxrs-server/src/main/webapp/}

org.eclipse.jetty.util.MultiException: Multiple exceptions
  at org.eclipse.jetty.annotations.AnnotationConfiguration.scanForAnnotations (AnnotationConfiguration.java:536)

at org.eclipse.jetty.annotations.AnnotationConfiguration.configure (AnnotationConfiguration.java:447)

at org.eclipse.jetty.webapp.WebAppContext.configure (WebAppContext.java:479)

at org.eclipse.jetty.webapp.WebAppContext.startContext (WebAppContext.java:1337)

at org.eclipse.jetty.server.handler.ContextHandler.doStart (ContextHandler.java:741)

at org.eclipse.jetty.webapp.WebAppContext.doStart (WebAppContext.java:505)

at org.eclipse.jetty.maven.plugin.JettyWebAppContext.doStart (JettyWebAppContext.java:365)

at org.eclipse.jetty.util.component.AbstractLifeCycle.start (AbstractLifeCycle.java:68)

at org.eclipse.jetty.util.component.ContainerLifeCycle.start (ContainerLifeCycle.java:132)

at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart (ContainerLifeCycle.java:114)

at org.eclipse.jetty.server.handler.AbstractHandler.doStart (AbstractHandler.java:61)

at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart (ContextHandlerCollection.java:163)

at org.eclipse.jetty.util.component.AbstractLifeCycle.start (AbstractLifeCycle.java:68)

at org.eclipse.jetty.util.component.ContainerLifeCycle.start (ContainerLifeCycle.java:132)

at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart (ContainerLifeCycle.java:114)

at org.eclipse.jetty.server.handler.AbstractHandler.doStart (AbstractHandler.java:61)

at org.eclipse.jetty.util.component.AbstractLifeCycle.start (AbstractLifeCycle.java:68)

at org.eclipse.jetty.util.component.ContainerLifeCycle.start (ContainerLifeCycle.java:132)

at org.eclipse.jetty.server.Server.start (Server.java:387)

at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart (ContainerLifeCycle.java:114)

at org.eclipse.jetty.server.handler.AbstractHandler.doStart (AbstractHandler.java:61)

at org.eclipse.jetty.server.Server.doStart (Server.java:354)

at org.eclipse.jetty.maven.plugin.JettyServer.doStart (JettyServer.java:73)

at org.eclipse.jetty.util.component.AbstractLifeCycle.start (AbstractLifeCycle.java:68)

at org.eclipse.jetty.maven.plugin.AbstractJettyMojo.startJetty (AbstractJettyMojo.java:534)

at org.eclipse.jetty.maven.plugin.AbstractJettyMojo.execute (AbstractJettyMojo.java:357)

at org.eclipse.jetty.maven.plugin.JettyRunMojo.execute (JettyRunMojo.java:167)

at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)

at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)

at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)

at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)

at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)

at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)

at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)

at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)

at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)

at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)

at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)

at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)

at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)

at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)

at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke (Method.java:498)

at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)

at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)

at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)

at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)

original pom file:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>io.swagger</groupId>
  <artifactId>swagger-jaxrs-server</artifactId>
  <packaging>jar</packaging>
  <name>swagger-jaxrs-server</name>
  <version>1.0.0</version>

  <licenses>
    <license>
      <name>Unlicense</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <build>
    <sourceDirectory>src/main/java</sourceDirectory>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <version>3.1.0</version>
      </plugin>
      <plugin>
        <artifactId>maven-failsafe-plugin</artifactId>
        <version>2.6</version>
        <executions>
          <execution>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-maven-plugin</artifactId>
        <version>${jetty-version}</version>
        <configuration>
          <webApp>
            <contextPath>/</contextPath>
          </webApp>
          <webAppSourceDirectory>target/${project.artifactId}-${project.version}</webAppSourceDirectory>
          <stopPort>8079</stopPort>
          <stopKey>stopit</stopKey>
          <stopWait>10</stopWait>
          <httpConnector>
            <port>8080</port>
            <idleTimeout>60000</idleTimeout>
          </httpConnector>
        </configuration>
        <executions>
          <execution>
            <id>start-jetty</id>
            <phase>pre-integration-test</phase>
            <goals>
              <goal>start</goal>
            </goals>
            <configuration>
              <scanIntervalSeconds>0</scanIntervalSeconds>
              <daemon>true</daemon>
            </configuration>
          </execution>
          <execution>
            <id>stop-jetty</id>
            <phase>post-integration-test</phase>
            <goals>
              <goal>stop</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>1.9.1</version>
        <executions>
          <execution>
            <id>add-source</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>src/gen/java</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>io.swagger</groupId>
      <artifactId>swagger-jersey2-jaxrs</artifactId>
      <scope>compile</scope>
      <version>${swagger-core-version}</version>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>${logback-version}</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-core</artifactId>
      <version>${logback-version}</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit-version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>servlet-api</artifactId>
      <version>${servlet-api-version}</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.containers</groupId>
      <artifactId>jersey-container-servlet-core</artifactId>
      <version>${jersey2-version}</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.media</groupId>
      <artifactId>jersey-media-multipart</artifactId>
      <version>${jersey2-version}</version>
    </dependency>
    <dependency>
        <groupId>com.fasterxml.jackson.datatype</groupId>
        <artifactId>jackson-datatype-joda</artifactId>
        <version>${jackson-version}</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.jaxrs</groupId>
      <artifactId>jackson-jaxrs-json-provider</artifactId>
      <version>${jackson-version}</version>
    </dependency>

    <dependency>
      <groupId>com.brsanthu</groupId>
      <artifactId>migbase64</artifactId>
      <version>2.2</version>
    </dependency>

    <dependency>
      <groupId>org.elasticsearch.client</groupId>
      <artifactId>elasticsearch-rest-high-level-client</artifactId>
      <version>7.0.0</version>
    </dependency>

    <dependency>
        <groupId>javax.validation</groupId>
        <artifactId>validation-api</artifactId>
        <version>1.1.0.Final</version>
    </dependency>

  </dependencies>
  <repositories>
    <repository>
      <id>sonatype-snapshots</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>
  <properties>
    <java.version>1.7</java.version>
    <maven.compiler.source>${java.version}</maven.compiler.source>
    <maven.compiler.target>${java.version}</maven.compiler.target>
    <swagger-core-version>1.5.18</swagger-core-version>
    <jetty-version>9.2.9.v20150224</jetty-version>
    <jersey2-version>2.22.2</jersey2-version>
    <jackson-version>2.8.9</jackson-version>
    <junit-version>4.12</junit-version>
    <logback-version>1.1.7</logback-version>
    <servlet-api-version>2.5</servlet-api-version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
</project>

mvn dependency:tree

[INFO] io.swagger:swagger-jaxrs-server:jar:1.0.0
[INFO] +- org.elasticsearch.client:elasticsearch-rest-high-level-client:jar:7.0.0:compile
[INFO] |  +- org.elasticsearch:elasticsearch:jar:7.0.0:compile
[INFO] |  |  +- org.elasticsearch:elasticsearch-core:jar:7.0.0:compile
[INFO] |  |  +- org.elasticsearch:elasticsearch-secure-sm:jar:7.0.0:compile
[INFO] |  |  +- org.elasticsearch:elasticsearch-x-content:jar:7.0.0:compile
[INFO] |  |  |  +- org.yaml:snakeyaml:jar:1.17:compile
[INFO] |  |  |  +- com.fasterxml.jackson.dataformat:jackson-dataformat-smile:jar:2.8.11:compile
[INFO] |  |  |  +- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.8.11:compile
[INFO] |  |  |  \- com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:jar:2.8.11:compile
[INFO] |  |  +- org.elasticsearch:elasticsearch-geo:jar:7.0.0:compile
[INFO] |  |  +- org.apache.lucene:lucene-core:jar:8.0.0:compile
[INFO] |  |  +- org.apache.lucene:lucene-analyzers-common:jar:8.0.0:compile
[INFO] |  |  +- org.apache.lucene:lucene-backward-codecs:jar:8.0.0:compile
[INFO] |  |  +- org.apache.lucene:lucene-grouping:jar:8.0.0:compile
[INFO] |  |  +- org.apache.lucene:lucene-highlighter:jar:8.0.0:compile
[INFO] |  |  +- org.apache.lucene:lucene-join:jar:8.0.0:compile
[INFO] |  |  +- org.apache.lucene:lucene-memory:jar:8.0.0:compile
[INFO] |  |  +- org.apache.lucene:lucene-misc:jar:8.0.0:compile
[INFO] |  |  +- org.apache.lucene:lucene-queries:jar:8.0.0:compile
[INFO] |  |  +- org.apache.lucene:lucene-queryparser:jar:8.0.0:compile
[INFO] |  |  +- org.apache.lucene:lucene-sandbox:jar:8.0.0:compile
[INFO] |  |  +- org.apache.lucene:lucene-spatial:jar:8.0.0:compile
[INFO] |  |  +- org.apache.lucene:lucene-spatial-extras:jar:8.0.0:compile
[INFO] |  |  +- org.apache.lucene:lucene-spatial3d:jar:8.0.0:compile
[INFO] |  |  +- org.apache.lucene:lucene-suggest:jar:8.0.0:compile
[INFO] |  |  +- org.elasticsearch:elasticsearch-cli:jar:7.0.0:compile
[INFO] |  |  |  \- net.sf.jopt-simple:jopt-simple:jar:5.0.2:compile
[INFO] |  |  +- com.carrotsearch:hppc:jar:0.7.1:compile
[INFO] |  |  +- com.tdunning:t-digest:jar:3.2:compile
[INFO] |  |  +- org.hdrhistogram:HdrHistogram:jar:2.1.9:compile
[INFO] |  |  +- org.apache.logging.log4j:log4j-api:jar:2.11.1:compile
[INFO] |  |  \- org.elasticsearch:jna:jar:4.5.1:compile
[INFO] |  +- org.elasticsearch.client:elasticsearch-rest-client:jar:7.0.0:compile
[INFO] |  |  +- org.apache.httpcomponents:httpclient:jar:4.5.7:compile
[INFO] |  |  +- org.apache.httpcomponents:httpcore:jar:4.4.11:compile
[INFO] |  |  +- org.apache.httpcomponents:httpasyncclient:jar:4.1.4:compile
[INFO] |  |  +- org.apache.httpcomponents:httpcore-nio:jar:4.4.11:compile
[INFO] |  |  +- commons-codec:commons-codec:jar:1.11:compile
[INFO] |  |  \- commons-logging:commons-logging:jar:1.1.3:compile
[INFO] |  +- org.elasticsearch.plugin:parent-join-client:jar:7.0.0:compile
[INFO] |  +- org.elasticsearch.plugin:aggs-matrix-stats-client:jar:7.0.0:compile
[INFO] |  +- org.elasticsearch.plugin:rank-eval-client:jar:7.0.0:compile
[INFO] |  \- org.elasticsearch.plugin:lang-mustache-client:jar:7.0.0:compile
[INFO] |     \- com.github.spullara.mustache.java:compiler:jar:0.9.3:compile
[INFO] +- io.swagger:swagger-jersey2-jaxrs:jar:1.5.18:compile
[INFO] |  \- io.swagger:swagger-jaxrs:jar:1.5.18:compile
[INFO] |     +- io.swagger:swagger-core:jar:1.5.18:compile
[INFO] |     |  +- org.apache.commons:commons-lang3:jar:3.2.1:compile
[INFO] |     |  \- io.swagger:swagger-models:jar:1.5.18:compile
[INFO] |     |     \- io.swagger:swagger-annotations:jar:1.5.18:compile
[INFO] |     +- org.reflections:reflections:jar:0.9.11:compile
[INFO] |     |  \- org.javassist:javassist:jar:3.21.0-GA:compile
[INFO] |     \- com.google.guava:guava:jar:20.0:compile
[INFO] +- ch.qos.logback:logback-classic:jar:1.1.7:compile
[INFO] |  \- org.slf4j:slf4j-api:jar:1.7.20:compile
[INFO] +- ch.qos.logback:logback-core:jar:1.1.7:compile
[INFO] +- junit:junit:jar:4.12:test
[INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- javax.servlet:servlet-api:jar:2.5:compile
[INFO] +- org.glassfish.jersey.containers:jersey-container-servlet-core:jar:2.22.2:compile
[INFO] |  +- org.glassfish.hk2.external:javax.inject:jar:2.4.0-b34:compile
[INFO] |  +- org.glassfish.jersey.core:jersey-common:jar:2.22.2:compile
[INFO] |  |  +- javax.annotation:javax.annotation-api:jar:1.2:compile
[INFO] |  |  +- org.glassfish.jersey.bundles.repackaged:jersey-guava:jar:2.22.2:compile
[INFO] |  |  +- org.glassfish.hk2:hk2-api:jar:2.4.0-b34:compile
[INFO] |  |  |  +- org.glassfish.hk2:hk2-utils:jar:2.4.0-b34:compile
[INFO] |  |  |  \- org.glassfish.hk2.external:aopalliance-repackaged:jar:2.4.0-b34:compile
[INFO] |  |  +- org.glassfish.hk2:hk2-locator:jar:2.4.0-b34:compile
[INFO] |  |  \- org.glassfish.hk2:osgi-resource-locator:jar:1.0.1:compile
[INFO] |  +- org.glassfish.jersey.core:jersey-server:jar:2.22.2:compile
[INFO] |  |  +- org.glassfish.jersey.core:jersey-client:jar:2.22.2:compile
[INFO] |  |  \- org.glassfish.jersey.media:jersey-media-jaxb:jar:2.22.2:compile
[INFO] |  \- javax.ws.rs:javax.ws.rs-api:jar:2.0.1:compile
[INFO] +- org.glassfish.jersey.media:jersey-media-multipart:jar:2.22.2:compile
[INFO] |  \- org.jvnet.mimepull:mimepull:jar:1.9.6:compile
[INFO] +- com.fasterxml.jackson.datatype:jackson-datatype-joda:jar:2.8.9:compile
[INFO] |  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.8.0:compile
[INFO] |  +- com.fasterxml.jackson.core:jackson-core:jar:2.8.9:compile
[INFO] |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.8.9:compile
[INFO] |  \- joda-time:joda-time:jar:2.7:compile
[INFO] +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:jar:2.8.9:compile
[INFO] |  +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:jar:2.8.9:compile

[INFO] |  \- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.8.9:compile
[INFO] +- com.brsanthu:migbase64:jar:2.2:compile
[INFO] \- javax.validation:validation-api:jar:1.1.0.Final:compile

Error message with changed versions:
javax-servlet version 3.1
Jetty 9.2.28.v20190418

org.eclipse.jetty.util.MultiException: Multiple exceptions
    at org.eclipse.jetty.annotations.AnnotationConfiguration.scanForAnnotations (AnnotationConfiguration.java:537)
    at org.eclipse.jetty.annotations.AnnotationConfiguration.configure (AnnotationConfiguration.java:448)
    at org.eclipse.jetty.webapp.WebAppContext.configure (WebAppContext.java:479)
    at org.eclipse.jetty.webapp.WebAppContext.startContext (WebAppContext.java:1337)
    at org.eclipse.jetty.server.handler.ContextHandler.doStart (ContextHandler.java:741)
    at org.eclipse.jetty.webapp.WebAppContext.doStart (WebAppContext.java:505)
    at org.eclipse.jetty.maven.plugin.JettyWebAppContext.doStart (JettyWebAppContext.java:366)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start (AbstractLifeCycle.java:68)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start (ContainerLifeCycle.java:132)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart (ContainerLifeCycle.java:114)
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart (AbstractHandler.java:61)
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart (ContextHandlerCollection.java:163)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start (AbstractLifeCycle.java:68)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start (ContainerLifeCycle.java:132)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart (ContainerLifeCycle.java:114)
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart (AbstractHandler.java:61)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start (AbstractLifeCycle.java:68)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start (ContainerLifeCycle.java:132)
    at org.eclipse.jetty.server.Server.start (Server.java:387)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart (ContainerLifeCycle.java:114)
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart (AbstractHandler.java:61)
    at org.eclipse.jetty.server.Server.doStart (Server.java:354)
    at org.eclipse.jetty.maven.plugin.JettyServer.doStart (JettyServer.java:73)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start (AbstractLifeCycle.java:68)
    at org.eclipse.jetty.maven.plugin.AbstractJettyMojo.startJetty (AbstractJettyMojo.java:535)
    at org.eclipse.jetty.maven.plugin.AbstractJettyMojo.execute (AbstractJettyMojo.java:358)
    at org.eclipse.jetty.maven.plugin.JettyRunMojo.execute (JettyRunMojo.java:167)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: java.lang.RuntimeException: Error scanning entry META-INF/versions/9/org/elasticsearch/core/internal/io/Streams.class from jar file:/home/administrator/.m2/repository/org/elasticsearch/elasticsearch-core/7.0.0/elasticsearch-core-7.0.0.jar
    at org.eclipse.jetty.annotations.AnnotationParser.parseJar (AnnotationParser.java:913)
    at org.eclipse.jetty.annotations.AnnotationParser.parse (AnnotationParser.java:831)
    at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call (AnnotationConfiguration.java:164)
    at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run (AnnotationConfiguration.java:549)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob (QueuedThreadPool.java:635)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run (QueuedThreadPool.java:555)
    at java.lang.Thread.run (Thread.java:748)
Caused by: java.lang.IllegalArgumentException
    at org.objectweb.asm.ClassReader.<init> (Unknown Source)
    at org.objectweb.asm.ClassReader.<init> (Unknown Source)
    at org.objectweb.asm.ClassReader.<init> (Unknown Source)
    at org.eclipse.jetty.annotations.AnnotationParser.scanClass (AnnotationParser.java:973)
    at org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry (AnnotationParser.java:956)
    at org.eclipse.jetty.annotations.AnnotationParser.parseJar (AnnotationParser.java:909)
    at org.eclipse.jetty.annotations.AnnotationParser.parse (AnnotationParser.java:831)
    at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call (AnnotationConfiguration.java:164)
    at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run (AnnotationConfiguration.java:549)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob (QueuedThreadPool.java:635)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run (QueuedThreadPool.java:555)
    at java.lang.Thread.run (Thread.java:748)

Body:
The cause ...

Error scanning entry
META-INF/versions/9/org/elasticsearch/core/internal/io/Streams.class
from jar file:/home/administrator/.m2/repository/org/elasticsearch/elasticsearch-core/7.0.0/elasticsearch-core-7.0.0.jar

... is telling you that you have a JEP-238 Multi-Release JAR file present in your project.

The first version of Jetty to support JEP-238 Multi-Release JAR files was Jetty 9.4.9.

See past questions (and answers on this topic):

Error scanning entry "module-info.class" when starting Jetty server

Failed startup of context c.g.g.d.s.j.WebAppContextWithReload

Bytecode Scanning error on META-INF/versions/9/* and Elasticsearch 6.2.2+ with Jetty 9.2


问:
How can I count the number of devices connected via bluetooth?
I want to connect 4 devices via Bluetooth in my app and after 4 devices are connected I want to stop any more devices to get connected.To do this I need to know the number of connected devices.

How can I find the number of connected devices programmatically?

答:
BluetoothAdapter btAdapter = BluetoothAdapter.getDefaultAdapter();
        Set devices = btAdapter.getBondedDevices();</p>

```<code>    if (devices.size() == 0) {
        Log.i(TAG, "  No paired devices : ");
    }
    else if (devices.size() > 1) {

        Log.i(TAG, "  Too many paired devices : " + devices.size() );

        // Loop and dump the paired devices
        for (BluetoothDevice device : devices) {
            Log.i(TAG, "  Device: " + device.getName() + ", " + device);
            Log.i(TAG, "  Address: " + device.getAddress() + ", " + device);
        }
    }
    else {
        retVal = devices.iterator().next().getAddress();
    }
</code>```

Body:
BluetoothAdapter btAdapter = BluetoothAdapter.getDefaultAdapter();
        Set devices = btAdapter.getBondedDevices();

    if (devices.size() == 0) {
        Log.i(TAG, "  No paired devices : ");
    }
    else if (devices.size() > 1) {

        Log.i(TAG, "  Too many paired devices : " + devices.size() );

        // Loop and dump the paired devices
        for (BluetoothDevice device : devices) {
            Log.i(TAG, "  Device: " + device.getName() + ", " + device);
            Log.i(TAG, "  Address: " + device.getAddress() + ", " + device);
        }
    }
    else {
        retVal = devices.iterator().next().getAddress();
    }


问:
How to get the K smallest Products from pairs from two sorted Arrays?
Two sorted arrays are given. We have to find the K smallest products from the pairs from these arrays. I could think of a mnlogk solution but this solution works even if the arrays are not in sorted order. Can we make use of this sorted order and find a better solution?

I tried using max heap of size k for obtaining the mnlogk solution.

Input: nums1 = [-2, -1, 0, 1, 2], nums2 = [-3, -1, 2, 4, 5], k = 3
Output: [-10, -8, -6]
Explanation: -2 * 5, -2 * 4, 2 * -3

答:
Instead of using the heap, try to generate products in the sorted order.

Imagine an n*m grid formed by indices into the respective arrays. At any given point of time the grid is partitioned into the "inspected" and "not yet inspected" parts. We shall keep an invariant, namely that a product of every inspected pair is less than the product of a not inspected. The hard part is to prove that the border separating them has O(n+m) pairs; the fact that the arrays are sorted is essential for the proof.

Now, you may test the products along the border, take the minimal, and modify the border accordingly. This operation will take O(n+m) time, and would be performed k times. An overall complexity is O(k(n+m)).

And the final optimization: the above plan recomputes many products along the border over and over again. Representing the border as a sorted map may drive the complexity down to O(k log(n+m)).


问:
Annotating text on individual facet in ggplot2
I want to annotate some text on last facet of the plot with the following code:

```<code>library(ggplot2)
p <- ggplot(mtcars, aes(mpg, wt)) + geom_point()
p <- p + facet_grid(. ~ cyl)
p <- p + annotate("text", label = "Test", size = 4, x = 15, y = 5)
print(p)
</code>```

But this code annotates the text on every facet. How can I get the annotated text on only one facet?

答:
I did not know about the egg package,
so here is a plain ggplot2 package solution

```<code>library(tidyverse)
library(magrittr)
Data1=data.frame(A=runif(20, min = 0, max = 100), B=runif(20, min = 0, max = 250), C=runif(20, min = 0, max = 300))
Data2=data.frame(A=runif(20, min = -10, max = 50), B=runif(20, min = -5, max = 150), C=runif(20, min = 5, max = 200))
</code>```

```<code>bind_cols(
Data1 %>% gather("Vars","Data_1"),
Data2 %>% gather("Vars","Data_2")
) %>% select(-Vars1) -> Data_combined
</code>```

```<code>Data_combined %>%
  group_by(Vars) %>%
  summarise(r=cor(Data_1,Data_2),
            r2=r^2,
            p=(pt(abs(r),nrow(.)-2)-pt(-abs(r),nrow(.)-2))) %>%
  mutate(rlabel=paste("r:",format(r,digits=3)),
         plabel=paste("p:",format(p,digits=3))) ->
  label_df
</code>```

```<code>label_df %<>% mutate(x=60,y=190)
</code>```

```<code>Data_combined %>%
  ggplot(aes(x=Data_1,y=Data_2,color=Vars)) +
  geom_point() +
  geom_smooth(method="lm",se=FALSE) +
  geom_text(data=label_df,aes(x=x,y=y,label=rlabel),inherit.aes = FALSE) +
  geom_text(data=label_df,aes(x=x,y=y-10,label=plabel),inherit.aes = FALSE) +
    facet_wrap(~ Vars)
</code>```

Body:
I want to annotate some text on last facet of the plot with the following code:

library(ggplot2)
p <- ggplot(mtcars, aes(mpg, wt)) + geom_point()
p <- p + facet_grid(. ~ cyl)
p <- p + annotate("text", label = "Test", size = 4, x = 15, y = 5)
print(p)

But this code annotates the text on every facet. How can I get the annotated text on only one facet?

Body:
I did not know about the egg package,
so here is a plain ggplot2 package solution

library(tidyverse)
library(magrittr)
Data1=data.frame(A=runif(20, min = 0, max = 100), B=runif(20, min = 0, max = 250), C=runif(20, min = 0, max = 300))
Data2=data.frame(A=runif(20, min = -10, max = 50), B=runif(20, min = -5, max = 150), C=runif(20, min = 5, max = 200))

bind_cols(
Data1 %>% gather("Vars","Data_1"),
Data2 %>% gather("Vars","Data_2")
) %>% select(-Vars1) -> Data_combined

Data_combined %>%
  group_by(Vars) %>%
  summarise(r=cor(Data_1,Data_2),
            r2=r^2,
            p=(pt(abs(r),nrow(.)-2)-pt(-abs(r),nrow(.)-2))) %>%
  mutate(rlabel=paste("r:",format(r,digits=3)),
         plabel=paste("p:",format(p,digits=3))) ->
  label_df

label_df %<>% mutate(x=60,y=190)

Data_combined %>%
  ggplot(aes(x=Data_1,y=Data_2,color=Vars)) +
  geom_point() +
  geom_smooth(method="lm",se=FALSE) +
  geom_text(data=label_df,aes(x=x,y=y,label=rlabel),inherit.aes = FALSE) +
  geom_text(data=label_df,aes(x=x,y=y-10,label=plabel),inherit.aes = FALSE) +
    facet_wrap(~ Vars)


问:
Why await does not wait for setTimeOut
Trying to learn async/await, The below code, awaits on getUserName() to return userName after 2s. hasUser (returns a promise) then just logs the received username.

The problem is console.log(msg) inside the then method logs undefined.

```<code>function getUserName() {
    setTimeout(() => {
        return 'Appu'
    },2000)
}

var hasUser= async() => {
        var a = await getUserName()
        return a
    }

hasUser().then((msg) => {
    console.log(msg)
})
</code>```

Not sure what is the problem here. Appreciate explaining what actually is going on here.

Thanks.

答:
hasUser does not return a promise. You try to await getUserName() but that doesn't return a promise either. If you want to await getUsername() you need to make getUserName return a promise

```<code>function getUserName() {
    return new Promise((resolve, reject) => {
       setTimeout(() => {
          resolve('Appu')
       },2000)
    })
}
</code>```

Title: Why await does not wait for setTimeOut

Body:
Trying to learn async/await, The below code, awaits on getUserName() to return userName after 2s. hasUser (returns a promise) then just logs the received username.

The problem is console.log(msg) inside the then method logs undefined.

function getUserName() {
    setTimeout(() => {
        return 'Appu'
    },2000)
}

var hasUser= async() => {
        var a = await getUserName()
        return a
    }

hasUser().then((msg) => {
    console.log(msg)
})

Not sure what is the problem here. Appreciate explaining what actually is going on here.

Thanks.

Body:
hasUser does not return a promise. You try to await getUserName() but that doesn't return a promise either. If you want to await getUsername() you need to make getUserName return a promise

function getUserName() {
    return new Promise((resolve, reject) => {
       setTimeout(() => {
          resolve('Appu')
       },2000)
    })
}


问:
Tableau Creating Common Custom Bins for Three Fields
I am trying to create a single graph that groups three different measures into buckets. Each of these three measures are a price from one of three sources subtracted from the median of the three sources. I can individually create three graphs to do this but I would like to show them side by side in one graph

I have created three different buckets with IF/THEN/ELSE statements. But I'm having trouble grouping these side by side in the same graph.

Below is an example of 1 bucket. I have three different prices so ideally in this example "Price1" would just be a variable allowing each of the different sources to flow through correctly:

```<code>IF [Price1-MEDIAN] = 0
THEN "MEDIAN"
ELSEIF [Price1-MEDIAN] > 0 and [Price1-MEDIAN] <= .5
THEN "0-.5"
ELSEIF [Price1-MEDIAN] >.5 and [Price1-MEDIAN] <=1
THEN ".5-1"
ELSEIF [Price1-MEDIAN] >1 and [Price1-MEDIAN] <=2
THEN "1-2"
ELSEIF [Price1-MEDIAN] > 2 and [Price1-MEDIAN] <=3
THEN "2-3"
Else ">3"
END
</code>```

答:
You can create three different bins (like you did) and then graph them together with the Measure Values field.

Another approach would be to pivot the data when you bring it in.  This way all of your bins are under a single dimension and you can break them out using the name of the measure.

Body:
I am trying to create a single graph that groups three different measures into buckets. Each of these three measures are a price from one of three sources subtracted from the median of the three sources. I can individually create three graphs to do this but I would like to show them side by side in one graph

I have created three different buckets with IF/THEN/ELSE statements. But I'm having trouble grouping these side by side in the same graph.

Below is an example of 1 bucket. I have three different prices so ideally in this example "Price1" would just be a variable allowing each of the different sources to flow through correctly:

IF [Price1-MEDIAN] = 0
THEN "MEDIAN"
ELSEIF [Price1-MEDIAN] > 0 and [Price1-MEDIAN] <= .5
THEN "0-.5"
ELSEIF [Price1-MEDIAN] >.5 and [Price1-MEDIAN] <=1
THEN ".5-1"
ELSEIF [Price1-MEDIAN] >1 and [Price1-MEDIAN] <=2
THEN "1-2"
ELSEIF [Price1-MEDIAN] > 2 and [Price1-MEDIAN] <=3
THEN "2-3"
Else ">3"
END


问:
TextBox: TextChanged Event - Autovalidating when x chars have been entered
I have an app that reads in a barcode from a USB scanner. I want to do a DB lookup as soon as the barcode is entered in a particular textbox.

Clearly, I'm going to put my code in the TextChanged  event handler, but I have a slight problem in that the barcode being read could be either 41 or 43 characters. The question is, how will I know which type of code is being entered. The scanner simply enters the code into whatever field has focus as a string of characters - as if it were entered by a keyboard - so I can't query the scanner to determine the code length.

I've thought of two approaches so far:

Detect first character, wait x.x seconds, and then do my lookup - allow enough time for a full code to be entered

Detect the 41st character, wait 0.x seconds and then do my lookup.

OK, I'm sure these will work OK, but are there any more eloquent solutions?

CONCLUSION:

Some useful suggestions, however Ondrej has inspired the simplest solution for my scenario. The 43 char codes have two characters that are fixed for all codes - the presence (or not) of these two characters means I know to wait if these two characters are present but only 41 characters are present.

I just need to confirm my suspicion that the 41 character codes can't have this pair of characters in this particular position - which I'm fairly sure is the case.

答: You could have a timer and while no changes have occurred for say 1s to then do the lookup should it be 41 or 43 characters long.</p>