We are trying to connect to a clickhouse server using jdbc drivers. Our code snippet is in scala and would not be much different in java We get the following error : We went through a few other pages mentioning the same error and in keeping with the advice there, we used the latest version of the driver (0.3.…
Tag: java
Error running a Java 8 batch with a jdk17
I’m trying to run a java 8 batch with a jdk17, the project is built with a jre1.8.0_192 and I put the following options in the VM: –add-modules=ALL-SYSTEM –add-opens=java.base/java.lang=ALL-UNNAMED –add-opens=java.base/java.math=ALL-UNNAMED –add-opens=java.base/java.net=ALL-UNNAM…
Loading of TableRows and TextViews into TableLayout after onCreate
I would like to load TableRows with TextViews into the table outside of oncreate. It should look like that. The problem is that I want to do the whole thing outside of the oncreate function. The rows and text views should only be added at runtime. If I do it outside then the added elements are rendered but no…
Concerns about the FILES AND MEDIA PERMISSIONS on Android as a developer
I’m developing an app that saves data into a database, I’m trying to backup and restore that database which I am able to do, my issue is with the “ominous” permmission popup on API30+ Allow management of all files Allow this app to access modify and delete files on your device…..…
Jackson serializes Enum to NAME not value (XML) Java
I have this Enum defined: I have a model object that has a OutputFormatEnum variable called OutputFormat. When I set this variable to OutputFormatEnum.PDF, it is initially registered as “pdf” which is what it should be. When I then execute the following code: It sets the value of OutputFormat in s…
How to Get Value from JSON in Firebase Remote Config
I am a novice to Android app development and Firebase. I want to know how can I get the value (String & Int) in the JSONArray file stored in Firebase Remote Config? I use Firebase Remote Config with the final goal to compare my app’s version code and priority level with the one stored in Firebase Re…
Sonar Issue-Possible null pointer dereference due to return value of called method. Return value from a method is dereferenced without a null check
I have a void method which is being called with a string argument from a parent method. Answer getText seems to be more than a simple getter. The second time it evidently may return null.
Count nodes that are bigger than all their sons
I have to make a programm that counts the nodes bigger than their sons without including the leaf nodes for example: This is my approach: But I can’t see the error Answer Assuming info is an int, this could work for you. I haven’t tested the code, so let me know if there are issues.
Extract file name from Java URL (file: and http/https protocol)?
I have various urls like this: These are all valid URLS, and I can convert them to a URL in java without errors: I want to extract the filename from each of the examples above, so I’m left with just: I have tried the following, but this doesn’t work for example b above (which is a valid URL): I ca…
Using SMOTE on java raises Comparison method violates its general contract
I’m working on a project in java and I need to use Weka’s API. I use Maven to manage dependencies and, in particular, I have the following one: In this version, the SMOTE class is not kept, but I really need it; that’s why I also added in my pom.xml the following dependency: In my Java code,…