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

Validation error for properties.wmqJmsRA elements in resourceAdapter element in server.xml #173

Open
cherylking opened this issue Apr 24, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@cherylking
Copy link
Member

This error was reported by Danny Haase in IBM Consulting. When he added the properties.wmqJmsRA element inside the resourceAdapter 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 the properties.wmqJmsRA element, we would need to use the bin/tools/ws-serverSchemagen.jar instead. Alasdair advised that we may only want to use the serverSchemagen.jar when the resourceAdapter element is present, because it may perform slower than the ws-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?

@cherylking cherylking added the enhancement New feature or request label Apr 24, 2023
@cherylking
Copy link
Member Author

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.

@cherylking
Copy link
Member Author

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.

@scottkurz
Copy link
Member

@cherylking I wonder if the original problem goes away if we make the change in #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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants