incubator-hugegraph icon indicating copy to clipboard operation
incubator-hugegraph copied to clipboard

不能和fastJson一块使用

Open baibingzhi opened this issue 8 years ago • 4 comments

项目依赖中加入了fastJson,创建schema时会报错 com.alibaba fastjson 1.2.36

Specifications of environment 环境信息 hugegraph version: v0.7.4 operating system: @@CentOS hugegraph backend: memory

baibingzhi avatar Oct 30 '18 09:10 baibingzhi

HugeClient hugeClient = new HugeClient("http://192.168.96.53:8080", "hugegraph","hugegraph","a116d2b2-23ac-4920-b168-14209585cd47");

    SchemaManager schema = hugeClient.schema();
    schema.propertyKey("name").asText().ifNotExist().create();

-------------

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/bdp/repo/org/apache/logging/log4j/log4j-slf4j-impl/2.8.2/log4j-slf4j-impl-2.8.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/bdp/repo/org/slf4j/slf4j-log4j12/1.7.16/slf4j-log4j12-1.7.16.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
Exception in thread "main" java.lang.reflect.UndeclaredThrowableException
	at com.sun.proxy.$Proxy43.create(Unknown Source)
	at com.tupugu.demo.SingleExample.main(SingleExample.java:21)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.intellij.rt.execution.application.AppMainV2.main(AppMainV2.java:131)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.baidu.hugegraph.structure.schema.BuilderProxy.invoke(BuilderProxy.java:56)
	... 7 more
Caused by: class java.lang.IllegalStateException: Missing authentication context when accessing a Graph with permission control
	at com.baidu.hugegraph.exception.ServerException.fromResponse(ServerException.java:44)
	at com.baidu.hugegraph.client.RestClient.checkStatus(RestClient.java:83)
	at com.baidu.hugegraph.rest.RestClient.post(RestClient.java:156)
	at com.baidu.hugegraph.rest.RestClient.post(RestClient.java:133)
	at com.baidu.hugegraph.api.schema.PropertyKeyAPI.create(PropertyKeyAPI.java:43)
	at com.baidu.hugegraph.driver.SchemaManager.addPropertyKey(SchemaManager.java:79)
	at com.baidu.hugegraph.structure.schema.PropertyKey$BuilderImpl.create(PropertyKey.java:116)
	at com.baidu.hugegraph.structure.schema.PropertyKey$BuilderImpl.create(PropertyKey.java:99)
	... 12 more

0xqq avatar Aug 13 '19 04:08 0xqq

fastjson问题也可参考:https://github.com/hugegraph/hugegraph/issues/5

javeme avatar Aug 19 '19 09:08 javeme

使用低版本的即可(1.2.36) 图片

RodJohn avatar Apr 07 '20 02:04 RodJohn

Due to the lack of activity, the current issue is marked as stale and will be closed after 20 days, any update will remove the stale label

github-actions[bot] avatar Jan 23 '22 21:01 github-actions[bot]