moyangzhan / langchain4j-aideepin

基于AI的工作效率提升工具 | Retrieval enhancement generation(RAG) project
http://www.aideepin.com
MIT License
332 stars 85 forks source link

relation "ag_graph" does not exist #47

Closed javaer2012 closed 1 week ago

javaer2012 commented 1 week ago

java.lang.RuntimeException: org.postgresql.util.PSQLException: ERROR: relation "ag_graph" does not exist 位置:15 at com.moyz.adi.common.rag.ApacheAgeGraphStore.(ApacheAgeGraphStore.java:68) at com.moyz.adi.common.rag.ApacheAgeGraphStore$ApacheAgeGraphStoreBuilder.build(ApacheAgeGraphStore.java:37) at com.moyz.adi.common.config.BeanConfig.initApacheAgeGraphStore(BeanConfig.java:245) at com.moyz.adi.common.config.BeanConfig$$SpringCGLIB$$0.CGLIB$initApacheAgeGraphStore$5() at com.moyz.adi.common.config.BeanConfig$$SpringCGLIB$$2.invoke() at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:258) at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331) at com.moyz.adi.common.config.BeanConfig$$SpringCGLIB$$0.initApacheAgeGraphStore() at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:139) at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:645) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1332) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1162) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:560) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:520) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) at org.springframework.boot.autoconfigure.diagnostics.analyzer.NoSuchBeanDefinitionFailureAnalyzer.lambda$getUserConfigurationResults$0(NoSuchBeanDefinitionFailureAnalyzer.java:138) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:992) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:575) at java.base/java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260) at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:616) at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:622) at java.base/java.util.stream.ReferencePipeline.toList(ReferencePipeline.java:627) at org.springframework.boot.autoconfigure.diagnostics.analyzer.NoSuchBeanDefinitionFailureAnalyzer.getUserConfigurationResults(NoSuchBeanDefinitionFailureAnalyzer.java:139) at org.springframework.boot.autoconfigure.diagnostics.analyzer.NoSuchBeanDefinitionFailureAnalyzer.analyze(NoSuchBeanDefinitionFailureAnalyzer.java:81) at org.springframework.boot.autoconfigure.diagnostics.analyzer.NoSuchBeanDefinitionFailureAnalyzer.analyze(NoSuchBeanDefinitionFailureAnalyzer.java:59) at org.springframework.boot.diagnostics.analyzer.AbstractInjectionFailureAnalyzer.analyze(AbstractInjectionFailureAnalyzer.java:40) at org.springframework.boot.diagnostics.AbstractFailureAnalyzer.analyze(AbstractFailureAnalyzer.java:34) at org.springframework.boot.diagnostics.FailureAnalyzers.analyze(FailureAnalyzers.java:117) at org.springframework.boot.diagnostics.FailureAnalyzers.reportException(FailureAnalyzers.java:110) at org.springframework.boot.SpringApplication.reportFailure(SpringApplication.java:812) at org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:786) at org.springframework.boot.SpringApplication.run(SpringApplication.java:323) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1304) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1293) at com.moyz.adi.BootstrapApplication.main(BootstrapApplication.java:16) Caused by: org.postgresql.util.PSQLException: ERROR: relation "ag_graph" does not exist 位置:15 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2676) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2366) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:356) at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:496) at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:413) at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:333) at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:319) at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:295) at org.postgresql.jdbc.PgStatement.executeQuery(PgStatement.java:244) at com.moyz.adi.common.rag.ApacheAgeGraphStore.(ApacheAgeGraphStore.java:61) ... 45 more

moyangzhan commented 1 week ago

是不是没有装Apache AGE扩展

javaer2012 commented 1 week ago

需要在对应的库下面,执行CREATE EXTENSION age;