B4J Question [Resolved] Problem jobdone

ivanomonti

Expert
Licensed User
Longtime User
I have a problem that I can't solve, every second I make a request to update data of a crypto currency and randomly these problems come up.

1) it seems like I can't write the file in the temp folder, it doesn't happen only on my PC but also on others
2) and I can't replicate the error except in runtime or debug mode

there is a possible solution, also because I have to update the currency values every second

B4X:
WARNING: package com.sun.javafx.embed.swing.oldimpl not in javafx.swing
Waiting for debugger to connect...
Program started.
Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events.
(ArrayList) [{priceChange=-333.71000000, symbol=BTCUSDT, askPrice=25876.90000000, bidQty=1.36695000, count=556548, openPrice=26210.60000000, lastId=3208414313, quoteVolume=594228936.76544990, bidPrice=25876.89000000, firstId=3207857766, volume=22970.45849000, lastQty=0.00021000, askQty=14.93247000, weightedAvgPrice=25869.26756487, lowPrice=25647.26000000, highPrice=26212.55000000, closeTime=1694249908570, prevClosePrice=26210.60000000, openTime=1694163508570, priceChangePercent=-1.273, lastPrice=25876.89000000}, {priceChange=-11.50000000, symbol=ETHUSDT, askPrice=1634.30000000, bidQty=56.71920000, count=245749, openPrice=1645.79000000, lastId=1194786724, quoteVolume=239054156.31266200, bidPrice=1634.29000000, firstId=1194540976, volume=146602.45210000, lastQty=0.01790000, askQty=20.07780000, weightedAvgPrice=1630.62863471, lowPrice=1616.21000000, highPrice=1645.90000000, closeTime=1694249908946, prevClosePrice=1645.79000000, openTime=1694163508946, priceChangePercent=-0.699, lastPrice=1634.29000000}]
(ArrayList) [{priceChange=-315.19000000, symbol=BTCUSDT, askPrice=25874.51000000, bidQty=0.86730000, count=556116, openPrice=26189.70000000, lastId=3208415585, quoteVolume=594314427.24883540, bidPrice=25874.50000000, firstId=3207859470, volume=22974.34563000, lastQty=0.00071000, askQty=17.57622000, weightedAvgPrice=25868.61174722, lowPrice=25647.26000000, highPrice=26189.71000000, closeTime=1694250202617, prevClosePrice=26189.71000000, openTime=1694163802617, priceChangePercent=-1.203, lastPrice=25874.51000000}, {priceChange=-10.59000000, symbol=ETHUSDT, askPrice=1634.23000000, bidQty=13.51350000, count=245252, openPrice=1644.81000000, lastId=1194787300, quoteVolume=238432978.61390500, bidPrice=1634.22000000, firstId=1194542049, volume=146225.47800000, lastQty=0.01000000, askQty=46.93540000, weightedAvgPrice=1630.58436789, lowPrice=1616.21000000, highPrice=1644.82000000, closeTime=1694250202552, prevClosePrice=1644.81000000, openTime=1694163802552, priceChangePercent=-0.644, lastPrice=1634.22000000}]
(ArrayList) [{priceChange=-278.17000000, symbol=BTCUSDT, askPrice=25872.79000000, bidQty=13.92027000, count=551520, openPrice=26150.95000000, lastId=3208416584, quoteVolume=585058733.10682230, bidPrice=25872.78000000, firstId=3207865065, volume=22620.69644000, lastQty=0.02284000, askQty=2.74383000, weightedAvgPrice=25863.86916330, lowPrice=25647.26000000, highPrice=26182.19000000, closeTime=1694250463247, prevClosePrice=26150.96000000, openTime=1694164063247, priceChangePercent=-1.064, lastPrice=25872.78000000}, {priceChange=-9.51000000, symbol=ETHUSDT, askPrice=1634.17000000, bidQty=50.86900000, count=243789, openPrice=1643.68000000, lastId=1194787789, quoteVolume=236314275.46828500, bidPrice=1634.16000000, firstId=1194544001, volume=144937.12720000, lastQty=0.49300000, askQty=8.18580000, weightedAvgPrice=1630.46060063, lowPrice=1616.21000000, highPrice=1644.65000000, closeTime=1694250463216, prevClosePrice=1643.68000000, openTime=1694164063216, priceChangePercent=-0.579, lastPrice=1634.17000000}]
(FileNotFoundException) java.io.FileNotFoundException: C:\Users\MONTII~1\AppData\Local\Temp\1063 (Impossibile trovare il file specificato)
(FileNotFoundException) java.io.FileNotFoundException: C:\Users\MONTII~1\AppData\Local\Temp\1361 (Impossibile trovare il file specificato)
(FileNotFoundException) java.io.FileNotFoundException: C:\Users\MONTII~1\AppData\Local\Temp\1361 (Impossibile trovare il file specificato)
(RuntimeException) java.lang.RuntimeException: could not create platform window
(ArrayList) [{priceChange=-270.24000000, symbol=BTCUSDT, askPrice=25879.26000000, bidQty=6.53535000, count=549855, openPrice=26149.50000000, lastId=3208420003, quoteVolume=584196258.95911610, bidPrice=25879.25000000, firstId=3207870149, volume=22588.91295000, lastQty=0.00504000, askQty=11.12870000, weightedAvgPrice=25862.07934185, lowPrice=25647.26000000, highPrice=26182.19000000, closeTime=1694251362146, prevClosePrice=26149.51000000, openTime=1694164962146, priceChangePercent=-1.033, lastPrice=25879.26000000}, {priceChange=-9.16000000, symbol=ETHUSDT, askPrice=1634.20000000, bidQty=32.05990000, count=242570, openPrice=1643.36000000, lastId=1194789395, quoteVolume=235001745.80271900, bidPrice=1634.19000000, firstId=1194546826, volume=144141.42390000, lastQty=0.19980000, askQty=15.95770000, weightedAvgPrice=1630.35537907, lowPrice=1616.21000000, highPrice=1644.14000000, closeTime=1694251362205, prevClosePrice=1643.36000000, openTime=1694164962205, priceChangePercent=-0.557, lastPrice=1634.20000000}]
(RuntimeException) java.lang.RuntimeException: could not create platform window
java.lang.NullPointerException
    at anywheresoftware.b4h.okhttp.OkHttpClientWrapper$ExecuteHelper.run(OkHttpClientWrapper.java:207)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
    at java.base/java.lang.Thread.run(Thread.java:832)
