Skip to content
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

Fix exception if GF Embedded config file is set without schema #25151

Merged
merged 2 commits into from
Sep 24, 2024

Conversation

OndroMih
Copy link
Contributor

@OndroMih OndroMih commented Sep 21, 2024

GlassFish Embedded expects that the URI argument to glassFishProperties.setConfigFileURI() is "absolute", which means it should start with schema, e.g. "file:/glassfish/domain.xml". Otherwise it will throw an exception. This is counterintuitive.

This fixes it to accept also a path without the schema, and retrieves the URI from File. Then it's enough to pass "/glassfish/domain.xml", or a relative path, "domain.xml", for example.

Also fixes a log message if domain.xml is not valid.

@OndroMih OndroMih force-pushed the ondromih-fix-config-file branch from a7080c9 to 5e50669 Compare September 21, 2024 13:00
Instead of logging a messsage like NCLS-CFGAPI-00086, it now logs a message like
"Instance server from environment not found in domain.xml"
@dmatej dmatej requested a review from a team September 23, 2024 19:39
@dmatej dmatej added this to the 7.0.18 milestone Sep 23, 2024
@dmatej dmatej added the bug Something isn't working label Sep 23, 2024
@dmatej dmatej merged commit 76f9f8a into eclipse-ee4j:master Sep 24, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants