Category "java"

How to configure spring to use External LDAP Server

I am learning about Spring Security to LDAP server, right now i am trying to make spring authenticate to ldap server. However, spring always uses the embedded s

Make JTable cells in specific column scrollable

I'm creating GUI in java using swing. I use JTable that looks like this. I need to make cells of last column("Popis") to be scrollable as there will be descript

How to use camera2 with detect barcode

Camera is now deprecated and the recommend is to use camera2, can some one guide me to have any idea how to use camera2 with detect barcode

The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "Unexpected rethrowing"

I'm using java 11, and Microsoft SQL Server 2008 (RTM) - 10.0.1600.22 (X64) Jul 9 2008 14:17:44 Copyright (c) 1988-2008 Microsoft Corporation Enterprise E

How to check if list has more then 3 elements using Java8

I have a method that accepts a list of object. I want to iterate through that list and check if the list has more than 3 elements. If it does, I want to throw e

Integration Eclipse Collections with Spring Data JPA

is it possible integration eclipse collections with spring data jpa + hibernate? for example: import org.springframework.data.jpa.repository.JpaRepository; im

Error [Ljava.lang.Object; cannot be cast to [Ljava.security.cert.X509Certificate when converting an arraylist of X509Certificate to array

I am very new to this ssl and certificates. I have a jks file which consists of some certificates which server trusts. I am trying to read all the certificates

How to test my update method with Mockito

Here is my test Class: @RunWith(SpringRunner.class) @SpringBootTest public class UpdateRestaurantTest { @MockBean private RestaurantRepository restaura

Sending protobuf as JSON in spring-boot

I´m using protobufs with this concrete definition. message Hash { string category = 1; repeated KVPair content = 2; } message KVPair { strin

Trying to get a child key value from a json object saved in an map-variable in sketchware

i have the following json as a get response: { "global": { "name": "Lz Cha0S", "uid": xxx, "platform": "X1", "level": 521,

Comparing LocalDate using Hamcrest in Junit Test Case

I am my unit testing my REST Controller, one of whose field is LocalDate in my Test Case. Code below: @Test public void getByExternalTransactionId() throws E

Howto getExtras from a local broadcast Intent in react-native

in my React-Native opened project, I want to receive the data (extra text) sent by another local service app named "scanservice" on its intent output (broadcast

Google Foobar Challenge 3 - Find the Access Codes

Find the Access Codes Write a function answer(l) that takes a list of positive integers l and counts the number of "lucky triples" of (lst[i], lst[j], lst[k])

java use simpledateformat to parse a input String get ParseException, and just because of a space

I input a string likes the SimpleDateFormat pattern asked, but it will be ParseException. I do several tests. If I change space between "dd HH" to "dd-HH", the

How can I ignore the exception if the item is not found? Selenium(selenide)

Several of my tests refer to importBrokerCheckBox. But not all tests have to find it, because he must be absent. That is, if the element is on the page, then we

One Android project two java file & res file

I took this from another resource but I have two java files and a res file I could not understand very well. Are these two files necessary?

No qualifying bean of type when using @ConditionalOnProperty

I have a component that I what to be able to enable/disable from the applikation.properties in my spring boot application.. In my application.properties I ha

Re-installing maven dependency project causes NoClassDefFoundError in already running application

Let's say I have a very simple maven project ProjA which has no dependencies itself. This project ProjA has classes X and Y as follows: class X package proja;

Can't launch Payara Micro from payara-micro-maven-plugin, getting "unsupported JDK"

I put together a sample project to demonstrate the issue I'm having. https://github.com/johnmanko/payara-micro-plugin-group Basically, I'm trying to launch my a

Spring Email with Greenmail: Authentication Credentials Invalid

I am trying to write test code for Spring Email using Greenmail. This works perfectly with 1.5.5 version of Greenmail, however when I try to update the version