Questions tagged [classloader]
A class loader is an object that is responsible for loading classes in Java.
classloader
4,152
questions
0
votes
0
answers
48
views
JMX metrics problem with spring-boot-starter-quartz and class loader
I'm running a spring boot (3.3.0) app with a simple quartz job configured with an mssql database (2017). All works correctly.
The app exposes quartz jmx metrics with the property spring.quartz....
0
votes
0
answers
16
views
How to set flatclasspath in QuarkusTest
I have problems with classloading in QuarkusTests which could be solved if I could set the existing boolean property flatclasspath in QuarkusBootstrap.Builder.
I tested this by setting it during ...
0
votes
0
answers
92
views
Why debugging leads to MetaSpace memory leak in Java?
Debugging a class loaded by a ClassLoader created by a user will cause the class to be referenced by JNI global, and the ClassLoader cannot be uninstalled. Repeating this operation for many times will ...
1
vote
0
answers
107
views
How do I make my webapp classes available to a jar on Jetty's classpath? (Jetty 10+)
My webapp is a WAR file deployed on Jetty 10. I want to use Java SPI to define an interface that end users can implement. The idea is that end users can implement the interface and put a jar in Jetty'...
0
votes
1
answer
72
views
Loading Singleton Instance of a Class using Java ServiceLoader
I have an Interface in my project.
End users can implement this interface and can create their concrete implementations.
All the users have been advised to follow singleton design pattern while ...
0
votes
1
answer
44
views
How to configure Embedded Tomcat such that the classloader will find classes in CATALINA_HOME/lib
I have an issue with embedded Tomcat and classloaders.
I have a java servlet application that runs in an embedded Tomcat(9.0.70) instance. When the application is packaged into a single war file – the ...
0
votes
1
answer
59
views
Unexpected `NoClassDefFoundError` when optional library is not on classpath, but related code is not executed
I am trying to use the Google Closure Compiler from Java code, but want it to be an optional dependency (present at build time, but may not be around when deployed).
The problem I'm having is that I'm ...
0
votes
0
answers
23
views
does monkey patching still works in android gradle
So I read this post on the monkey patching in Android, and seems quite an interesting approach to fix AGP bugs before they get fixed, but when I try to use the approach by creating a class in the ...
1
vote
1
answer
60
views
JavaFX+mybatis+sqlite Could not find resource mapper/UserMapper.xml
When I create a sample-demo use JavaFX+mybatis+sqlite
Could not find resource mapper/UserMapper.xml when I create the folder 'mapper' in 'src/main/resources/',
when I debug in Resources....
0
votes
0
answers
48
views
Does Java Class Data Sharing (CDS) also archive classes in the "classpath"?
We are working on an application that runs the following java command:
java -classpath "C:/dir/sample1.jar; C:/dir/sample2.jar" example.class
I loaded classes to LoadedClasses.lst:
java -...
0
votes
0
answers
27
views
In GlassFish3, How can I "override" internal library, or give preference to app library?
In GlassFish3, my web application 'sfeaapp' uses a library 'jaxrs-api-3.0.10.Final.jar' located in '/var/opt/GlassFish3/domains/sfeaapp/lib/ext/jaxrs-api-3.0.10.Final.jar', which conflicts with ...
-1
votes
1
answer
64
views
How do I solve this Tomcat class loading issue?
I have three Webapps on my Tomcat server. I use ActiveMQ to send messages between them. This has worked but now I'm trying to update from 5.14 to 5.18 and I'm running in to a class loading issue.
To ...
0
votes
0
answers
36
views
Conflicts between WAR file and tomcat lib causing webapp unable to startup due to java.lang.VerifyError: Bad return type
I came across a problems which is causing my spring webapp unable to start up, the error that showing is java.lang.VerifyError: Bad return type , which org/springframework/http/converter/json/...
0
votes
0
answers
126
views
Invalid value io.confluent.kafka.serializers.context.NullContextNameStrategy during runtime when producing a Kafka event using schema registry
I get the following error message during runtime, every time a Kafka event is generated in my production environment. Please note that the same code works in my local setup without any issues and all ...
0
votes
1
answer
61
views
Load dependency class in sbt task
I want to run embedded kafka before all IT test as Tests.Setup from scala object.
So, I have something like
Test / testOptions += Tests.Setup { loader =>
loader.loadClass("io.github....