[Bug]: Milvus-java-sdk not working after packaging, gRPC-related error #37773
Labels
kind/bug
Issues or changes related a bug
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
Is there an existing issue for this?
Environment
Current Behavior
Here is a simple demo of the Milvus Java client that can run normally in IntelliJ IDEA:
However, after packaging it into a JAR file and running it, an error occurs:
Expected Behavior
Steps To Reproduce
Milvus Log
Exception in thread "main" io.grpc.StatusRuntimeException: UNKNOWN at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:268) at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:249) at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:167) at io.milvus.grpc.MilvusServiceGrpc$MilvusServiceBlockingStub.listDatabases(MilvusServiceGrpc.java:4621) at io.milvus.v2.utils.ClientUtils.checkDatabaseExist(ClientUtils.java:107) at io.milvus.v2.client.MilvusClientV2.connect(MilvusClientV2.java:89) at io.milvus.v2.client.MilvusClientV2.<init>(MilvusClientV2.java:60) at org.example.Main.main(Main.java:20) Caused by: java.nio.channels.UnsupportedAddressTypeException at sun.nio.ch.Net.checkAddress(Net.java:97) at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:620) at io.grpc.netty.shaded.io.netty.util.internal.SocketUtils$3.run(SocketUtils.java:91) at io.grpc.netty.shaded.io.netty.util.internal.SocketUtils$3.run(SocketUtils.java:88) at java.security.AccessController.doPrivileged(Native Method) at io.grpc.netty.shaded.io.netty.util.internal.SocketUtils.connect(SocketUtils.java:88) at io.grpc.netty.shaded.io.netty.channel.socket.nio.NioSocketChannel.doConnect(NioSocketChannel.java:322) at io.grpc.netty.shaded.io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.connect(AbstractNioChannel.java:248) at io.grpc.netty.shaded.io.netty.channel.DefaultChannelPipeline$HeadContext.connect(DefaultChannelPipeline.java:1342) at io.grpc.netty.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeConnect(AbstractChannelHandlerContext.java:653) at io.grpc.netty.shaded.io.netty.channel.AbstractChannelHandlerContext.connect(AbstractChannelHandlerContext.java:632) at io.grpc.netty.shaded.io.netty.channel.ChannelDuplexHandler.connect(ChannelDuplexHandler.java:54) at io.grpc.netty.shaded.io.grpc.netty.WriteBufferingAndExceptionHandler.connect(WriteBufferingAndExceptionHandler.java:157) at io.grpc.netty.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeConnect(AbstractChannelHandlerContext.java:655) at io.grpc.netty.shaded.io.netty.channel.AbstractChannelHandlerContext.access$1000(AbstractChannelHandlerContext.java:61) at io.grpc.netty.shaded.io.netty.channel.AbstractChannelHandlerContext$9.run(AbstractChannelHandlerContext.java:637) at io.grpc.netty.shaded.io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) at io.grpc.netty.shaded.io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) at io.grpc.netty.shaded.io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) at io.grpc.netty.shaded.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569) at io.grpc.netty.shaded.io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) at io.grpc.netty.shaded.io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at io.grpc.netty.shaded.io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.lang.Thread.run(Thread.java:750)
Anything else?
No response
The text was updated successfully, but these errors were encountered: