ANDROID Caused by java.lang.SecurityException: validateClientPermissionsLocked:1102: Callers from device user 0 are not currently allowed to connect to camera “1” Camera permission is granted. It is runned by a FOREGROUND SERVICE. Works on most devices, but there are few Android 9, Huawei, Motorol…
Flink Avro Serialization shows “not serializable” error when working with GenericRecords
I’m really having a hard time making Flink to communicate properly with a running Kafka instance making use of an Avro schema from the Confluent Schema Registry (for both key and value). After a while of thinking and restructuring my programm, I was able to push my implementation so far: Producer Method…
How to deploy Spring Boot application in Google Cloud Compute Engine?
I am a new to Google Cloud platform. I want to deploy my Spring Boot project in Compute Engine because deploying in App Engine costs more than the Compute Engine. There are a lot of videos/articles are available in YouTube/Websites for deploying in App Engine but I did not find any tutorial on deploying Sprin…
HQL Hibernate query search check if list contains all elements of another list
I came across a problem that I cannot think of a solution. So I got this piece of code: The problem with this piece of code is that when someone searches with more than one tag (for example: #video, #image), it returns both posts with two tags and one tag. I would like it to return a post with both
Multi-tenant hibernate doesn’t switch between tenants
I am in the middle of changing my spring + hibernate + mysql setup to be multi-tenant. First of all, I have the following in my application.properties: I am not sure if I’m supposed to make it connect to a specific schema here (test) after introducing multi-tenancy? It doesn’t make sense to me, as…
Is it possible to access instance of exception “catched” with JUnit Rule ExpectedException?
Suppose that in a test is: and some test contains: Now if there is a need to inspect this SomeNastyException more detailed what would be the way? Of course it would be possible just not to use ExcpectedException and wrap call with try/catch and then inspect the exception in any way it is needed but now questi…
How to store JSON file as a JSON datatype in mysql using Hibernate / Spring boot?
I’ve tried several ways of storing a json file in a database but it ends up creating different columns for each entry. I want to store it as a “json” type in a single column. Is it possible? My json file. users.json It’s a spring-boot application and I’ve the relevant controllers…
Passing data from a Pop up back to its Parent
The parent class activity consists of adapters and recycler views. Using one of the adapters the one click is set for images. If an image is clicked it opens a pop-up and the pop have some sliders and text fields. And the pop-up will collect data from users. Now I need this data, not in the adapter class but …
Sort List of string arrays by first element
I want to sort a list of string arrays by first element in each array element of same list, in reverse order, so 2, 1, 0 Here’s what i tried so far: The problem is that at sorted line i have an error highlighted, saying: “sorted(java.util.List, java.util.Comparator Answer Stream.sorted() takes a c…
How to calculate RECURSIVELY 2D array column in Java
I am stuck with a homework question for something fairly stupid. The mission is to find the smallest column sum on a 2D array and return it’s index. No loops allowed, only recursion. I managed the code, but I’m stuck with the simple task of calculating the column itself. This is the code I wrote s…