pfirmstone / JGDMS

Infrastructure for providing secured micro services, that are dynamically discoverable and searchable over ipv6 networks
https://pfirmstone.github.io/JGDMS/
Apache License 2.0
14 stars 4 forks source link

Module JGDMS-Activation ActivatableInvocationHandler #107

Closed pfirmstone closed 3 years ago

pfirmstone commented 4 years ago

ActivatableInvocationHandler is causing an IllegalStateException to be thrown by calling ActivateFailedException.initCause() instead of throwing ActivateFailedException. This must be very old code that predated the change to RemoteException constructors that prevent initCause from being called after construction.

Using the two argument constructor added in Java 1.4 fixes this issue.

ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err:May 25, 2020 10:58:22 AM jdk.internal.event.EventHelper logTLSHandshakeEvent ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err:FINE: TLSHandshake: fe80:0:0:0:9ca0:dfeb:b9a7:96fd%16:50741, TLSv1.2, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, 612664989 ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err:May 25, 2020 10:58:22 AM jdk.internal.event.EventHelper logX509ValidationEvent ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err:FINE: ValidationChain: 1469425862, -1105022227 ActSys-err: May 25, 2020 10:58:22 AM jdk.internal.event.EventHelper logX509ValidationEvent ActSys-err: FINE: ValidationChain: 1469425862, 417672521 ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err:May 25, 2020 10:58:22 AM jdk.internal.event.EventHelper logTLSHandshakeEvent ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err:FINE: TLSHandshake: fe80:0:0:0:9ca0:dfeb:b9a7:96fd%16:2000, TLSv1.2, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, -1105022227 ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err:May 25, 2020 10:58:22 AM org.apache.river.norm.NormServerBaseImpl destroy ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err:INFO: Destroying Norm service ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err:May 25, 2020 10:58:22 AM net.jini.activation.ActivatableInvocationHandler invokeRemoteMethod ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err:FAILED: outbound call org.apache.river.reggie.proxy.Registrar.cancelServiceLease throws ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err:java.lang.IllegalStateException: Can't overwrite cause with java.lang.IllegalArgumentException: object is not an instance of declaring class ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err: at java.base/java.lang.Throwable.initCause(Throwable.java:462) ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err: at net.jini.activation.ActivatableInvocationHandler.invokeMethod0(ActivatableInvocationHandler.java:842) ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err: at net.jini.activation.ActivatableInvocationHandler.invokeMethod(ActivatableInvocationHandler.java:753) ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err: at net.jini.activation.ActivatableInvocationHandler.invokeRemoteMethod(ActivatableInvocationHandler.java:665) ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err: at net.jini.activation.ActivatableInvocationHandler.invoke(ActivatableInvocationHandler.java:501) ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err: at com.sun.proxy.$Proxy32.cancelServiceLease(Unknown Source) ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err: at org.apache.river.reggie.proxy.ServiceLease.cancel(ServiceLease.java:101) ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err: at net.jini.lease.LeaseRenewalManager.cancel(LeaseRenewalManager.java:1233) ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err: at net.jini.lookup.JoinManager.terminate(JoinManager.java:2483) ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err: at org.apache.river.norm.lookup.JoinState.terminateJoin(JoinState.java:357) ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err: at org.apache.river.norm.NormServerBaseImpl.destroy(NormServerBaseImpl.java:1636) ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err: at org.apache.river.norm.ActivatableNormServerImpl.destroy(ActivatableNormServerImpl.java:74) ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err: at java.base/java.lang.reflect.Method.invoke(Method.java:566) ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err: at net.jini.jeri.BasicInvocationDispatcher.invoke(BasicInvocationDispatcher.java:1285) ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err: at net.jini.jeri.BasicInvocationDispatcher.dispatch(BasicInvocationDispatcher.java:707) ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err: at org.apache.river.jeri.internal.runtime.Target$2.run(Target.java:493) ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err: at net.jini.export.ServerContext.doWithServerContext(ServerContext.java:113) ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err: at org.apache.river.jeri.internal.runtime.Target.dispatch(Target.java:490) ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err: at org.apache.river.jeri.internal.runtime.Target.access$000(Target.java:57) ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err: at org.apache.river.jeri.internal.runtime.Target$1.run(Target.java:466) ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err: at org.apache.river.start.AggregatePolicyProvider$AggregateSecurityContext$2.run(AggregatePolicyProvider.java:593) ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err: at java.base/java.security.AccessController.doPrivileged(Native Method) ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err: at org.apache.river.jeri.internal.runtime.Target.dispatch(Target.java:463) ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err: at org.apache.river.jeri.internal.runtime.Target.dispatch(Target.java:428) ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err: at org.apache.river.jeri.internal.runtime.DgcRequestDispatcher.dispatch(DgcRequestDispatcher.java:207) ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err: at net.jini.jeri.connection.ServerConnectionManager$Dispatcher.dispatch(ServerConnectionManager.java:147) ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err: at org.apache.river.jeri.internal.mux.MuxServer$1$1.run(MuxServer.java:247) ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err: at org.apache.river.start.AggregatePolicyProvider$AggregateSecurityContext$1.run(AggregatePolicyProvider.java:579) ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err: at java.base/java.security.AccessController.doPrivileged(Native Method) ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err: at org.apache.river.jeri.internal.mux.MuxServer$1.run(MuxServer.java:243) ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err: at org.apache.river.thread.ThreadPool$Task.run(ThreadPool.java:172) ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err: at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err: at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err: at java.base/java.lang.Thread.run(Thread.java:834) ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err:Caused by: java.rmi.activation.ActivateFailedException: bad proxy ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err: ... 38 more ActSys-err: May 25, 2020 10:58:22 AM:Group-1:err: May 25, 2020 10:58:22 AM net.jini.activation.ActivatableInvocationHandler invokeRemoteMethod