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

Need more descriptive error message in case of an invalid schema #23601

Closed
kitlei-robert opened this issue Sep 12, 2021 · 2 comments · Fixed by #24082
Closed

Need more descriptive error message in case of an invalid schema #23601

kitlei-robert opened this issue Sep 12, 2021 · 2 comments · Fixed by #24082
Assignees
Milestone

Comments

@kitlei-robert
Copy link

Environment Details

  • GlassFish Version (and build number): 6.2.1 release

Problem Description

I am in the process of updating some old JEE projects to Jakarta EE 9(.1). As the projects are quite simple, it takes me only two steps: replacing javax. package name prefixes with jakarta. as appropriate, and updating the schemas. This issue concerns the latter step.

If I try to use the projects with GlassFish 6.2.1, I get the error message thrown on this line of code. It is possibly loaded from this file, however, the two texts are the same: Requested schema is not found in local repository, please ensure that there are no typos in the XML namespace declaration.

This error message is not helpful enough, as it doesn't mention the name of the wrong schema, forcing me into a guessing game.

Suggestion: include the name of the missing/wrong schema's name in the error message like this: "Requested schema wrong_schema.xsd is not found in local repository, please ensure that there are no typos in the XML namespace declaration." Optionally, for further assistance, the message could also mention the path of the local repository.

Performing the change seems to be trivial: the required name should be one of the two arguments on this line.

@OndroMih
Copy link
Contributor

OndroMih commented Aug 3, 2022

The link in "on this line" should be this one:

"Requested schema is not found in local repository, please ensure that there are no typos in the XML namespace declaration."));
(when linking to the code, it's always better to refer to a specific commit rather than the master branch, which may change in the future)

@dmatej dmatej self-assigned this Aug 14, 2022
dmatej added a commit to dmatej/glassfish that referenced this issue Aug 15, 2022
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
@dmatej dmatej linked a pull request Aug 15, 2022 that will close this issue
@dmatej
Copy link
Contributor

dmatej commented Aug 16, 2022

I will go through LogStrings.properties in org.glassfish.main.deployment.deployment-common/src/main/resources/com/sun/logging/enterprise/system/tools/deployment , seems many of these log keys are used by loggers with different bundles.

dmatej added a commit to dmatej/glassfish that referenced this issue Aug 22, 2022
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
dmatej added a commit to dmatej/glassfish that referenced this issue Aug 24, 2022
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
dmatej added a commit to dmatej/glassfish that referenced this issue Aug 25, 2022
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
dmatej added a commit to dmatej/glassfish that referenced this issue Aug 29, 2022
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
dmatej added a commit to dmatej/glassfish that referenced this issue Sep 7, 2022
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
dmatej added a commit to dmatej/glassfish that referenced this issue Sep 18, 2022
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
@dmatej dmatej added this to the 7.0.0 milestone Sep 21, 2022
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 a pull request may close this issue.

3 participants