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

Upgrading to a newer Java release #23

Closed
loleg opened this issue Dec 16, 2021 · 3 comments
Closed

Upgrading to a newer Java release #23

loleg opened this issue Dec 16, 2021 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@loleg
Copy link
Contributor

loleg commented Dec 16, 2021

Currently there are issues related to SocksSocketImpl when starting the application on a modern Java release:

Exception in thread "Thread-1" Exception in thread "Thread-0" java.lang.NoClassDefFoundError: Could not initialize class java.net.SocksSocketImpl
	at java.base/java.net.ServerSocket.setImpl(ServerSocket.java:308)
	at java.base/java.net.ServerSocket.<init>(ServerSocket.java:108)
	at com.proxeus.office.libre.conn.BootstrapSocketConnector.connect(BootstrapSocketConnector.java:39)
	at com.proxeus.office.libre.exe.LibreOffice.reconnect(LibreOffice.java:73)
	at com.proxeus.office.libre.exe.LibreOffice.<init>(LibreOffice.java:52)
	at com.proxeus.office.libre.exe.LibreOfficePool.tryNewLibreOffice(LibreOfficePool.java:340)
	at com.proxeus.office.libre.exe.LibreOfficePool.prepare(LibreOfficePool.java:243)
	at com.proxeus.office.libre.exe.LibreOfficePool.access$000(LibreOfficePool.java:35)
	at com.proxeus.office.libre.exe.LibreOfficePool$2.run(LibreOfficePool.java:132)

Which may also be related to the Jetty server .. and warnings like:

Illegal reflective access by com.proxeus.office.libre.exe.LibreOfficePool (file:/.../document-service.jar) to field java.lang.ClassLoader.sys_paths

@loleg loleg added the help wanted Extra attention is needed label Dec 16, 2021
@loleg
Copy link
Contributor Author

loleg commented Dec 16, 2021

After further analysis, I find that the initial warnings were due to mismatched LibreOffice versions, which need to be locked for these operations to succeed.

The second warning has to do with the newer version of Java, and is explained well here in context of Spring Framework.

@loleg
Copy link
Contributor Author

loleg commented Dec 16, 2021

One of the reflective access warnings is coming from a third-party dependency, parboiled via jtwig. It should possible to ignore it using this command:

--add-opens=java.base/java.lang=ALL-UNNAMED

However, from JDK 17 this will result in an unrecoverable exception.

@loleg
Copy link
Contributor Author

loleg commented Dec 17, 2021

Upgrade to JDK 11 seems to be successful, and I am closing this issue for now.

@loleg loleg closed this as completed Dec 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant