Closed rumanaHaque closed 10 months ago
I just installed the latest driver in VS Code on Mac and all language server functions in server.xml are working as expected.
I also installed the latest driver in VS Code on Mac and hovering or feature completion are working as expected.
I retried again, closing all my files, uninstalling and reinstalling the LT, but I still see the same problem.
This seems to be a regression in the 23.0.12 drivers, In the same env, I uninstalled 23.0.12, and installed 23.0.9 driver. Using that driver - I don't see the problem.
When I open server.xml - I see this in the output tab.
- Java : /Library/Java/JavaVirtualMachines/ibm-semeru-open-20.jdk/Contents/Home
- VM Version : 20.0.2
- Git 8379294 - [maven-release-plugin] prepare release 0.26.1
[Error - 11:48:21 AM] Nov 02, 2023 11:48:21 io.openliberty.tools.langserver.lemminx.util.XmlReader hasServerRoot()
Message: Error received trying to read XML file: /Users/rumanahaque/Documents/Acme_ee10/acme-ee/AcmeAnnuityWeb/target/classes/com/ibm/wssvt/acme/annuity/struts/actions/ManageHolder-validation.xml
[Error - 11:49:36 AM] Nov 02, 2023 11:49:36 io.openliberty.tools.langserver.lemminx.util.XmlReader hasServerRoot()
Message: Error received trying to read XML file: /Users/rumanahaque/Documents/Acme_ee10/acme-ee/AcmeAnnuityWeb/target/classes/com/ibm/wssvt/acme/annuity/struts/actions/ManageContact-validation.xml
[Error - 11:50:51 AM] Nov 02, 2023 11:50:51 io.openliberty.tools.langserver.lemminx.util.XmlReader hasServerRoot()
Message: Error received trying to read XML file: /Users/rumanahaque/Documents/Acme_ee10/acme-ee/AcmeAnnuityWeb/target/classes/com/ibm/wssvt/acme/annuity/struts/actions/ManageHolder-ManageHolder_save-validation.xml
[Error - 11:50:51 AM] Nov 02, 2023 11:50:51 io.openliberty.tools.langserver.lemminx.util.XmlReader hasServerRoot()
Message: Error received trying to read XML file: /Users/rumanahaque/Documents/Acme_ee10/acme-ee/AcmeAnnuityWeb/src/struts.xml
[Error - 11:50:51 AM] Nov 02, 2023 11:50:51 io.openliberty.tools.langserver.lemminx.util.XmlReader hasServerRoot()
Message: Error received trying to read XML file: /Users/rumanahaque/Documents/Acme_ee10/acme-ee/AcmeAnnuityWeb/src/acme.xml
[Error - 11:52:06 AM] Nov 02, 2023 11:52:06 io.openliberty.tools.langserver.lemminx.util.XmlReader hasServerRoot()
Message: Error received trying to read XML file: /Users/rumanahaque/Documents/Acme_ee10/acme-ee/AcmeAnnuityWeb/src/main/java/com/ibm/wssvt/acme/annuity/struts/actions/ManageHolder-validation.xml
[Error - 11:53:21 AM] Nov 02, 2023 11:53:21 io.openliberty.tools.langserver.lemminx.util.XmlReader hasServerRoot()
Message: Error received trying to read XML file: /Users/rumanahaque/Documents/Acme_ee10/acme-ee/AcmeAnnuityWeb/src/main/java/com/ibm/wssvt/acme/annuity/struts/actions/ManageContact-validation.xml
[Error - 11:54:36 AM] Nov 02, 2023 11:54:36 io.openliberty.tools.langserver.lemminx.util.XmlReader hasServerRoot()
Message: Error received trying to read XML file: /Users/rumanahaque/Documents/Acme_ee10/acme-ee/AcmeAnnuityWeb/src/main/java/com/ibm/wssvt/acme/annuity/struts/actions/ManageHolder-ManageHolder_save-validation.xml
[Info - 11:54:36 AM] Nov 02, 2023 11:54:36 io.openliberty.tools.langserver.lemminx.services.LibertyProjectsManager setWorkspaceFolders()
Message: Adding Liberty workspace for sub-module: file:/Users/rumanahaque/Documents/Acme_ee10/acme-ee/AcmeWebEjbEar/
[Info - 11:54:36 AM] Nov 02, 2023 11:54:36 io.openliberty.tools.langserver.lemminx.services.LibertyProjectsManager setWorkspaceFolders()
Message: Adding Liberty workspace for sub-module: file:/Users/rumanahaque/Documents/Acme_ee10/acme-ee/config/
[Info - 11:54:36 AM] Nov 02, 2023 11:54:36 io.openliberty.tools.langserver.lemminx.LibertyExtension doSave()
Message: Liberty XML settings updated
[Info - 11:54:36 AM] Nov 02, 2023 11:54:36 io.openliberty.tools.langserver.lemminx.LibertyXSDURIResolver generateServerSchemaXsd()
Message: Using schema file at: file:/Users/rumanahaque/Documents/Acme_ee10/acme-ee/AcmeWebEjbEar/target/.libertyls/ol-23.0.0.10.xsd
[Info - 11:54:36 AM] Nov 02, 2023 11:54:36 io.openliberty.tools.langserver.lemminx.LibertyXSDURIResolver generateServerSchemaXsd()
Message: Using schema file at: file:/Users/rumanahaque/Documents/Acme_ee10/acme-ee/AcmeWebEjbEar/target/.libertyls/ol-23.0.0.10.xsd
[Info - 11:54:36 AM] Nov 02, 2023 11:54:36 io.openliberty.tools.langserver.lemminx.LibertyXSDURIResolver generateServerSchemaXsd()
Message: Using schema file at: file:/Users/rumanahaque/Documents/Acme_ee10/acme-ee/AcmeWebEjbEar/target/.libertyls/ol-23.0.0.10.xsd
[Info - 11:54:37 AM] Nov 02, 2023 11:54:37 io.openliberty.tools.langserver.lemminx.services.LibertyWorkspace getFeatureListGraph()
Message: Generating installed features list and storing to cache for workspace file:/Users/rumanahaque/Documents/Acme_ee10/acme-ee/AcmeWebEjbEar/
[Info - 11:54:37 AM] Nov 02, 2023 11:54:37 io.openliberty.tools.langserver.lemminx.services.FeatureService generateFeatureListXml()
Message: Generating feature list file from: /Users/rumanahaque/Documents/Acme_ee10/acme-ee/AcmeWebEjbEar/target/liberty/wlp/bin/tools/ws-featurelist.jar
[Info - 11:54:37 AM] Nov 02, 2023 11:54:37 io.openliberty.tools.langserver.lemminx.services.FeatureService generateFeatureListXml()
Message: Generating feature list file at: /Users/rumanahaque/Documents/Acme_ee10/acme-ee/AcmeWebEjbEar/target/.libertyls/featurelist-ol-23.0.0.10.xml
[Info - 11:54:38 AM] Nov 02, 2023 11:54:38 io.openliberty.tools.langserver.lemminx.services.FeatureService generateFeatureListXml()
Message: Using feature list file at: file:/Users/rumanahaque/Documents/Acme_ee10/acme-ee/AcmeWebEjbEar/target/.libertyls/featurelist-ol-23.0.0.10.xml
[Info - 11:54:38 AM] Nov 02, 2023 11:54:38 io.openliberty.tools.langserver.lemminx.services.FeatureService getInstalledFeaturesList()
Message: Returning installed features: 33
[Info - 11:54:38 AM] Nov 02, 2023 11:54:38 io.openliberty.tools.langserver.lemminx.services.LibertyWorkspace getFeatureListGraph()
Message: Config element validation for missing features enabled for workspace: file:/Users/rumanahaque/Documents/Acme_ee10/acme-ee/AcmeWebEjbEar/
[Info - 11:54:39 AM] Nov 02, 2023 11:54:39 io.openliberty.tools.langserver.lemminx.services.FeatureService getFeatures()
Message: Getting features for: ol-23.0.0.10
[Info - 11:54:39 AM] Nov 02, 2023 11:54:39 io.openliberty.tools.langserver.lemminx.services.FeatureService fetchFeaturesForVersion()
Message: Returning public features from Maven: 260
[Info - 11:54:39 AM] Nov 02, 2023 11:54:39 io.openliberty.tools.langserver.lemminx.services.FeatureService getFeatures()
Message: Getting cached features for: ol-23.0.0.10
[Info - 11:54:39 AM] Nov 02, 2023 11:54:39 io.openliberty.tools.langserver.lemminx.services.FeatureService getFeatures()
Message: Getting cached features for: ol-23.0.0.10
[Info - 11:54:39 AM] Nov 02, 2023 11:54:39 io.openliberty.tools.langserver.lemminx.services.FeatureService getFeatures()
Message: Getting cached features for: ol-23.0.0.10
[Info - 11:54:39 AM] Nov 02, 2023 11:54:39 io.openliberty.tools.langserver.lemminx.services.FeatureService getFeatures()
Message: Getting cached features for: ol-23.0.0.10
[Info - 11:54:39 AM] Nov 02, 2023 11:54:39 io.openliberty.tools.langserver.lemminx.services.FeatureService getFeatures()
Message: Getting cached features for: ol-23.0.0.10
[Info - 11:54:39 AM] Nov 02, 2023 11:54:39 io.openliberty.tools.langserver.lemminx.services.FeatureService getFeatures()
Message: Getting cached features for: ol-23.0.0.10
[Info - 11:54:39 AM] Nov 02, 2023 11:54:39 io.openliberty.tools.langserver.lemminx.services.FeatureService getFeatures()
Message: Getting cached features for: ol-23.0.0.10
[Info - 11:54:39 AM] Nov 02, 2023 11:54:39 io.openliberty.tools.langserver.lemminx.services.FeatureService getFeatures()
Message: Getting cached features for: ol-23.0.0.10
[Info - 11:54:39 AM] Nov 02, 2023 11:54:39 io.openliberty.tools.langserver.lemminx.services.FeatureService getFeatures()
Message: Getting cached features for: ol-23.0.0.10
[Info - 11:54:39 AM] Nov 02, 2023 11:54:39 io.openliberty.tools.langserver.lemminx.services.FeatureService getFeatures()
Message: Getting cached features for: ol-23.0.0.10
[Info - 11:54:39 AM] Nov 02, 2023 11:54:39 io.openliberty.tools.langserver.lemminx.services.FeatureService getFeatures()
Message: Getting cached features for: ol-23.0.0.10
[Info - 11:54:39 AM] Nov 02, 2023 11:54:39 io.openliberty.tools.langserver.lemminx.services.FeatureService getFeatures()
Message: Getting cached features for: ol-23.0.0.10
[Info - 11:54:39 AM] Nov 02, 2023 11:54:39 io.openliberty.tools.langserver.lemminx.services.FeatureService getFeatures()
Message: Getting cached features for: ol-23.0.0.10
[Info - 11:54:39 AM] Nov 02, 2023 11:54:39 io.openliberty.tools.langserver.lemminx.services.FeatureService getFeatures()
Message: Getting cached features for: ol-23.0.0.10
[Info - 11:54:39 AM] Nov 02, 2023 11:54:39 io.openliberty.tools.langserver.lemminx.services.FeatureService getFeatures()
Message: Getting cached features for: ol-23.0.0.10
[Error - 11:55:51 AM] Nov 02, 2023 11:55:51 io.openliberty.tools.langserver.lemminx.util.XmlReader hasServerRoot()
Message: Error received trying to read XML file: /Users/rumanahaque/Documents/Acme_ee10/acme-ee/AcmeAnnuityWeb/target/classes/com/ibm/wssvt/acme/annuity/struts/actions/ManageHolder-validation.xml
[Error - 11:55:51 AM] Nov 02, 2023 11:55:51 io.openliberty.tools.langserver.lemminx.util.XmlReader hasServerRoot()
Message: Error received trying to read XML file: /Users/rumanahaque/Documents/Acme_ee10/acme-ee/AcmeAnnuityWeb/target/classes/com/ibm/wssvt/acme/annuity/struts/actions/ManageHolder-validation.xml
[Info - 11:55:51 AM] Nov 02, 2023 11:55:51 org.eclipse.lemminx.uriresolver.CacheResourcesManager lambda$downloadResource$0()
Message: Downloading http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd to /Users/rumanahaque/.lemminx/cache/http/www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd...
It took a long time to eventually load in the OUTLINE TAB:
Here's the ManageHolder-validation.xml file
<!DOCTYPE validators PUBLIC
"-//OpenSymphony Group//XWork Validator 1.0.2//EN"
"http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
<validators>
<field name="holderId">
<field-validator type="requiredstring">
<message key="requiredstring"/>
</field-validator>
</field>
<!--
<field name="holderFirstName">
<field-validator type="requiredstring">
<message key="requiredstring"/>
</field-validator>
</field>
-->
</validators>
Here's the ManageContact-validation.xml file:
<!DOCTYPE validators PUBLIC
"-//OpenSymphony Group//XWork Validator 1.0.2//EN"
"http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
<validators>
<field name="contactEmail">
<field-validator type="email">
<message key="errors.email"/>
</field-validator>
</field>
</validators>
Once I see the Grammars update in the OUTLINE view - after that everything in server.xml works as expected.
Thanks for the additional details Rumana. The xml files that it is getting an ERROR on all have a non-accessible DTD referenced at the top of the file. This is causing a very long delay for each of those files when we check for the <server>
root element.
I will be adding logic to suppress DTD validation. There are a couple other improvements that I will make when processing XML files, such as handling when the first entry in the xml is not a start element, and skipping processing of xml files in the target/build dir.
I retested this using the VSCode driver that has this fix, and verifies that the fix works. Now when I open server.xml, I see Outline populated immediately, and then hovering works as expected.
I have Liberty Tools installed in VSCode in Mac, with my Acme application.
When I try to see the features in server.xml, hovering or feature completion are not working.