ResponseError. Reason: java.lang.NullPointerException, Response:
(ArrayList) [{priceChange=-270.24000000, symbol=BTCUSDT, askPrice=25879.26000000, bidQty=6.10046000, count=549842, openPrice=26149.50000000, lastId=3208420035, quoteVolume=584181444.04188200, bidPrice=25879.25000000, firstId=3207870194, volume=22588.35344000, lastQty=0.00930000, askQty=10.68505000, weightedAvgPrice=25862.06407623, lowPrice=25647.26000000, highPrice=26182.19000000, closeTime=1694251375041, prevClosePrice=26149.51000000, openTime=1694164975041, priceChangePercent=-1.033, lastPrice=25879.26000000}, {priceChange=-9.16000000, symbol=ETHUSDT, askPrice=1634.20000000, bidQty=27.86090000, count=242574, openPrice=1643.36000000, lastId=1194789418, quoteVolume=234994202.86421700, bidPrice=1634.19000000, firstId=1194546845, volume=144136.86560000, lastQty=0.00800000, askQty=13.42340000, weightedAvgPrice=1630.35460696, lowPrice=1616.21000000, highPrice=1644.14000000, closeTime=1694251374071, prevClosePrice=1643.35000000, openTime=1694164974071, priceChangePercent=-0.557, lastPrice=1634.20000000}]
(FileNotFoundException) java.io.FileNotFoundException: C:\Users\MONTII~1\AppData\Local\Temp\2589 (Impossibile trovare il file specificato)
(FileNotFoundException) java.io.FileNotFoundException: C:\Users\MONTII~1\AppData\Local\Temp\2951 (Impossibile trovare il file specificato)
(RuntimeException) java.lang.RuntimeException: could not create platform window
(ArrayList) [{priceChange=-273.64000000, symbol=BTCUSDT, askPrice=25879.26000000, bidQty=3.88477000, count=548683, openPrice=26152.90000000, lastId=3208421347, quoteVolume=582373641.03405980, bidPrice=25879.25000000, firstId=3207872665, volume=22519.53546000, lastQty=0.21782000, askQty=12.58829000, weightedAvgPrice=25860.81946799, lowPrice=25647.26000000, highPrice=26152.90000000, closeTime=1694251756327, prevClosePrice=26152.90000000, openTime=1694165356327, priceChangePercent=-1.046, lastPrice=25879.26000000}, {priceChange=-8.15000000, symbol=ETHUSDT, askPrice=1634.80000000, bidQty=82.59330000, count=242180, openPrice=1642.95000000, lastId=1194790127, quoteVolume=234664672.58998200, bidPrice=1634.79000000, firstId=1194547948, volume=143938.01730000, lastQty=0.01840000, askQty=16.05450000, weightedAvgPrice=1630.31752828, lowPrice=1616.21000000, highPrice=1643.11000000, closeTime=1694251756057, prevClosePrice=1642.96000000, openTime=1694165356057, priceChangePercent=-0.496, lastPrice=1634.80000000}]
(RuntimeException) java.lang.RuntimeException: could not create platform window
(ArrayList) [{priceChange=-244.78000000, symbol=BTCUSDT, askPrice=25895.23000000, bidQty=1.41764000, count=542782, openPrice=26140.00000000, lastId=3208423824, quoteVolume=569553611.34490250, bidPrice=25895.22000000, firstId=3207881043, volume=22029.31170000, lastQty=0.11029000, askQty=16.02868000, weightedAvgPrice=25854.35346783, lowPrice=25647.26000000, highPrice=26140.00000000, closeTime=1694252389984, prevClosePrice=26140.00000000, openTime=1694165989984, priceChangePercent=-0.936, lastPrice=25895.22000000}, {priceChange=-7.83000000, symbol=ETHUSDT, askPrice=1635.28000000, bidQty=150.57890000, count=238934, openPrice=1643.10000000, lastId=1194791413, quoteVolume=229818534.46282700, bidPrice=1635.27000000, firstId=1194552480, volume=140987.88510000, lastQty=4.39220000, askQty=8.84590000, weightedAvgPrice=1630.05874086, lowPrice=1616.21000000, highPrice=1643.11000000, closeTime=1694252389996, prevClosePrice=1643.10000000, openTime=1694165989996, priceChangePercent=-0.477, lastPrice=1635.27000000}]
(FileNotFoundException) java.io.FileNotFoundException: C:\Users\MONTII~1\AppData\Local\Temp\4196 (Impossibile trovare il file specificato)
(FileNotFoundException) java.io.FileNotFoundException: C:\Users\MONTII~1\AppData\Local\Temp\4334 (Impossibile trovare il file specificato)
(RuntimeException) java.lang.RuntimeException: could not create platform window
(ArrayList) [{priceChange=-214.51000000, symbol=BTCUSDT, askPrice=25900.88000000, bidQty=18.46465000, count=542795, openPrice=26115.39000000, lastId=3208425381, quoteVolume=569730360.15837660, bidPrice=25900.87000000, firstId=3207882587, volume=22036.78006000, lastQty=0.01460000, askQty=1.15937000, weightedAvgPrice=25853.61194363, lowPrice=25647.26000000, highPrice=26132.60000000, closeTime=1694252640010, prevClosePrice=26115.38000000, openTime=1694166240010, priceChangePercent=-0.821, lastPrice=25900.88000000}, {priceChange=-5.97000000, symbol=ETHUSDT, askPrice=1636.03000000, bidQty=11.27870000, count=238441, openPrice=1641.99000000, lastId=1194792050, quoteVolume=229452336.52846300, bidPrice=1636.02000000, firstId=1194553610, volume=140766.93050000, lastQty=0.02700000, askQty=47.76920000, weightedAvgPrice=1630.01591150, lowPrice=1616.21000000, highPrice=1642.37000000, closeTime=1694252640010, prevClosePrice=1641.99000000, openTime=1694166240010, priceChangePercent=-0.364, lastPrice=1636.02000000}]
(RuntimeException) java.lang.RuntimeException: could not create platform window
(ArrayList) [{priceChange=-214.51000000, symbol=BTCUSDT, askPrice=25900.88000000, bidQty=14.81470000, count=542801, openPrice=26115.39000000, lastId=3208425419, quoteVolume=569729244.30742360, bidPrice=25900.87000000, firstId=3207882619, volume=22036.73921000, lastQty=0.03952000, askQty=1.03972000, weightedAvgPrice=25853.60923312, lowPrice=25647.26000000, highPrice=26132.60000000, closeTime=1694252651612, prevClosePrice=26115.39000000, openTime=1694166251612, priceChangePercent=-0.821, lastPrice=25900.88000000}, {priceChange=-5.96000000, symbol=ETHUSDT, askPrice=1636.03000000, bidQty=17.21460000, count=238489, openPrice=1641.99000000, lastId=1194792116, quoteVolume=229464492.76603800, bidPrice=1636.02000000, firstId=1194553628, volume=140774.40750000, lastQty=0.50400000, askQty=27.06950000, weightedAvgPrice=1630.01568851, lowPrice=1616.21000000, highPrice=1642.37000000, closeTime=1694252651626, prevClosePrice=1641.99000000, openTime=1694166251626, priceChangePercent=-0.363, lastPrice=1636.03000000}]
(FileNotFoundException) java.io.FileNotFoundException: C:\Users\MONTII~1\AppData\Local\Temp\5552 (Impossibile trovare il file specificato)
(FileNotFoundException) java.io.FileNotFoundException: C:\Users\MONTII~1\AppData\Local\Temp\5673 (Impossibile trovare il file specificato)
(RuntimeException) java.lang.RuntimeException: could not create platform window
(ArrayList) [{priceChange=-185.96000000, symbol=BTCUSDT, askPrice=25880.35000000, bidQty=11.11051000, count=538161, openPrice=26066.30000000, lastId=3208429012, quoteVolume=562591586.79915450, bidPrice=25880.34000000, firstId=3207890852, volume=21764.15986000, lastQty=0.00046000, askQty=4.46330000, weightedAvgPrice=25849.45113517, lowPrice=25647.26000000, highPrice=26066.30000000, closeTime=1694253519876, prevClosePrice=26066.30000000, openTime=1694167119876, priceChangePercent=-0.713, lastPrice=25880.34000000}, {priceChange=-3.64000000, symbol=ETHUSDT, askPrice=1634.95000000, bidQty=47.18240000, count=234421, openPrice=1638.58000000, lastId=1194793724, quoteVolume=224058842.98392500, bidPrice=1634.94000000, firstId=1194559304, volume=137479.53030000, lastQty=0.48480000, askQty=52.06530000, weightedAvgPrice=1629.76148155, lowPrice=1616.21000000, highPrice=1639.00000000, closeTime=1694253519504, prevClosePrice=1638.59000000, openTime=1694167119504, priceChangePercent=-0.222, lastPrice=1634.94000000}]
(RuntimeException) java.lang.RuntimeException: could not create platform window
(ArrayList) [{priceChange=-115.32000000, symbol=BTCUSDT, askPrice=25892.01000000, bidQty=16.30956000, count=530582, openPrice=26007.32000000, lastId=3208430077, quoteVolume=551388192.00763350, bidPrice=25892.00000000, firstId=3207899496, volume=21333.63185000, lastQty=0.02132000, askQty=18.79363000, weightedAvgPrice=25845.95983865, lowPrice=25647.26000000, highPrice=26007.32000000, closeTime=1694253703556, prevClosePrice=26007.32000000, openTime=1694167303556, priceChangePercent=-0.443, lastPrice=25892.00000000}, {priceChange=1.46000000, symbol=ETHUSDT, askPrice=1635.25000000, bidQty=20.06220000, count=229374, openPrice=1633.79000000, lastId=1194794071, quoteVolume=215617018.47941200, bidPrice=1635.24000000, firstId=1194564698, volume=132313.99610000, lastQty=0.00900000, askQty=78.38250000, weightedAvgPrice=1629.58587024, lowPrice=1616.21000000, highPrice=1639.00000000, closeTime=1694253703269, prevClosePrice=1633.80000000, openTime=1694167303269, priceChangePercent=0.089, lastPrice=1635.25000000}]
(RuntimeException) java.lang.RuntimeException: could not create platform window
(ArrayList) [{priceChange=-53.96000000, symbol=BTCUSDT, askPrice=25877.41000000, bidQty=0.95739000, count=523907, openPrice=25931.37000000, lastId=3208431065, quoteVolume=541653290.09083240, bidPrice=25877.40000000, firstId=3207907159, volume=20958.38704000, lastQty=0.00469000, askQty=20.44871000, weightedAvgPrice=25844.22594435, lowPrice=25647.26000000, highPrice=25955.00000000, closeTime=1694253861671, prevClosePrice=25931.36000000, openTime=1694167461671, priceChangePercent=-0.208, lastPrice=25877.41000000}, {priceChange=4.48000000, symbol=ETHUSDT, askPrice=1634.51000000, bidQty=16.95590000, count=223655, openPrice=1630.03000000, lastId=1194794628, quoteVolume=207186900.01478600, bidPrice=1634.50000000, firstId=1194570974, volume=127137.60160000, lastQty=0.02460000, askQty=98.84850000, weightedAvgPrice=1629.62724959, lowPrice=1616.21000000, highPrice=1639.00000000, closeTime=1694253861504, prevClosePrice=1630.02000000, openTime=1694167461504, priceChangePercent=0.275, lastPrice=1634.51000000}]
(RuntimeException) java.lang.RuntimeException: could not create platform window
(ArrayList) [{priceChange=131.25000000, symbol=BTCUSDT, askPrice=25882.02000000, bidQty=14.09727000, count=504487, openPrice=25750.76000000, lastId=3208432001, quoteVolume=508220307.11516340, bidPrice=25882.01000000, firstId=3207927515, volume=19660.69062000, lastQty=0.13525000, askQty=1.77984000, weightedAvgPrice=25849.56535546, lowPrice=25673.60000000, highPrice=25955.00000000, closeTime=1694254053031, prevClosePrice=25750.76000000, openTime=1694167653031, priceChangePercent=0.510, lastPrice=25882.01000000}, {priceChange=14.06000000, symbol=ETHUSDT, askPrice=1635.10000000, bidQty=115.31870000, count=212951, openPrice=1621.04000000, lastId=1194795057, quoteVolume=188240472.82332600, bidPrice=1635.09000000, firstId=1194582107, volume=115460.88260000, lastQty=0.00490000, askQty=26.68520000, weightedAvgPrice=1630.33980500, lowPrice=1616.50000000, highPrice=1639.00000000, closeTime=1694254053184, prevClosePrice=1621.04000000, openTime=1694167653184, priceChangePercent=0.867, lastPrice=1635.10000000}]
(RuntimeException) java.lang.RuntimeException: could not create platform window
java.lang.NullPointerException
    at anywheresoftware.b4h.okhttp.OkHttpClientWrapper$ExecuteHelper.run(OkHttpClientWrapper.java:207)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
    at java.base/java.lang.Thread.run(Thread.java:832)
