[Bug] 改变gremlin-server.yaml里empty-sample.groovy为example.groovy后start-hugegraph出现报错Could not create GremlinScriptEngine for gremlin-groovy

Open
#2,785 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
java
Domain
backend, databases

Research direction

Compare the ScriptFileGremlinPlugin entries in gremlin-server.yaml for scripts/empty-sample.groovy and scripts/example.groovy, then reproduce with ./start-hugegraph.sh. Read the attached hugegraph-server.log alongside the Gremlin engine initialization errors and the RocksDB provider registration message. Done means the configured example script can be used without the gremlin-groovy engine or server startup errors.

Written by the indexing model from the issue text.

Description

bug
主要报错
[ERROR] o.a.t.g.j.DefaultGremlinScriptEngineManager - Could not create GremlinScriptEngine for gremlin-groovy**
Bug Type (问题类型)

server status (启动/运行异常)

Before submit
  • 我已经确认现有的 IssuesFAQ 中没有相同 / 重复问题 (I have confirmed and searched that there are no similar problems in the historical issue and documents)
Environment (环境信息)
  • Server Version: 1.5.0 (Apache Release Version)
  • Backend: RocksDB x nodes, HDD or SSD
  • OS: Ubuntu 20.04.6 LTS
Expected & Actual behavior (期望与实际表现)

打算解决以下issue时发现复现情况2时出现问题:
相关issue 原始issue

原始的gremlin.server.yaml 中的 org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin: 属性,直接运行./start-hugegraph.sh没有报错

      org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin: {
        files: [scripts/empty-sample.groovy]
      }

上述属性修改为scripts/example.groovy

      org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin: {
        files: [scripts/example.groovy]
      }

后出现以下报错 (截取主要片段

**2025-06-05 22:14:09 [gremlin-server-exec-1] [WARN] o.a.h.c.OptionSpace - Already registered option holder: rocksdb (class org.apache.hugegraph.backend.store.rocksdb.RocksDBOptions)
2025-06-05 22:14:09 [gremlin-server-exec-1] [ERROR] o.a.t.g.j.DefaultGremlinScriptEngineManager - Could not create GremlinScriptEngine for gremlin-groovy**

**Caused by: javax.script.ScriptException: javax.script.ScriptException: org.apache.hugegraph.backend.BackendException: Exists BackendStoreProvider: rocksdb (class org.apache.hugegraph.backend.store.rocksdb.RocksDBStoreProvider)**
	
**Caused by: javax.script.ScriptException: org.apache.hugegraph.backend.BackendException: Exists BackendStoreProvider: rocksdb (class org.apache.hugegraph.backend.store.rocksdb.RocksDBStoreProvider)**

**Caused by: org.apache.hugegraph.backend.BackendException: Exists BackendStoreProvider: rocksdb (class org.apache.hugegraph.backend.store.rocksdb.RocksDBStoreProvider)**
	
**2025-06-05 22:14:09 [main] [WARN] o.a.t.g.s.u.ServerGremlinExecutor - Could not initialize gremlin-groovy GremlinScriptEngine as init script could not be evaluated**

**Caused by: java.lang.IllegalArgumentException: gremlin-groovy is not an available GremlinScriptEngine
	at org.apache.tinkerpop.gremlin.jsr223.CachedGremlinScriptEngineManager.registerLookUpInfo(CachedGremlinScriptEngineManager.java:95) ~[gremlin-core-3.5.1.jar:3.5.1]**

具体的logfile如下

hugegraph-server.log

Dominant language
Java
Stars
3.2k
Forks
637
Avg merge
3d 18h
Merged PRs (30d)
23

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/hugegraph

All issues in apache/hugegraph

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.