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

Diagnostic on <server> element in server.xml #246

Open
cherylking opened this issue Nov 3, 2023 · 0 comments
Open

Diagnostic on <server> element in server.xml #246

cherylking opened this issue Nov 3, 2023 · 0 comments

Comments

@cherylking
Copy link
Member

Certain scenarios can cause the <server> element to have a diagnostic message (seen in VS Code, but probably affects all IDEs). The message basically states that the server schema cannot be loaded/found. Here are the steps to create and the explanation why it happens.

  1. Open a project. Doesn't matter if it is maven/gradle, or whether it has been built previously or not.
  2. Open the server.xml. There should be no diagnostics (if the project was configured correctly).
  3. If the project was previously built, from the terminal, do a clean.
  4. Make sure the pom.xml is either using openliberty-kernel or does not specify the runtimeArtifact.
  5. From the Liberty Dashboard, select Start.
  6. As the server is starting, red diagnostics will appear for some elements.
  7. When the features get installed, the main <server> root element will have a diagnostic.

The reason this happens is that the installation of features causes the .libertyls directory to get deleted, and that dir has the generated xsd that is used to validate the server.xml file. After a bit of time passes, a new xsd gets generated with the newly updated Liberty runtime and the diagnostic goes away.

Not sure if there is a way for us to detect this and revert to the default schema temporarily, or if we should have a backup of the schema to use in this case until the new one gets generated?

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

No branches or pull requests

1 participant