Bug? Updated jOKHttpUtils2 appears to have an issue.

Peter Simpson

Expert
Licensed User
Longtime User
Hello Erel,
When using V10.50 (and V10.30, which I’ve just tested again as well), compiling with Build Standalone Package and the updated Inno Setup file produces an EXE that runs perfectly, the CLV does populate. However, when I compile using Build Standalone Package in V10.70, the EXE runs but the CLV does not populate.

Below is the stack trace from when the file is compiled using B4J V10.70 and using the EXE created using Build Standalone Package. I don't get this error when using B4J V10.50 or even the older B4J V10.30. This issue only started in V10.70 when using BSP.

PLEASE NOTE: The code works perfect in B4J V10.70 when compiling and running in both release and debug modes. It only fails when using the EXE file created using BSP.

EXE trace stack:
C:\Users\Peter\Documents\B4X\B4X\Test Projects\B4X Libraries Navigator\B4J\Objects\temp\build>cd bin

C:\Users\Peter\Documents\B4X\B4X\Test Projects\B4X Libraries Navigator\B4J\Objects\temp\build\bin>java.exe @release_java_modules.txt -m b4j/com.simplysoftware.b4xlibrariesnavigator.main
java.lang.IllegalStateException: Unable to load okhttp3/internal/publicsuffix/PublicSuffixDatabase.list resource.
at b4j/okhttp3.internal.publicsuffix.BasePublicSuffixList.ensureLoaded(Unknown Source)
at b4j/okhttp3.internal.publicsuffix.PublicSuffixDatabase.findMatchingRule(Unknown Source)
at b4j/okhttp3.internal.publicsuffix.PublicSuffixDatabase.getEffectiveTldPlusOne(Unknown Source)
at b4j/okhttp3.Cookie$Companion.parse$okhttp(Unknown Source)
at b4j/okhttp3.Cookie$Companion.parse(Unknown Source)
at b4j/okhttp3.Cookie$Companion.parseAll(Unknown Source)
at b4j/okhttp3.internal.http.HttpHeaders.receiveHeaders(Unknown Source)
at b4j/okhttp3.internal.http.BridgeInterceptor.intercept(Unknown Source)
at b4j/okhttp3.internal.http.RealInterceptorChain.proceed(Unknown Source)
at b4j/okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(Unknown Source)
at b4j/okhttp3.internal.http.RealInterceptorChain.proceed(Unknown Source)
at b4j/okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(Unknown Source)
at b4j/okhttp3.internal.connection.RealCall.execute(Unknown Source)
at b4j/anywheresoftware.b4h.okhttp.OkHttpClientWrapper.executeWithTimeout(Unknown Source)
at b4j/anywheresoftware.b4h.okhttp.OkHttpClientWrapper.access$0(Unknown Source)
at b4j/anywheresoftware.b4h.okhttp.OkHttpClientWrapper$ExecuteHelper.run(Unknown Source)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: file not found: okhttp3/internal/publicsuffix/PublicSuffixDatabase.list
at b4j/okio.internal.ResourceFileSystem.source(Unknown Source)
at b4j/okhttp3.internal.publicsuffix.ResourcePublicSuffixList.listSource(Unknown Source)
at b4j/okhttp3.internal.publicsuffix.BasePublicSuffixList.readTheList(Unknown Source)
at b4j/okhttp3.internal.publicsuffix.BasePublicSuffixList.readTheListUninterruptibly(Unknown Source)
... 21 more
ResponseError. Reason: java.lang.IllegalStateException: Unable to load okhttp3/internal/publicsuffix/PublicSuffixDatabase.list resource., Response:
Failed to fetch Sheet 1: java.lang.IllegalStateException: Unable to load okhttp3/internal/publicsuffix/PublicSuffixDatabase.list resource.
java.lang.IllegalStateException: Unable to load okhttp3/internal/publicsuffix/PublicSuffixDatabase.list resource.
at b4j/okhttp3.internal.publicsuffix.BasePublicSuffixList.ensureLoaded(Unknown Source)
at b4j/okhttp3.internal.publicsuffix.PublicSuffixDatabase.findMatchingRule(Unknown Source)
at b4j/okhttp3.internal.publicsuffix.PublicSuffixDatabase.getEffectiveTldPlusOne(Unknown Source)
at b4j/okhttp3.Cookie$Companion.parse$okhttp(Unknown Source)
at b4j/okhttp3.Cookie$Companion.parse(Unknown Source)
at b4j/okhttp3.Cookie$Companion.parseAll(Unknown Source)
at b4j/okhttp3.internal.http.HttpHeaders.receiveHeaders(Unknown Source)
at b4j/okhttp3.internal.http.BridgeInterceptor.intercept(Unknown Source)
at b4j/okhttp3.internal.http.RealInterceptorChain.proceed(Unknown Source)
at b4j/okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(Unknown Source)
at b4j/okhttp3.internal.http.RealInterceptorChain.proceed(Unknown Source)
at b4j/okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(Unknown Source)
at b4j/okhttp3.internal.connection.RealCall.execute(Unknown Source)
at b4j/anywheresoftware.b4h.okhttp.OkHttpClientWrapper.executeWithTimeout(Unknown Source)
at b4j/anywheresoftware.b4h.okhttp.OkHttpClientWrapper.access$0(Unknown Source)
at b4j/anywheresoftware.b4h.okhttp.OkHttpClientWrapper$ExecuteHelper.run(Unknown Source)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: file not found: okhttp3/internal/publicsuffix/PublicSuffixDatabase.list
at b4j/okio.internal.ResourceFileSystem.source(Unknown Source)
at b4j/okhttp3.internal.publicsuffix.ResourcePublicSuffixList.listSource(Unknown Source)
at b4j/okhttp3.internal.publicsuffix.BasePublicSuffixList.readTheList(Unknown Source)
at b4j/okhttp3.internal.publicsuffix.BasePublicSuffixList.readTheListUninterruptibly(Unknown Source)
... 21 more
ResponseError. Reason: java.lang.IllegalStateException: Unable to load okhttp3/internal/publicsuffix/PublicSuffixDatabase.list resource., Response:
Failed to fetch Sheet 2 or sheet is private/restricted.

C:\Users\Peter\Documents\B4X\B4X\Test Projects\B4X Libraries Navigator\B4J\Objects\temp\build\bin>pause
Press any key to continue . . .

B4J compile windows;
B4J Version: 10.70
Parsing code. (0.06s)
Java Version: 19
Building folders structure. (0.02s)
Running custom action. (0.04s)
Compiling code. (0.06s)

ObfuscatorMap.txt file created in Objects folder.
Compiling layouts code. (0.00s)
Organizing libraries. (0.00s)
Compiling generated Java code. (0.88s)
Building jar file. (2.75s)
Jar file created: C:\Users\Peter\Documents\B4X\B4X\Test Projects\B4X Libraries Navigator\B4J\Objects\B4XLibrariesNavigator.jar
Building package. Check logs for more information. (10.66s)
Running custom action. (0.06s)
Running custom action. (0.04s)
Running custom action. (14.87s)
Completed successfully.

Please note the following line is not strictly correct, thus this is not the issue as previous B4J versions (tested a few minutes ago) fetch the sheets with no issues whatsoever.
Failed to fetch Sheet 2 or sheet is private/restricted.


Thank you...
 
Last edited:

Sagenut

Expert
Licensed User
Longtime User
I tried a super simple project with just a CLV populated using only ADDTEXTITEM.
It works even from StandAlone package, but I packed it forcing Java 21.
Not sure if this could be the solution.
 

Peter Simpson

Expert
Licensed User
Longtime User
I tried a super simple project with just a CLV populated using only ADDTEXTITEM.
It works even from StandAlone package, but I packed it forcing Java 21.
Not sure if this could be the solution.
Looking at the trace stack, I presume that the issue is with the updated okhttp...
 
Top