Category "java"

IntelliJ IDEA breakpoints do not hit in dynamically loaded anonymous inner class

This is not your usual "my breakpoints don't work" question. Consider the following code: Runnable runnable = new Runnable() { @Override public void run()

binary.startprofile is not working. startprofile is not present in selenium-jar file.I even tried old versions still not working

I am writing code in java with selenium- In my code binary.startprofile is not working. it is saying startprofile is not present in selenium-jar file. I even tr

Add User provided Environment variables on cloud foundry for VCAP_SERVICE

I need to change the ecs-bucket in VCAP_SERIVCE environment variable with new bucket name and secrete key. However, when I add VCAP_SERVICE variable, cloud foun

How to execute class method in a Java program? [closed]

In this code, we have to add a method set() which will take two parameters, an int index, and an Integer value, which will set the array eleme

could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet with oauth

I am doing a rest service with java spring boot. The tables are created correctly in the database and locally test everything works correctly, but when I mount

java.lang.module.ResolutionException: Modules persistence.api and java.persistence export package javax.persistence.spi to module sqlite.dialect

I'm trying to build my first jpa hibernate projekt, but unfortunally i come across this error here: Error occurred during initialization of boot layer java.lang

Connect to Wildfly Elytron's Credential Store with Masked Password

I have a credential store that I created with Elytron's tool giving a clear text password: "mypassword". In my Java program I can connect to the store with the

Airplane seating program (2 dimensional array)

I have an airplane seating program but I don't know how to get it to print the number of seats still available and how to get it to quit when I enter q. Any he

Add custom labels to default spring boot actuator metrics

I'm currently working on a Spring boot (webflux) project where we have exposed metrics of our application on /actuator/prometheus endpoint using spring boot act

Java/Kotlin Interoperability Limitations

I recently faced a problem regarding interoperability between Java/Kotlin for suspend functions. See my question: How to Override a suspend function in java cla

java.security.AccessControlException: Access denied ("java.net.URLPermission" "https://example.com" "*:*")

I'm trying to use Java to talk to the ibm connections API through urlConnection with the following code String url = "https://example.com"; URL myUrl = new URL

Why Premature EOF Error has occur, while reading CSV file using SpringBoot Scheduled Task

Below shows the relevant code segments. Is it related to connection close or Buffer memory.? (The file, which contains 50MB+ AND 65000+ Text Lines) @Scheduled(c

Apache poi excel writer works in ide but not in fat jar? java.io.IOException: Your InputStream was neither an OLE2 stream, nor an OOXML str

The code works perfectly fine in IDE but not in normal .jar or in fat .jar? The program works perfectly fine otherwise. Also non-fat .jar doesn't work either. T

How to use java runtime 11 in EMR cluster AWS

I'm creating a cluter in EMR aws and when spark runs my application I'm getting error below: Exception in thread "main" java.lang.UnsupportedClassVersionError:

How do I get a SpringBatch Integration test to load my application properties?

I have the following Spring Batch test in my src/test/java: @RunWith(SpringRunner.class) @SpringBatchTest @EnableAutoConfiguration @ContextConfiguration(classe

Scraping Cloudflare Sites

so I am trying to read data from a bunch of sites, now most of these sites use cloudflare // cloudflare antibot, what this does is block my scrape attempts...

How to get PowerShell to play nice with classes in different files?

I am a student trying to complete an assignment in Java. I use VS Code to write, but I use PowerShell to compile and run the code to ensure compatibility outsid

blocking EntityManager operations

I don't want to perform a blocking operation. Caused by: java.lang.IllegalStateException: You have attempted to perform a blocking operation on a IO thread. Th

LWJGL Texturing - glTexImage2D sometimes crashes

I'm making a Texture class for my game engine. Right now I currently have this simple code for creating a 2D texture and loading an image to it. public class Te

How to implement org.springframework.validation.Validator correctly?

I have seen the following validations are done in Spring Boot. I just wanted to validate some validation logic before saving the data to Database. So can anybod