-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Class Loader Delegate false not working #24808
Comments
Hi, which other jars you have a problem with? In general, it's not possible to just add a library into your application and expect that GlassFish will use it. GlassFish will usually use the components inside GlassFish - for example Mojarra will be used when GlassFish detects that your application uses JSF and it needs to start a JSF engine. When you disable classLoader delegation, what changes is where classes are loaded from if they are imported into other classes in the application. However, specifically for Jakarta Faces, there's an option supported in glassfish-web.xml file. You can specify the property
To explain how classloader delegation works for other components, I'll give you an example with Jackson JSON mapper, which is present in GlassFish and is also often bundled in applications. By default, you don't need to add Jackson JARs to your application and you can still access the Jackson's ObjectMapper class directly, e.g. from a servlet. If you add Jackson JARs to your application, the application will still use the Jackson library in GlassFish. WIth delegate=false, your application will use Jackson library in your app. There is an exception: If a class's package starts with Here's documentation about Class Loader Delegation. |
unavailable except for the jar inside the server |
Environment Details
Problem Description
Although I use in glassfish-web.xml, Glassfish uses the jars on the server.
[2024-02-13T15:55:38.537894+03:00] [GF 7.0.9] [INFO] [faces.config.listener.version] [jakarta.enterprise.resource.webcontainer.faces.config] [tid: _ThreadID=57 _ThreadName=admin-listener(2)] [levelValue: 800] [[ Initializing Mojarra 4.0.5 for context
I also have the same problem with other jars.
The text was updated successfully, but these errors were encountered: