Idea连接HugeGraph报EXCLUDE_EMPTY错误
一、错误内容
Exception in thread "main" java.lang.NoSuchFieldError: EXCLUDE_EMPTY at org.glassfish.jersey.client.ClientConfig$State.<init>(ClientConfig.java:150) at org.glassfish.jersey.client.ClientConfig.<init>(ClientConfig.java:468) at com.baidu.hugegraph.rest.AbstractRestClient$ConfigBuilder.<init>(AbstractRestClient.java:419) at com.baidu.hugegraph.rest.AbstractRestClient.<init>(AbstractRestClient.java:117) at com.baidu.hugegraph.client.RestClient.<init>(RestClient.java:55) at com.baidu.hugegraph.driver.HugeClient.<init>(HugeClient.java:59) at com.baidu.hugegraph.driver.HugeClientBuilder.build(HugeClientBuilder.java:70) at com.meiyijia.pd.flink.hugeGraph.BatchExample.main(BatchExample.java:26)
二、报错场景
public class BatchExample { public static void main(String[] args) { try { HugeClient hugeClient = HugeClient.builder("http://192.168.66.83:8080", "meta_hugegraph") .configTimeout(20) // 默认 20s 超时 .configUser("**", "**") // 默认未开启用户权限 .build(); System.out.println(hugeClient); SchemaManager schema = hugeClient.schema(); PropertyKey name = schema.getPropertyKey("name"); System.out.println(name); }catch (Exception e){ e.printStackTrace(); } } }
<dependency> <groupId>com.baidu.hugegraph</groupId> <artifactId>hugegraph-client</artifactId> <version>1.9.0</version> </dependency>
三、解决思路
看上去像是版本问题,百度也找不出答案,最后把Maven依赖调换的一下顺序就好了,我这个老工程依赖比较多,我添加hugegraph-client依赖的时候习惯性的把它放到pom文件的末尾,所以运行程序就报错了,看来有些时候姿势不对也进不去啊
解决:将依赖放置pom文件的最前面即可
分类:
HugeGraph报错日志分析
标签:
HugeGraph报错日志分析
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本