java Questions

3

Solved

I'm using a PostgreSQL DB and I would like to start VACUUM FULL using JPA EntityManager. Version 1 public void doVacuum(){ entityManager.createNativeQuery("VACUUM FULL").executeUpdate() } thro...
Spinose asked 27/10, 2017 at 19:59

3

Solved

TestRepository extends JpaRepository<Test, Long> JpaRepository is an interface. Why do we extend it and not implement it as we know in Java? As far as I know, interfaces are implemented, not...
Aguirre asked 15/11, 2019 at 16:36

4

Solved

WebSecurityConfigurerAdapter: @Component @EnableWebSecurity public class SecurityConfiguration extends WebSecurityConfigurerAdapter { @Override protected void configure(HttpSecurity httpSecurity)...
Elspeth asked 2/8, 2022 at 5:29

4

Solved

I have a JBoss AS7 connecting to AWS and specifically to S3 over the AWS SDK for Java, I have the access and secret keys, and everything runs fine. I use the S3 for various file sharing. The JBoss'...
Lothians asked 22/6, 2020 at 7:31

4

Solved

Upon trying to use a jar on the local linux machine, I am getting the following error: library initialization failed - unable to allocate file descriptor table - out of memory The machine has 32G...
Amplify asked 22/3, 2018 at 17:36

4

Solved

I'm a bit lost about this, because it usually works out of the box. I'm making a small java spring-boot rest api, and to get a nice API desc and test page, I use Swagger. Except this time it doesn'...
Tullius asked 30/3, 2021 at 8:40

10

Solved

I am connecting to a MongoDB sharding server via mongodb java driver in Spring MVC. I am using the following versions: spring-webmvc-3.2.1.RELEASE mongo-java-driver/2.10.0/mongo-java-driver-2.10....
Meryl asked 24/10, 2013 at 2:45

3

I would like to format the timezone information in log4j messages in the format +hh:mm such that a complete timestamp looks like this: 2013-09-05T09:32:10.703+02:00 I know the date format specifie...
Tonsure asked 12/9, 2013 at 12:5

3

Solved

I want a way to generate a file containing random bits in Java. What will create the random file the fastest? I want to create files of any specified size containing random bits. I want to be able ...
Reprobate asked 10/8, 2012 at 18:14

5

I am using Apache HTTP Components Client 4.5.7 to request a URL that containing a double slash. When I look at the wire log, I see that the double slash was "fixed" to be only one slash. Unfortunat...
Interfuse asked 8/2, 2019 at 11:8

2

We are able to use openApi documentation and generate our Java Input classes using the spring swagger-codegen. Also, we can inject the javax.validation annotations when input is generated for commo...

1

Solved

Here is a minimal working example (requires Java 22 or later): (just using libc free for elaborating the behaviour) import java.lang.foreign.*; import java.lang.invoke.MethodHandle; public class M...
Costly asked 25/9 at 5:32

3

When I run my Spring Boot application I get this error when using this below code: Bean named mvcHandlerMappingIntrospector of type org.springframework.web.servlet.handler.HandlerMappingIntrospect...
Aliber asked 11/1, 2023 at 10:34

2

Solved

I have a string like this String incoming = "<html> <head></head> <body> <p><span style=\"font-family: Arial;\">Ευχαριστώ (eff-kha-ri-STOE) Tι κανείς (tee-KAH-n...
Cuisse asked 11/12, 2019 at 7:19

1

Solved

Spring Boot (3.3.4) application fails to start with error java.lang.ClassNotFoundException: ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP ERROR in ch.qos.logback.core.model.processor.ImplicitMo...
Weed asked 24/9 at 11:26

3

I am currently developping a Java server app that connect to another server with SOAP, retrieve some data and store it into a DB. I work on Eclipse Photon, Maven project. My Soap client worked per...
Elda asked 12/11, 2018 at 10:6

6

Solved

In Python, you can have key,value pairs in a dictionary where you can loop through them, as shown below: for k,v in d.iteritems(): print k,v Is there a way to do this with Java HashMaps?
Jumbala asked 1/7, 2010 at 12:6

7

Solved

I have created a java application for "Debian Linux." Now I want that that application reads a file placed in the directory where the jar file of that application is specified. So what to specify a...
Grade asked 7/11, 2009 at 13:26

12

Solved

I am doing exercises on codility. I have spent two days on this problem with no improvement in my score. I get 100% on my correctness score, but fail some performance tests because it returns the w...
Suckow asked 7/10, 2014 at 4:12

5

I'm trying to create a native image from a simple Java program using GraalVM on my Windows 10 machine. The Java program, Hello.java, is a basic "Hello World" print statement. I followed t...
Pongid asked 12/10, 2023 at 13:17

5

I've started getting a rather cryptic error in one of my tests. Surefire report is as follows: ------------------------------------------------------------------------------- Test set: de.systel.st...
Lenticularis asked 26/6, 2020 at 8:18

1

So I have a simple SecurityFilterChain configuration and a simple AuthenticationEntrypoint implementation. The AutheticationEntrypoint implementation just writes a JSON response and the send a 403 ...
Weighbridge asked 10/3, 2023 at 18:2

0

Java 23 now allows Markdown Documentation Comments I am experimenting with this feature right now in latest IntelliJ IDEA 2024.2.2 (community) and with GraalVM for JDK 23 as Java runtime. It seems ...
Bourse asked 22/9 at 8:22

14

Solved

I’m going through a permutation/anagram problem and wanted input on the most efficient means of checking. Now, I’m doing this in Java land, and as such there is a library for EVERYTHING inclu...
Arica asked 6/7, 2016 at 17:2

2

I am trying to find a faster way to count all of the objects within an s3 bucket using Amazon's AWS SDK. private static int getBucketFileCount(AmazonS3 s3, ListObjectsV2Request req) { ListObjects...
Magnoliamagnoliaceous asked 23/8, 2017 at 20:56

© 2022 - 2024 — McMap. All rights reserved.