Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] MissingMethodException in SchemaManager.removeIndexLabel() #2471

Open
1 task done
Javlgh opened this issue Mar 4, 2024 · 5 comments
Open
1 task done

[Bug] MissingMethodException in SchemaManager.removeIndexLabel() #2471

Javlgh opened this issue Mar 4, 2024 · 5 comments
Labels
bug Something isn't working gremlin TinkerPop gremlin

Comments

@Javlgh
Copy link

Javlgh commented Mar 4, 2024

Bug Type (问题类型)

gremlin (结果不合预期)

Before submit

  • 我已经确认现有的 IssuesFAQ 中没有相同 / 重复问题 (I have confirmed and searched that there are no similar problems in the historical issue and documents)

Environment (环境信息)

aManager.removeIndexLabel() is applicable for argument types: (String) values: [initialDataLabByName]
Possible solutions: getIndexLabel(java.lang.String)
groovy.lang.MissingMethodException: No signature of method: org.apache.hugegraph.schema.SchemaManager.removeIndexLabel() is applicable for argument types: (String) values: [initialDataLabByName]
Possible solutions: getIndexLabel(java.lang.String)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:70) ~[groovy-2.5.14-indy.jar:2.5.14]
at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:46) ~[groovy-2.5.14-indy.jar:2.5.14]
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:127) ~[groovy-2.5.14-indy.jar:2.5.14]
at Script10311.run(Script10311.groovy:3) ~[?:?]
at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:676) ~[gremlin-groovy-3.5.1.jar:3.5.1]
at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:378) ~[gremlin-groovy-3.5.1.jar:3.5.1]
at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:233) ~[?:1.8.0_144]
at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.lambda$eval$0(GremlinExecutor.java:272) ~[gremlin-groovy-3.5.1.jar:3.5.1]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_144]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_144]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_144]
at org.apache.hugegraph.auth.HugeGraphAuthProxy$ContextTask.run(HugeGraphAuthProxy.java:1860) ~[hugegraph-api-1.0.0.jar:1.0.0]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_144]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_144]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_144]

Expected & Actual behavior (期望与实际表现)

aManager.removeIndexLabel() is applicable for argument types: (String) values: [initialDataLabByName]
Possible solutions: getIndexLabel(java.lang.String)
groovy.lang.MissingMethodException: No signature of method: org.apache.hugegraph.schema.SchemaManager.removeIndexLabel() is applicable for argument types: (String) values: [initialDataLabByName]
Possible solutions: getIndexLabel(java.lang.String)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:70) ~[groovy-2.5.14-indy.jar:2.5.14]
at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:46) ~[groovy-2.5.14-indy.jar:2.5.14]
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:127) ~[groovy-2.5.14-indy.jar:2.5.14]
at Script10311.run(Script10311.groovy:3) ~[?:?]
at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:676) ~[gremlin-groovy-3.5.1.jar:3.5.1]
at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:378) ~[gremlin-groovy-3.5.1.jar:3.5.1]
at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:233) ~[?:1.8.0_144]
at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.lambda$eval$0(GremlinExecutor.java:272) ~[gremlin-groovy-3.5.1.jar:3.5.1]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_144]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_144]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_144]
at org.apache.hugegraph.auth.HugeGraphAuthProxy$ContextTask.run(HugeGraphAuthProxy.java:1860) ~[hugegraph-api-1.0.0.jar:1.0.0]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_144]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_144]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_144]

Vertex/Edge example (问题点 / 边数据举例)

aManager.removeIndexLabel() is applicable for argument types: (String) values: [initialDataLabByName]
Possible solutions: getIndexLabel(java.lang.String)
groovy.lang.MissingMethodException: No signature of method: org.apache.hugegraph.schema.SchemaManager.removeIndexLabel() is applicable for argument types: (String) values: [initialDataLabByName]
Possible solutions: getIndexLabel(java.lang.String)
        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:70) ~[groovy-2.5.14-indy.jar:2.5.14]
        at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:46) ~[groovy-2.5.14-indy.jar:2.5.14]
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:127) ~[groovy-2.5.14-indy.jar:2.5.14]
        at Script10311.run(Script10311.groovy:3) ~[?:?]
        at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:676) ~[gremlin-groovy-3.5.1.jar:3.5.1]
        at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:378) ~[gremlin-groovy-3.5.1.jar:3.5.1]
        at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:233) ~[?:1.8.0_144]
        at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.lambda$eval$0(GremlinExecutor.java:272) ~[gremlin-groovy-3.5.1.jar:3.5.1]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_144]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_144]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_144]
        at org.apache.hugegraph.auth.HugeGraphAuthProxy$ContextTask.run(HugeGraphAuthProxy.java:1860) ~[hugegraph-api-1.0.0.jar:1.0.0]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_144]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_144]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_144]

Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)

