Open cherylking opened 1 year ago
I just attempted to use the serverSchemaGen
script in a locally installed Open Liberty runtime where I had a test
server already created. I got the following error:
./serverSchemaGen test
CWWKG3002E: The server named test is not configured to accept local JMX requests. Ensure that the server configuration includes the localConnector feature, and that the server is started.
So not only does the server need to be running, but it also needs the localConnector
feature configured.
Here is the doc for the serverSchemaGen command, which backs up my assertion that the server needs to be running and must contain the localConnector
feature.
@cherylking I wonder if the original problem goes away if we make the change in https://github.com/OpenLiberty/liberty-language-server/pull/189.
The generated XSD from this type (which I think is the type for resourceAdapter
) would end up looking like:
<xsd:complexType name="com.ibm.ws.jca.embeddedResourceAdapter">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="customize" type="com.ibm.ws.jca.embeddedResourceAdapter.customize">
</xsd:element>
<xsd:any processContents="skip" minOccurs="0" maxOccurs="1"/>
</xsd:choice>
...
So the <xsd:any>
there is new, it's only in the XSD generated assuming we make that change.
It's probably easier to just verify on the full, original server.xml than to try to reason through looking at the XSD.
This error was reported by Danny Haase in IBM Consulting. When he added the
properties.wmqJmsRA
element inside theresourceAdapter
element, Liberty Tools flags a diagnostic error. According to Alasdair, "properties.wmqJmsRA will only be in the server.xsd if it is generated with the server schema generator rather than the install schema generator since it only exists because the RA is installed.".We currently use the install schema generator located at
bin/tools/ws-schemagen.jar
. In order to generate a schema that would recognize theproperties.wmqJmsRA
element, we would need to use thebin/tools/ws-serverSchemagen.jar
instead. Alasdair advised that we may only want to use the serverSchemagen.jar when theresourceAdapter
element is present, because it may perform slower than thews-schemagen.jar
.One thing that we will need to determine is once the
resourceAdapter
element is added to server.xml, is the resource adapter immediately installed? Or does it only get installed once the server is started?