18 questions
0 votes
0 answers
803 views
Getting Response too large exception when executing rest api POST using RestTemplate SpringBoot
I am getting Response too large when executing exchange (type POST) method from Spring Boot restTemplate. Below is the output {"errors":[{"message":"Response too large",&...
-1 votes
1 answer
62 views
Error inserting image icon in java - IllegalArgumentException
I'm developing a java project for a university exam. The project involves the creation of an application with the JDBC methodology. The project is almost finished, I was dedicating myself to the ...
0 votes
1 answer
120 views
Sprint MVC tries to get resources with session id
When I load my Spring MVC site, spring:url appends jsessionid to the resource sources and they will not be found. This only happens the first time opening it. When reloading the site, it isn't there ...
0 votes
1 answer
144 views
Gradle does not copy package-local test resources
I'd like gradle to behave like Eclipse when it executes the tests. Here is a minimal setup: plugins { id 'eclipse' id 'java' } repositories { mavenCentral() } dependencies { ...
0 votes
1 answer
687 views
Spring ResourceUtils showing strange behavior loading a test resource as a File
Java 11 and Spring Boot here. I have the following project directory structure: myapp/ application.yml app/ src/ main/ java/ resources/ test/ java/ ...
1 vote
0 answers
316 views
Could not resolve legacy-support-core-utils-1.0.0.jar (androidx.legacy:legacy-support-core-utils:1.0.0)
i get this error when i want to build android studio project mergeDebugJavaResource Could not resolve legacy-support-core-utils-1.0.0.jar (androidx.legacy:legacy-support-core-utils:1.0.0) my gradle : /...
1 vote
1 answer
2k views
How to cache ResponseEntity<Resource> in spring boot
I am trying to cache ResponseEntity in spring boot but unable to find a proper way to implement the same. There are few examples where return ResponseEntity.ok() .cacheControl(...
-1 votes
1 answer
714 views
Java Library: load file from resources
I'm a developing a Java library that is going to be used internally in our company. It provides a wrapper around Aerospike. When a user calls the factory method, the library should read a file from ...
0 votes
2 answers
211 views
Can't enumerate `class` files with ClassLoader#getResources()
I am trying to enumerate classes in the package with Enumeration<URL> resourceUrls = myObject.getClassLoader().getResources("path/to/my/package/"); while (resourceUrls.hasMoreElements()...
0 votes
1 answer
84 views
JAVA ClassLoader.class and any other explicite class calling of "getResource(...)" work differently?
note: this is a named-module java project Why does getting a resources in java work like this? I got two packages, in main func both are printing the URL of "/respath/tmp.txt" in a jar-file ...
0 votes
1 answer
3k views
Where do I put my resource file to make it readable in Spring using classpath? [duplicate]
I'm trying to load a text file with Java, Maven & Spring, following the examples at https://www.baeldung.com/spring-classpath-file-access#3-using-resourceloader Also using this guide as the base ...
1 vote
0 answers
49 views
Not able to locate the file in a Java project which is imported in another Java project as a library
My automation script is failing in a Java project, as it has another java project as a library imported, in which I am reading a file named 'browserstack.parallel.conf.json' in the 'res' folder using ...
1 vote
1 answer
961 views
Why I can't retrieve this file when I run the .jar version of my Spring Boot application?
I am working on a Spring Batch application and I am finding some problem retrieving an SSL certificate file (used from RestTemplate) when I execute the .jar file containing my application. My ...
-3 votes
1 answer
3k views
There is no java resources folder in my eclipse maven project
In my eclipse maven project there is no java resources folder like this. When I create my dynamic web application there is no java resources folder in it. I tick the Generate web.xml deployment ...
0 votes
1 answer
3k views
How to send a ByteArrayResource via ResponseEntity
I am working on a Java application, and the functionality I am working on is to download a file after populating it's content from the database when the user clicks on export button, the file is ...