KnowageLabs / Knowage-Server

Knowage is the professional open source suite for modern business analytics over traditional sources and big data systems.
http://www.knowage-suite.com
GNU Affero General Public License v3.0
406 stars 221 forks source link

Dependencies on sun.misc.BASE64Encoder, will not run in OpenJDK #106

Closed danielearning closed 2 years ago

danielearning commented 5 years ago

Describe the bug There are many classes (like AsymmetricProviderSingleton.java) instantiating sun.misc.BASE64Encoder and BASE64Decoder. Classes in sun.misc are bundled in Sun Java8 but not in OpenJDK Java12. Knowage doesn't work on OpenJDK Java12: login page appears, entering user and password leads to a HTTP/500 error. This has been observed in Knowage Server CE in Windows 10 with Oracle Java8 (Knowage works) and OpenJDK Java12, but it's expected to happen to other versions, probably every OpenJDK version and Java9 and beyond. Lots of resources on the Internet recommend replacing the private API in sun.misc.BASE64xxcoder with java.util.Base64, a standard API.

To Reproduce Steps to reproduce the behavior:

  1. Install OpenJDK Java 12.
  2. Start Knowage. See that JAVA_HOME points to OpenJDK Java 12 directory.
  3. Try to login.
  4. See error HTTP/500 in browser; see errors NoClassDefFoundError: sun/misc/BASE64Encoder in logs.

Expected behavior Login happens normally.

Desktop (please complete the following information):

Smartphone (please complete the following information): N/A.

Additional context Add any other context about the problem here.

davide-zerbetto commented 5 years ago

Knowage works with Oracle Java 8 or OpenJDK Java 8. Problem when moving to later versions is not only the lack of sun.misc.BASE64Encoder, but also the lack of some Java EE specifications. You can see here the list of Java EE specification that were removed in Java 11: https://www.oracle.com/technetwork/java/javase/11-relnote-issues-5012449.html#JDK-8190378

danielearning commented 5 years ago

For the sun.misc.BASE64 classes there is a drop-in replacement (not tested myself) in java.utils: https://stackoverflow.com/a/5549514/3201834 I am aware of requirements for Soap and Jaxb. I got some jars from maven repositories for those missing classes. But I could not solve that way the sun.misc ones.

github-actions[bot] commented 2 years ago

This issue is stale because it is related to an old version or it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 2 years ago

This issue was closed because it has been stalled for 5 days with no activity.