ResponseError. Reason: java.lang.NullPointerException, Response:
(ArrayList) [{priceChange=115.54000000, symbol=BTCUSDT, askPrice=25882.02000000, bidQty=12.28846000, count=503788, openPrice=25766.48000000, lastId=3208432027, quoteVolume=506591570.24061320, bidPrice=25882.01000000, firstId=3207928240, volume=19597.46713000, lastQty=0.00243000, askQty=1.23785000, weightedAvgPrice=25849.84921164, lowPrice=25673.60000000, highPrice=25955.00000000, closeTime=1694254065817, prevClosePrice=25766.47000000, openTime=1694167665817, priceChangePercent=0.448, lastPrice=25882.02000000}, {priceChange=12.98000000, symbol=ETHUSDT, askPrice=1635.10000000, bidQty=117.42930000, count=212596, openPrice=1622.11000000, lastId=1194795067, quoteVolume=187826462.20950700, bidPrice=1635.09000000, firstId=1194582472, volume=115205.56260000, lastQty=0.00370000, askQty=26.50500000, weightedAvgPrice=1630.35931574, lowPrice=1616.50000000, highPrice=1639.00000000, closeTime=1694254066208, prevClosePrice=1622.10000000, openTime=1694167666208, priceChangePercent=0.800, lastPrice=1635.09000000}]
(RuntimeException) java.lang.RuntimeException: could not create platform window
(ArrayList) [{priceChange=146.65000000, symbol=BTCUSDT, askPrice=25878.24000000, bidQty=2.80683000, count=500966, openPrice=25731.58000000, lastId=3208432434, quoteVolume=501257753.54848970, bidPrice=25878.23000000, firstId=3207931469, volume=19390.22427000, lastQty=0.00096000, askQty=15.34410000, weightedAvgPrice=25851.05497331, lowPrice=25673.60000000, highPrice=25955.00000000, closeTime=1694254154057, prevClosePrice=25731.59000000, openTime=1694167754057, priceChangePercent=0.570, lastPrice=25878.23000000}, {priceChange=13.32000000, symbol=ETHUSDT, askPrice=1634.82000000, bidQty=7.76320000, count=211088, openPrice=1621.49000000, lastId=1194795294, quoteVolume=185792200.18861600, bidPrice=1634.81000000, firstId=1194584207, volume=113950.34300000, lastQty=0.16110000, askQty=91.88730000, weightedAvgPrice=1630.46635313, lowPrice=1616.50000000, highPrice=1639.00000000, closeTime=1694254154055, prevClosePrice=1621.49000000, openTime=1694167754055, priceChangePercent=0.821, lastPrice=1634.81000000}]
(FileNotFoundException) java.io.FileNotFoundException: C:\Users\MONTII~1\AppData\Local\Temp\9566 (Impossibile trovare il file specificato)
(RuntimeException) java.lang.RuntimeException: could not create platform window
(ArrayList) [{priceChange=33.08000000, symbol=BTCUSDT, askPrice=25865.08000000, bidQty=1.14376000, count=479890, openPrice=25831.99000000, lastId=3208438512, quoteVolume=458880413.60845920, bidPrice=25865.07000000, firstId=3207958623, volume=17743.81932000, lastQty=0.15183000, askQty=25.49062000, weightedAvgPrice=25861.42280491, lowPrice=25719.80000000, highPrice=25955.00000000, closeTime=1694255693812, prevClosePrice=25831.99000000, openTime=1694169293812, priceChangePercent=0.128, lastPrice=25865.07000000}, {priceChange=7.50000000, symbol=ETHUSDT, askPrice=1634.05000000, bidQty=58.44790000, count=198682, openPrice=1626.55000000, lastId=1194798373, quoteVolume=169275440.35697100, bidPrice=1634.04000000, firstId=1194599692, volume=103755.11740000, lastQty=0.73730000, askQty=49.96520000, weightedAvgPrice=1631.49003730, lowPrice=1624.44000000, highPrice=1639.00000000, closeTime=1694255693066, prevClosePrice=1626.54000000, openTime=1694169293066, priceChangePercent=0.461, lastPrice=1634.05000000}]
(RuntimeException) java.lang.RuntimeException: could not create platform window
(ArrayList) [{priceChange=8.73000000, symbol=BTCUSDT, askPrice=25858.00000000, bidQty=14.19528000, count=477474, openPrice=25849.27000000, lastId=3208440629, quoteVolume=455151611.70841450, bidPrice=25857.99000000, firstId=3207963156, volume=17599.44450000, lastQty=0.01112000, askQty=28.48922000, weightedAvgPrice=25861.70328890, lowPrice=25719.80000000, highPrice=25955.00000000, closeTime=1694256208271, prevClosePrice=25849.27000000, openTime=1694169808271, priceChangePercent=0.034, lastPrice=25858.00000000}, {priceChange=7.34000000, symbol=ETHUSDT, askPrice=1633.92000000, bidQty=50.61120000, count=197827, openPrice=1626.57000000, lastId=1194799510, quoteVolume=168484684.15555800, bidPrice=1633.91000000, firstId=1194601684, volume=103265.86130000, lastQty=0.27800000, askQty=12.81830000, weightedAvgPrice=1631.56228045, lowPrice=1624.44000000, highPrice=1639.00000000, closeTime=1694256208902, prevClosePrice=1626.57000000, openTime=1694169808902, priceChangePercent=0.451, lastPrice=1633.91000000}]
(RuntimeException) java.lang.RuntimeException: could not create platform window
(ArrayList) [{priceChange=17.56000000, symbol=BTCUSDT, askPrice=25858.00000000, bidQty=13.99528000, count=477399, openPrice=25840.44000000, lastId=3208440650, quoteVolume=455099258.10144830, bidPrice=25857.99000000, firstId=3207963252, volume=17597.41883000, lastQty=0.05139000, askQty=28.34926000, weightedAvgPrice=25861.70520222, lowPrice=25719.80000000, highPrice=25955.00000000, closeTime=1694256222360, prevClosePrice=25840.44000000, openTime=1694169822360, priceChangePercent=0.068, lastPrice=25858.00000000}, {priceChange=7.69000000, symbol=ETHUSDT, askPrice=1633.95000000, bidQty=146.66510000, count=197798, openPrice=1626.23000000, lastId=1194799525, quoteVolume=168424174.50615000, bidPrice=1633.94000000, firstId=1194601728, volume=103228.64820000, lastQty=0.85820000, askQty=27.61410000, weightedAvgPrice=1631.56427448, lowPrice=1624.44000000, highPrice=1639.00000000, closeTime=1694256222435, prevClosePrice=1626.24000000, openTime=1694169822435, priceChangePercent=0.473, lastPrice=1633.92000000}]
(RuntimeException) java.lang.RuntimeException: could not create platform window
java.lang.NullPointerException
    at anywheresoftware.b4h.okhttp.OkHttpClientWrapper$ExecuteHelper.run(OkHttpClientWrapper.java:207)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
    at java.base/java.lang.Thread.run(Thread.java:832)
ResponseError. Reason: java.lang.NullPointerException, Response:
(ArrayList) [{priceChange=30.25000000, symbol=BTCUSDT, askPrice=25858.00000000, bidQty=21.15306000, count=476898, openPrice=25827.74000000, lastId=3208440996, quoteVolume=454136063.19783680, bidPrice=25857.99000000, firstId=3207964099, volume=17560.13614000, lastQty=0.00382000, askQty=3.54193000, weightedAvgPrice=25861.76209439, lowPrice=25719.80000000, highPrice=25955.00000000, closeTime=1694256338717, prevClosePrice=25827.74000000, openTime=1694169938717, priceChangePercent=0.117, lastPrice=25857.99000000}, {priceChange=8.30000000, symbol=ETHUSDT, askPrice=1634.20000000, bidQty=103.16110000, count=197642, openPrice=1625.89000000, lastId=1194799787, quoteVolume=168207558.85281300, bidPrice=1634.19000000, firstId=1194602146, volume=103095.05630000, lastQty=0.42590000, askQty=4.11820000, weightedAvgPrice=1631.57735094, lowPrice=1624.44000000, highPrice=1639.00000000, closeTime=1694256338711, prevClosePrice=1625.89000000, openTime=1694169938711, priceChangePercent=0.510, lastPrice=1634.19000000}]
(RuntimeException) java.lang.RuntimeException: could not create platform window
java.lang.NullPointerException
    at anywheresoftware.b4h.okhttp.OkHttpClientWrapper$ExecuteHelper.run(OkHttpClientWrapper.java:207)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
    at java.base/java.lang.Thread.run(Thread.java:832)
ResponseError. Reason: java.lang.NullPointerException, Response:
(ArrayList) [{priceChange=42.34000000, symbol=BTCUSDT, askPrice=25863.41000000, bidQty=25.77292000, count=476886, openPrice=25821.06000000, lastId=3208441150, quoteVolume=454119844.84205560, bidPrice=25863.40000000, firstId=3207964265, volume=17559.50080000, lastQty=0.00380000, askQty=3.76347000, weightedAvgPrice=25861.77420500, lowPrice=25719.80000000, highPrice=25955.00000000, closeTime=1694256352054, prevClosePrice=25821.07000000, openTime=1694169952054, priceChangePercent=0.164, lastPrice=25863.40000000}, {priceChange=8.94000000, symbol=ETHUSDT, askPrice=1634.50000000, bidQty=95.29910000, count=197581, openPrice=1625.56000000, lastId=1194799829, quoteVolume=168199257.10744400, bidPrice=1634.49000000, firstId=1194602249, volume=103089.85890000, lastQty=0.00610000, askQty=4.46850000, weightedAvgPrice=1631.57907967, lowPrice=1624.44000000, highPrice=1639.00000000, closeTime=1694256351970, prevClosePrice=1625.55000000, openTime=1694169951970, priceChangePercent=0.550, lastPrice=1634.50000000}]
(RuntimeException) java.lang.RuntimeException: could not create platform window
java.lang.NullPointerException
    at anywheresoftware.b4h.okhttp.OkHttpClientWrapper$ExecuteHelper.run(OkHttpClientWrapper.java:207)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
    at java.base/java.lang.Thread.run(Thread.java:832)