aManager.removeIndexLabel() is applicable for argument types: (String) values: [initialDataLabByName]
Possible solutions: getIndexLabel(java.lang.String)
groovy.lang.MissingMethodException: No signature of method: org.apache.hugegraph.schema.SchemaManager.removeIndexLabel() is applicable for argument types: (String) values: [initialDataLabByName]
Possible solutions: getIndexLabel(java.lang.String)
        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:70) ~[groovy-2.5.14-indy.jar:2.5.14]
        at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:46) ~[groovy-2.5.14-indy.jar:2.5.14]
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:127) ~[groovy-2.5.14-indy.jar:2.5.14]
        at Script10311.run(Script10311.groovy:3) ~[?:?]
        at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:676) ~[gremlin-groovy-3.5.1.jar:3.5.1]
        at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:378) ~[gremlin-groovy-3.5.1.jar:3.5.1]
        at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:233) ~[?:1.8.0_144]
        at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.lambda$eval$0(GremlinExecutor.java:272) ~[gremlin-groovy-3.5.1.jar:3.5.1]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_144]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_144]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_144]
        at org.apache.hugegraph.auth.HugeGraphAuthProxy$ContextTask.run(HugeGraphAuthProxy.java:1860) ~[hugegraph-api-1.0.0.jar:1.0.0]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_144]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_144]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_144]
@Javlgh Javlgh added the bug Something isn't working label Mar 4, 2024
Copy link

dosubot bot commented Mar 4, 2024

你好,@Javlgh!很高兴再次看到你的问题,希望这次我们也能一起顺利解决它。

您在尝试使用 removeIndexLabel() 方法时遇到 MissingMethodException,可能是因为在您使用的上下文中,该方法并不存在或无法访问。根据您提供的上下文,我们无法看到直接调用 removeIndexLabel() 方法的代码,也没有定义这样的方法,因此在没有更多关于您如何调用 removeIndexLabel() 的信息的情况下,很难确定具体原因。

然而,根据标准实践和提供的上下文,可能的原因是您尝试使用的方法不直接支持字符串参数,或者您可能正在使用的是 API 的过时或修改过的版本,其中方法签名已经发生变化。在提供的测试和方法调用中,对索引标签的操作(如创建和检索)是通过 SchemaManager 对象进行的特定方法调用(schema.indexLabel("indexName").remove();),但没有直接使用字符串参数调用 removeIndexLabel() 的示例。

为解决此问题,请确保您根据 incubator-hugegraph 仓库的最新 API 文档正确使用该方法。如果该方法应该存在,请验证您使用的库版本是否正确,是否实现了这个方法。如果该方法不存在,您可能需要先获取 IndexLabel 对象,然后在该对象上调用 remove 操作,或者使用另一种用于通过名称删除索引标签的方法。

参考资料:

关于 removeIndexLabel() 方法在 incubator-hugegraph 代码库中的确切签名是:

protected static void removeIndexLabel(HugeGraphParams graph, Id id)

参考资料:

Sources

About Dosu

This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

@dosubot dosubot bot added the gremlin TinkerPop gremlin label Mar 4, 2024
@imbajin imbajin changed the title 服务端报错 [Bug] MissingMethodException in SchemaManager.removeIndexLabel() Mar 4, 2024
@imbajin
Copy link
Member

imbajin commented Mar 4, 2024

@dosu-bot Thanks for your answer, when encountering similar unclear context issues, you can ask users to provide some basic environment/version/runtime information, which will help determine the context

Usually, such problems are caused by package version mismatch or conflicts

Copy link

dosubot bot commented Mar 4, 2024

Hello there! Thank you for your input. You're absolutely right. Gathering basic environment, version, and runtime information from users can indeed be very helpful in resolving context-related issues, especially when it comes to package version mismatches or conflicts. If you have any specific questions or need assistance with a particular issue, feel free to ask!

About Dosu

This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

@Javlgh
Copy link
Author

Javlgh commented Mar 5, 2024

Gremlin 执行失败,详细信息: Can't query by label index 'companyLabByName(id=29)' due to it's in status CREATING(CREATED expected)

@imbajin
Copy link
Member

imbajin commented Mar 5, 2024

Gremlin 执行失败,详细信息: Can't query by label index 'companyLabByName(id=29)' due to it's in status CREATING(CREATED expected)

请提供一些基本的复现环境, 比如你也可以用 docker 版本测试一下是否有类似的问题, 什么版本, 怎么复现你说的问题, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working gremlin TinkerPop gremlin
Projects
None yet
Development

No branches or pull requests

2 participants