Payara Platform Deployment Issues? Try Switching Off XML Validation
Published on 01 Dec 2022
by Petr AubrechtDuring deployment of Jakarta EE applications to the Payara Server, all the xml files (e.g. web.xml
, persinstence.xml
) are verified against its schema.
Payara Platform includes all standard Jakarta EE schema, so there is typically no reason to download external schema to check against xml files. However, if the application uses external schema, in very rare cases, there may be an error during deployment. In this blog, I describe a quick fix to avoid this.
If the application uses external schema, they need to be downloaded. The parser is robust for cases when the schema is not available; for example if the file is not present on the server or the server doesn't respond. Verification is simply skipped and deployment continues.
In very rare cases, the server responds, but provides an unexpected file. Some servers, in the case of abnormal errors (e.g. during DDOS attack), return an error page with an explanation of what's wrong. This is often in form of XTHML, e.g. they are recognized as XML files, processed as schemas, verification immediately ends with error and the deployment is canceled:
java.io.IOException: org.xml.sax.SAXParseException publicId: http://www.oracle.com/webfolder/technetwork/jsc/xml/ns/persistence/persistence_3_0.xsd; lineNumber: 1; columnNumber: 57; Deployment descriptor file META-INF/persistence.xml in archive [classes]. s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'Oracle Access Manager Operation Error'.
In this rare case, it is possible to switch off the validation of XML files during deployment. It can be easily done by asadmin command:
./asadmin set configs.config.server-config.admin-service.das-config.deploy-xml-validation=none
When the temporal problem is solved, the server can be returned to its original state, validating fully:
./asadmin set configs.config.server-config.admin-service.das-config.deploy-xml-validation=full
And that's it - your deployment issue should be fixed!
For more information on getting Payara Server up and running, you might find our 'Comprehensive Getting Started Guide' useful:
For more information on improving performance by finding problems, try our new guide 'The Complete Guide to Testing on the Jakarta EE Platform':
Related Posts
Jakarta EE Media & Community Challenge - Winning Entries: Part 4
Published on 19 Dec 2024
by Chiara Civardi
2 Comments
The Jakarta EE Media and Community Challenge initiated by Payara celebrates the innovation and creativity that thrives within the Jakarta EE community. This global competition invited developers, technical writers and technology enthusiasts to ...
Virtual Payara Conference is this week! See the Agenda Highlights
Published on 09 Dec 2024
by Dominika Tasarz
0 Comments
Virtual Payara Conference - find out more and register here - is a two-day, free event that brings together industry leaders, developers, and innovators to explore the latest advancements and strategic insights in the world of Java and Jakarta ...