zippy1978 / ghost4j

Java wrapper for Ghostscript C API + PS/PDF document handling API
http://www.ghost4j.org
GNU Lesser General Public License v3.0
64 stars 38 forks source link

AbstracRemoteRender fails with java.rmi.RemoteException: Method is not Remote on Openjdk 1.8.0_242-b08) #68

Open gargassus opened 4 years ago

gargassus commented 4 years ago

We are receiving following error when upgrading java-1.8.0-openjdk-1.8.0.232.b09-0.el7_7.x86_64.rpm to java-1.8.0-openjdk-1.8.0.242.b08-0.el7_7.x86_64.rpm

java.rmi.RemoteException: Method is not Remote: interface gnu.cajo.invoke.Invoke::public abstract java.lang.Object gnu.cajo.invoke.Invoke.invoke(java.lang.String,java.lang.Object) throws java.lang.Exception
        at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:232) ~[?:1.8.0_242]
        at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:180) ~[?:1.8.0_242]
        at com.sun.proxy.$Proxy179.invoke(Unknown Source) ~[?:?]
        at gnu.cajo.invoke.Remote.invoke(Remote.java:565) ~[ghost4j-1.0.1.jar:?]
        at org.ghost4j.renderer.AbstractRemoteRenderer.render(AbstractRemoteRenderer.java:122) ~[ghost4j-1.0.1.jar:?]

Downgrading java is a workaround for now.

mehrentreich commented 4 years ago

This is due to a fix in JDKs starting from version 1.8u242. See issue JDK-8230967 in the release notes:

https://www.oracle.com/technetwork/java/javase/8u241-relnotes-5813177.html

As a quick fix I already provided a pull request for a dirty workaround. This doesn't really fix the issue but at least it makes ghost4j work again with newversion of Java:

https://github.com/zippy1978/ghost4j/pull/69

4F2E4A2E commented 4 years ago

@mehrentreich thy for this workaround

mehrentreich commented 4 years ago

@4F2E4A2E You're welcome!