ResponseError. Reason: java.lang.NullPointerException, Response:
(ArrayList) [{priceChange=41.61000000, symbol=BTCUSDT, askPrice=25863.41000000, bidQty=25.21024000, count=476822, openPrice=25821.79000000, lastId=3208441258, quoteVolume=454049594.77771710, bidPrice=25863.40000000, firstId=3207964437, volume=17556.77962000, lastQty=0.00329000, askQty=3.74021000, weightedAvgPrice=25861.78129504, lowPrice=25719.80000000, highPrice=25955.00000000, closeTime=1694256365742, prevClosePrice=25821.81000000, openTime=1694169965742, priceChangePercent=0.161, lastPrice=25863.40000000}, {priceChange=8.99000000, symbol=ETHUSDT, askPrice=1634.51000000, bidQty=60.55250000, count=197582, openPrice=1625.51000000, lastId=1194799895, quoteVolume=168144106.85887800, bidPrice=1634.50000000, firstId=1194602314, volume=103055.91660000, lastQty=0.33690000, askQty=11.33030000, weightedAvgPrice=1631.58130466, lowPrice=1624.44000000, highPrice=1639.00000000, closeTime=1694256365642, prevClosePrice=1625.51000000, openTime=1694169965642, priceChangePercent=0.553, lastPrice=1634.50000000}]
(RuntimeException) java.lang.RuntimeException: could not create platform window
(ArrayList) [{priceChange=7.24000000, symbol=BTCUSDT, askPrice=25858.27000000, bidQty=13.14872000, count=474983, openPrice=25851.02000000, lastId=3208442645, quoteVolume=452368009.76479200, bidPrice=25858.26000000, firstId=3207967663, volume=17491.65321000, lastQty=0.00029000, askQty=7.39501000, weightedAvgPrice=25861.93565204, lowPrice=25719.80000000, highPrice=25955.00000000, closeTime=1694256747961, prevClosePrice=25851.02000000, openTime=1694170347961, priceChangePercent=0.028, lastPrice=25858.26000000}, {priceChange=6.76000000, symbol=ETHUSDT, askPrice=1634.09000000, bidQty=22.94270000, count=196339, openPrice=1627.33000000, lastId=1194800538, quoteVolume=166800295.58201100, bidPrice=1634.08000000, firstId=1194604200, volume=102228.91960000, lastQty=0.31190000, askQty=141.85820000, weightedAvgPrice=1631.63512081, lowPrice=1624.44000000, highPrice=1639.00000000, closeTime=1694256747770, prevClosePrice=1627.33000000, openTime=1694170347770, priceChangePercent=0.415, lastPrice=1634.09000000}]
(RuntimeException) java.lang.RuntimeException: could not create platform window
java.lang.NullPointerException
ResponseError. Reason: java.lang.NullPointerException, Response:
(ArrayList) [{priceChange=18.09000000, symbol=BTCUSDT, askPrice=25858.01000000, bidQty=33.02716000, count=473479, openPrice=25839.91000000, lastId=3208443889, quoteVolume=450588472.62117650, bidPrice=25858.00000000, firstId=3207970411, volume=17422.78722000, lastQty=0.04283000, askQty=18.91703000, weightedAvgPrice=25862.02006209, lowPrice=25719.80000000, highPrice=25955.00000000, closeTime=1694257046651, prevClosePrice=25839.91000000, openTime=1694170646651, priceChangePercent=0.070, lastPrice=25858.00000000}, {priceChange=6.55000000, symbol=ETHUSDT, askPrice=1633.51000000, bidQty=44.57150000, count=195631, openPrice=1626.95000000, lastId=1194801104, quoteVolume=166473982.61472500, bidPrice=1633.50000000, firstId=1194605474, volume=102027.37950000, lastQty=0.06030000, askQty=23.79400000, weightedAvgPrice=1631.65988807, lowPrice=1624.44000000, highPrice=1639.00000000, closeTime=1694257046996, prevClosePrice=1626.95000000, openTime=1694170646996, priceChangePercent=0.403, lastPrice=1633.50000000}]
(RuntimeException) java.lang.RuntimeException: could not create platform window
java.lang.NullPointerException
ResponseError. Reason: java.lang.NullPointerException, Response:
(ArrayList) [{priceChange=34.73000000, symbol=BTCUSDT, askPrice=25858.01000000, bidQty=33.63753000, count=473020, openPrice=25823.27000000, lastId=3208444100, quoteVolume=449726777.66718740, bidPrice=25858.00000000, firstId=3207971081, volume=17389.42461000, lastQty=0.00545000, askQty=14.49148000, weightedAvgPrice=25862.08501738, lowPrice=25719.80000000, highPrice=25955.00000000, closeTime=1694257124498, prevClosePrice=25823.27000000, openTime=1694170724498, priceChangePercent=0.134, lastPrice=25858.00000000}, {priceChange=7.21000000, symbol=ETHUSDT, askPrice=1633.80000000, bidQty=93.97500000, count=195541, openPrice=1626.58000000, lastId=1194801284, quoteVolume=166243267.05415000, bidPrice=1633.79000000, firstId=1194605744, volume=101885.25220000, lastQty=0.01630000, askQty=4.33020000, weightedAvgPrice=1631.67154681, lowPrice=1624.44000000, highPrice=1639.00000000, closeTime=1694257124287, prevClosePrice=1626.57000000, openTime=1694170724287, priceChangePercent=0.443, lastPrice=1633.79000000}]
(FileNotFoundException) java.io.FileNotFoundException: C:\Users\MONTII~1\AppData\Local\Temp\12129 (Impossibile trovare il file specificato)
(FileNotFoundException) java.io.FileNotFoundException: C:\Users\MONTII~1\AppData\Local\Temp\12792 (Impossibile trovare il file specificato)
(FileNotFoundException) java.io.FileNotFoundException: C:\Users\MONTII~1\AppData\Local\Temp\13018 (Impossibile trovare il file specificato)
java.lang.RuntimeException: could not create platform window
    at javafx.graphics/com.sun.glass.ui.Window.<init>(Window.java:294)
    at javafx.graphics/com.sun.glass.ui.win.WinWindow.<init>(WinWindow.java:54)
    at javafx.graphics/com.sun.glass.ui.win.WinApplication.createWindow(WinApplication.java:219)
    at javafx.graphics/com.sun.javafx.tk.quantum.WindowStage.initPlatformWindow(WindowStage.java:201)
    at javafx.graphics/com.sun.javafx.tk.quantum.WindowStage.init(WindowStage.java:143)
    at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.createTKPopupStage(QuantumToolkit.java:678)
    at javafx.graphics/javafx.stage.PopupWindow.doVisibleChanging(PopupWindow.java:514)
    at javafx.graphics/javafx.stage.PopupWindow$1.doVisibleChanging(PopupWindow.java:107)
    at javafx.graphics/com.sun.javafx.stage.PopupWindowHelper.visibleChangingImpl(PopupWindowHelper.java:57)
    at javafx.graphics/com.sun.javafx.stage.WindowHelper.visibleChanging(WindowHelper.java:73)
    at javafx.graphics/javafx.stage.Window$12.invalidated(Window.java:1064)
    at javafx.base/javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:110)
    at javafx.base/javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:145)
    at javafx.graphics/javafx.stage.Window.setShowing(Window.java:1174)
    at javafx.graphics/javafx.stage.Window.show(Window.java:1189)
    at javafx.graphics/javafx.stage.PopupWindow.showImpl(PopupWindow.java:472)
    at javafx.graphics/javafx.stage.PopupWindow.show(PopupWindow.java:437)
    at javafx.controls/javafx.scene.control.Tooltip$TooltipBehavior.lambda$new$0(Tooltip.java:899)
    at javafx.graphics/javafx.animation.Animation.finished(Animation.java:1131)
    at javafx.graphics/javafx.animation.AnimationAccessorImpl.finished(AnimationAccessorImpl.java:49)
    at javafx.graphics/com.sun.scenario.animation.shared.SingleLoopClipEnvelope.timePulse(SingleLoopClipEnvelope.java:101)
    at javafx.graphics/javafx.animation.Animation.doTimePulse(Animation.java:1101)
    at javafx.graphics/javafx.animation.Animation$1.lambda$timePulse$0(Animation.java:186)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
    at javafx.graphics/javafx.animation.Animation$1.timePulse(Animation.java:185)
    at javafx.graphics/com.sun.scenario.animation.AbstractMasterTimer.timePulseImpl(AbstractMasterTimer.java:344)
    at javafx.graphics/com.sun.scenario.animation.AbstractMasterTimer$MainLoop.run(AbstractMasterTimer.java:267)
    at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:559)
    at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:543)
    at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:536)
    at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:342)
    at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
    at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
    at java.base/java.lang.Thread.run(Thread.java:832)
java.lang.RuntimeException: could not create platform window
    at javafx.graphics/com.sun.glass.ui.Window.<init>(Window.java:294)
    at javafx.graphics/com.sun.glass.ui.win.WinWindow.<init>(WinWindow.java:54)
    at javafx.graphics/com.sun.glass.ui.win.WinApplication.createWindow(WinApplication.java:219)
    at javafx.graphics/com.sun.javafx.tk.quantum.WindowStage.initPlatformWindow(WindowStage.java:201)
    at javafx.graphics/com.sun.javafx.tk.quantum.WindowStage.init(WindowStage.java:143)
    at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.createTKPopupStage(QuantumToolkit.java:678)
    at javafx.graphics/javafx.stage.PopupWindow.doVisibleChanging(PopupWindow.java:514)
    at javafx.graphics/javafx.stage.PopupWindow$1.doVisibleChanging(PopupWindow.java:107)
    at javafx.graphics/com.sun.javafx.stage.PopupWindowHelper.visibleChangingImpl(PopupWindowHelper.java:57)
    at javafx.graphics/com.sun.javafx.stage.WindowHelper.visibleChanging(WindowHelper.java:73)
    at javafx.graphics/javafx.stage.Window$12.invalidated(Window.java:1064)
    at javafx.base/javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:110)
    at javafx.base/javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:145)
    at javafx.graphics/javafx.stage.Window.setShowing(Window.java:1174)
    at javafx.graphics/javafx.stage.Window.show(Window.java:1189)
    at javafx.graphics/javafx.stage.PopupWindow.showImpl(PopupWindow.java:472)
    at javafx.graphics/javafx.stage.PopupWindow.show(PopupWindow.java:437)
    at javafx.controls/javafx.scene.control.Tooltip$TooltipBehavior.lambda$new$0(Tooltip.java:899)
    at javafx.graphics/javafx.animation.Animation.finished(Animation.java:1131)
    at javafx.graphics/javafx.animation.AnimationAccessorImpl.finished(AnimationAccessorImpl.java:49)
    at javafx.graphics/com.sun.scenario.animation.shared.SingleLoopClipEnvelope.timePulse(SingleLoopClipEnvelope.java:101)
    at javafx.graphics/javafx.animation.Animation.doTimePulse(Animation.java:1101)
    at javafx.graphics/javafx.animation.Animation$1.lambda$timePulse$0(Animation.java:186)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
    at javafx.graphics/javafx.animation.Animation$1.timePulse(Animation.java:185)
    at javafx.graphics/com.sun.scenario.animation.AbstractMasterTimer.timePulseImpl(AbstractMasterTimer.java:344)
    at javafx.graphics/com.sun.scenario.animation.AbstractMasterTimer$MainLoop.run(AbstractMasterTimer.java:267)
    at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:559)
    at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:543)
    at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:536)
    at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:342)
    at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
    at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
    at java.base/java.lang.Thread.run(Thread.java:832)
 

drgottjr

Expert
Licensed User
Longtime User
i don't see how you can do this with tcp and/or in an asynch manner and expect
everything to be updated every second without causing problems.

to give you an example, yahoo.com can show up-to-the-minute stock prices for
given stocks (in general, there is a 15-minute delay). it obtains the prices from
its sources using websockets. there is no constant connecting and re-connecting
and error checking and waiting as is required with tcp. you might want to look
into a price source that uses websockets.

in addition, do you know what those files in the temp folder are? the ones that
cause the filenotfound error? if you did, you would have a better understanding of
what is going on. it's possible you are releasing them and then trying to access them again,
which is not possible. there have been similar cases in the past here on the forum of
okhttp's job file not being found because it was being released too soon. those files
are where okhttp puts the response to your request.

in any case, it's hard to guess what your code is doing without seeing it.
 
Upvote 0

ivanomonti

Expert
Licensed User
Longtime User
How is this error related: could not create platform window ?
What are you doing with the UI?

You can change the "temp folder" by setting HttpUtils2Service.TempFolder at the beginning of the program.
And make sure to always check that Job.Success is true and don't forget to call Job.Release.

found the first problem was the jCustomToast library causing problems :-(
 
Upvote 0
Top