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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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.

Instead of logging a messsage like NCLS-CFGAPI-00086, it now logs a message like
"Instance server from environment not found in domain.xml"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant