I've recently been restoring my Java EE setup after a computer crash and I thought I'd try Open JDK 16 and Glassfish 6.1.0 but on deploying my application I get the following exception which I've never seen before:
java.io.IOException: com.sun.enterprise.admin.remote.RemoteFailureException: Error occurred during deployment: Exception while deploying the app [myapp-0.0.1-SNAPSHOT] : org.xml.sax.SAXException: Requested schema is not found in local repository, please ensure that there are no typos in the XML namespace declaration.. Please see server.log for more details.
I'm not sure how to resolve that, or maybe I should just roll back to JDK11. I was previously running JDK 1.8.0 and Glassfish 5.1.0
Eclipse Glassfisch 6.1.0 does not currenctly support JDK 16. Only JDK11.
From the documentation found here:
Eclipse GlassFish 6.2.0 is a Jakarta EE 9.1 Compatible Implementation and the latest release of Eclipse GlassFish. It supports Jakarta MVC as a major new feature. Officially supports JDK 11. Runs on JDK 16 (but not fully tested on 16).
Eclipse GlassFish 6.1.0 is a Jakarta EE 9.1 Compatible Implementation and the previous release of Eclipse GlassFish. It's functionally identical to Eclipse GlassFish 6.0.0, but supports JDK 11.
Eclipse GlassFish 6.0.0 is a Jakarta EE 9 Compatible Implementation and and older release of Eclipse GlassFish. This release only supports JDK 8.
So you need to either compile your application with jdk11 or upgrade to glassfish 6.2.0. But be aware: it is not fully tested with jdk 16 yet.