Failure to wrap some objects with new gRPC version
Closed this issue · 3 comments
Subject of the issue
With the latest gRPC update, the layout of some of the gRPC object classes has changed in a way that is incompatible with the current WrapperFactory
.
In particular, when loading a corresponding message class in WrapperFactory.wrap
for some nested classes, it fails with java.lang.ClassNotFoundException
because it tries to load the class as if it were a top-leve class on the package, instead of qualifying the name with its parent class.
Your environment
- version of lightningj: 0.6.1-Beta-u1
- version and vendor of JDK: 1.8
- your operating system: Docker java image
Steps to reproduce
Call pendingChannels()
on a SynchronousLndAPI
object under latest version of the library.
Expected behaviour
It should return the response correctly.
Actual behaviour
It throws a java.lang.ClassNotFoundException: org.lightningj.lnd.wrapper.message.WaitingCloseChannel
because it tries to load that class instead of the correct org.lightningj.lnd.wrapper.message. PendingChannelsResponse$WaitingCloseChannel
.
(or org.lightningj.lnd.wrapper.message.PendingChannelsResponse.WaitingCloseChannel
, whichever works with this API)
Hi
I have been able to reproduce the problem. I also found out that similar problems exists for all the extra APIs, so I have to do some more testing on how to fix this in a more flexible way. But I think I will be able to generate a new release that you can test during the weekend.
Regards
Philip
Hi again
I have now uploaded 0.6.1-Beta-u2 to maven central, when you have time maybe you could verify that this fixed your problem?
Hi there, thank you for the quick turnaround! I can confirm it's working for my use cases.