Page 1 of 1
Java version compatibility
Posted: Wed Oct 26, 2022 9:01 am
by Silentar
Hello
On servers with Oxygen Web Editor appeared non-related to editor issue that can be fixed only by upgrade of Java to 19
But after upgrade Editor servlet refuses to start
My question is - is editor expected to work in Tomcat9+Java19 environment?
Error I get - java.lang.UnsupportedOperationException: The Security Manager is deprecated and will be removed in a future release in ro.sync.ecss.extensions.api.webapp.WebappAuthorDocumentFactory.init
Tried with 24 and 25 Editor
(I apologize for likely trivial question, but Java is not my specialization)
Re: Java version compatibility
Posted: Wed Oct 26, 2022 11:41 am
by cristi_talau
Hello,
Oxygen XML Web Author officially supports only Java 8 and 11.
We are currently working to add official support Java 17 in an upcoming release. Fortunately, there compatibility is pretty decent - we only had to do the following changes:
1. Set the JDK_JAVA_OPTIONS environment variable to
Code: Select all
--add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.regex=ALL-UNNAMED --add-opens=java.base/sun.net.util=ALL-UNNAMED --add-opens=java.base/sun.net.www.protocol.http=ALL-UNNAMED --add-opens=java.base/sun.net.www.protocol.https=ALL-UNNAMED --add-opens=java.xml/com.sun.org.apache.xerces.internal.xni=ALL-UNNAMED
2. If you configured Web Author to use a catalina.policy file, replace these lines
Code: Select all
// Oxygen requires these permissions to connect to a URL.
permission java.net.URLPermission "http:*", "*";
permission java.net.URLPermission "https:*", "*";
with
Code: Select all
// Oxygen requires these permissions to connect to a URL.
permission java.net.URLPermission "http:*", "*";
permission java.net.URLPermission "https:*", "*";
permission ro.sync.security.manager.URLPermission "http:*", "*";
permission ro.sync.security.manager.URLPermission "https:*", "*";
3. If you use a date picker form control in your CSS files with the default format, you have to provide an explicit format.
In Java 19 it seems that you need to also set the system property "-Djava.security.manager=allow" among VM parameters.
Best,
Cristian
Re: Java version compatibility
Posted: Mon Oct 31, 2022 1:22 pm
by Silentar
Huge thank you for your answer.
I managed to run editor in required environment after those changes.
But editor seems to be unable to connect to both License Server and data source through RestConnector -
getting
Code: Select all
Cannot connect to the license server.
org/apache/commons/collections4/map/HashedMap (http://user@...../oXygenLicenseServlet/license-servlet?action=LIC_REQUEST&serverURL=http://...../oXygenLicenseServlet/license-servlet&name=...&hostname=.....&macaddr=.....)
and
Code: Select all
Document could not be loaded
Details:
org/apache/commons/collections4/map/HashedMap (https://......url to data that works if i open it directly)
correspondingly
catalina.policy was updated with config from here -
https://www.oxygenxml.com/doc/versions/ ... ina.policy plus ro.sync.security.manager.URLPermission lines from your message (though couldn't find where to put -security in Windows service Tomcat - assumed that -Djava.security.manager=allow does it).
"Authomatically accept security certificates" setting is on (but License Server is on http)
Re: Java version compatibility
Posted: Tue Nov 01, 2022 10:03 am
by cristi_talau
Hello,
This kind of error comes with more details in the server logs [1]. Can you look inside the log and post also the stack trace of that Exception?
Also, it is better to use Java 17 which is a long-term support release and will be also officially supported in Web Author in a future relase.
Best,
Cristian
[1]
https://www.oxygenxml.com/doc/versions/ ... vwf_ptq_2v