69 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
1
answer
125
views
OpenTelemetry / Spring Boot — class-loading issue with helper class
I am using Java 21, Spring Boot 3.3.12, Otel java agent 2.21.0 and a simple Product Service application.
Below is my application's Dockerfile:
FROM openjdk:21-jdk-slim
WORKDIR /app
ARG JAR_FILE=...
2
votes
1
answer
83
views
Why isn't my class unloaded when I erase any link to them and to ClassLoader?
I am trying to learn how class unloading works in Java. I have created a test application that just loads a class, and than waits.
package com.expirement;
import java.net.URL;
import java.net....
3
votes
1
answer
173
views
Bytebuddy: Redefining works locally but getting error when running inside a docker container
Our ByteBuddy implementation is working when running locally via IntelliJ, but once packaged and deployed in a Docker Container it breaks throwing a ClassNotFoundException
We have the following method ...
1
vote
2
answers
541
views
Unable to get driver to connect to MariaDB
I have recently begun making a plugin for a Minecraft server of mine and need to use a database for persistent storage. As such I am now trying to use the MariaDB server on the machine (which I can ...
0
votes
1
answer
82
views
Can't load or find the main class in java eclipse
So I was doing a JDBC connectivity program I made a new project on eclipse and created a class then I installed the connectivity driver and uploaded the path into the modulepath then after writing the ...
3
votes
0
answers
1k
views
How to handle the Spring Boot classloader 'problem'
First of all sorry for the 'problem' in the title, it's not to blame but I didn't find a suitable description.
Secondly, I'm aware of the issues and articles regarding this topic which I'll come to ...
2
votes
1
answer
463
views
How can I set a delegation parentLast when using open liberty-maven-plugin?
I have two applications that need to set the classloader as delegation="parentLast".
On one hand, I have an app that I don't need to develop over them (called sites.ear), I just used it as ...
1
vote
0
answers
272
views
How does Spring parse Annotations to load the Application Context
I need help understanding how a spring boot application reads annotations in order to configure the application context. Let me give an example of what is confusing me:
I have a spring boot ...
0
votes
0
answers
47
views
Java/Tomcat. After some time there are exceptions of Class loading
Upon deployment my application works but after some time it happens that there are java.lang.NoClassDefFoundError at javax/imageio/impl/IIOInvalidTreeException at com.github.jaiimageio.impl.plugins....
0
votes
1
answer
99
views
Classes not accessible even after loading them with a class loader
I am currently workin on an Application which is able to load modules provided in other jar files by using a custom classLoader
MyModule myModule = myModuleClassLoader.loadClass(f.getPath(),
...
3
votes
2
answers
489
views
Error when trying to use dynamically loaded libraries
I'm trying to dynamically load libraries instead of shading them into my JAR to reduce file size. It's a standalone application with a Bootstrap class and a Main class. The main class is responsible ...
-1
votes
1
answer
92
views
Mixed class loading in Spring Boot causes java.lang.NoSuchMethodError
I have a fairly complex spring boot application with uses a bunch of 3:rd part packages, among others the org.ejml math library. This library is used by several jar files in my application, for ...
0
votes
2
answers
122
views
How do I obtain classpaths from a VirtualMachine?
I have a VirtualMachine from which I want to extract "classpaths". The VM in this case is launched using a RawCommandLineLauncher.
The closest thing I could find is the VirtualMachine method ...
0
votes
0
answers
39
views
JS Can I somehow get instance of class by name if the classes are inside closure?
I'm working on a plugin system for mine service, and I load the plugins code from text using the new Function() construction. And I need somehow get access to the classes constructors link outside the ...
0
votes
0
answers
205
views
URLClassLoader and Multi-release jar
I use the URLClassLoader to dynamically load JDBC drivers into my application.
My application is compiled under OpenJDK15. I cannot upgrade since some drivers would get issues under higher versions.
...