The answer ended up being that the service descriptor files in gRPC's 
dependency jars clobbered each other during the merge. A friend pointed out 
that using shadowJar's mergeServiceFiles() feature 
<https://imperceptiblethoughts.com/shadow/configuration/merging/#merging-service-descriptor-files>
 
fixed the problem:
tasks.named("shadowJar", ShadowJar::class) {
    mergeServiceFiles()
}

On Thursday, August 11, 2022 at 11:57:09 PM UTC-7 Curtis Ullerich wrote:

> This is a Kotlin gRPC project built with Gradle, packaged with the 
> shadowJar plugin. Issuing an RPC succeeds when I use `./gradlew run`, and 
> fails when I use `./gradlew runShadow` (which builds an uber-jar and runs 
> it). 
>
> It says "Exception in thread "main" io.grpc.StatusException: UNKNOWN" and 
> "Caused by: java.nio.channels.UnsupportedAddressTypeException". The sample 
> project and full stack trace are at 
> https://github.com/curtisullerich/shadow-grpc. 
>
> This is hopefully an issue with how I've configured my build, and I'm 
> hoping that the error that gRPC throws can help point out the problem. The 
> supposedly unsupported address type is simply "localhost". It makes me 
> think that some runtime dependency must not be found. I checked the class 
> files present in both cases and they were the same, but they appear in the 
> classpaths in a different order. Fiddling with the ordering of the 
> classpath entries yielded no discoveries.
>
> Any ideas or pointers?
>
> Thanks,
> Curtis
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/89a254df-b39e-46d0-aaa5-cc18d3f39b24n%40googlegroups.com.

Reply via email to