Category "java"

merging 2 binary trees- Easy

I am trying to merge 2 binary trees, without worrying about making the resultant tree balanced. Here is my solution which does not work. Why are the Treenode an

Can't figure out how to change Prometheus content type header

So my metrics all appear in one line at my end-point, not in new line per metric. I use micrometer, spring, prometheus and scala. My controller: @RequestMapping

Certificate Chain does not work in mockserver

I would use a Certificate Chain (multiple PEM file merged in one file - end-entity certificate + Intermediate certificate) to do server authentication. I'm usin

how to run java selnium junit Tests using groovy

I am using ReadyAPI which use Groovy as Scripting language. But, I built a Selenium 4 framework which Tests some IHMs in my work using java8 and Junit4, and it

Bouncy Castle signature verification fails for known good signature

I'm working with a platform that sends and receives very large AS/2 S/MIME messages and have problems verifying the signature for multipart/signed. The signatur

Spring batch: How to output list as output for RepositoryItemReader

Hi I have a use case where I should read data from DB and try to combine rows. For example I have one order and many orderDetails. The output of my SQL Query is

JPA Hibernate OneToOne children enity always fetches parent entity

I am having a problem with a OneToOne relationship. Trying to load a children entity will always result in an additional query that loads its parent, even if I

Why Hibernate cant create DB? SQLSyntaxErrorException and CommandAcceptanceException

I have three DBs, of which hibernate can only create 2/3. Can someone explain why hibernate can not create a third table "goods" 1: org.hibernate.tool.schema.sp

How to compress jpg and png images in java?

I used ImageIO library and tried to compress Multipart File but if the extension is jpg then it works fine, but when I used png file then it's not working. I go

SQLITE_BUSY The database file is locked

I'm getting the error [SQLITE_BUSY] The database file is locked (database is locked), even though I close my connection and the statements. Not sure what else

How to search for all records of of type CustomRecordType in Netsuite?

I am trying to get all the records related to a custom record type. How to do it in Netsuite SOAP? Also is there a way to search records of that custom record t

What is the fastest way to split Integer into digits?

I do a lot of operations with splitting numbers into separate digits, putting digits in ArrayList and passing this digits one by one to other ArrayList for furt

Gremlin HasStep label condition on vertex or edge

Is there any way to find out if hasLabel() step is applied on vertices or edges? I know we can keep track of it while iterating through all the steps in recursi

How to generate a logstash event within a custom java filter plugin after timeout?

I want to correlate messages sending to logstash within a filter and send them to the next filter of logstash inside the pipeline. However I have successfully s

Is it possible to create keycloak policy enforcer resources with same url?

I want to use keycloak policy enforcer to authorize requests for resources of my app. But, some resources need to have same urls. In example, there are two role

TLS_DHE_RSA_WITH_AES_128_CCM support

I am getting below error when trying to run a server with TLS_DHE_RSA_WITH_AES_128_CCM: java.lang.IllegalArgumentException: Unsupported CipherSuite: TLS_DHE_RSA

Java Stream a Large SQL Query into API CSV File

I am writing a Service that obtains data from large sql query in database (over 100,000 records) and streams into an API CSV File. Is there any java library fun

Jetty17 --add-opens option does not work, java.lang.IllegalAccessError

I use Java 17 with Jetty 11.0.9. I started Jetty with the following command java --add-opens=java.base/java.lang=ALL-UNNAMED -jar start.jar Then I am facing ex

Spring Boot MongoDB the field with version annotation does not increment

This question asked several times before, but the answers in these questions didn't work for me. This is my Book document @Document @NoArgsConstructor @ToString

Spring Cloud Stream - Is there a way to customize the StreamThread thread name?

I'm using Spring Cloud Stream (Kafka as the binder) in my current project and the default thread name for StreamThread keeps me bothered as it is very long. Her