You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hugegraph.apache.org by GitBox <gi...@apache.org> on 2022/06/07 03:25:33 UTC

[GitHub] [incubator-hugegraph] YXWisaboy opened a new issue, #1898: groovy类找不到

YXWisaboy opened a new issue, #1898:
URL: https://github.com/apache/incubator-hugegraph/issues/1898

   ### Problem Type (问题类型)
   
   server status (启动/运行异常)
   
   ### Before submit
   
   - [X] 我已经确认现有的 [Issues](https://github.com/hugegraph/hugegraph/issues) 与 [FAQ](https://hugegraph.github.io/hugegraph-doc/guides/faq.html) 中没有相同 / 重复问题
   
   ### Environment (环境信息)
   
   - Server Version: v0.11.x
   - Backend: RocksDB x nodes, HDD or SSD 
   - OS: xx CPUs, xx G RAM, Centos 7.x 
   - Data Size:  xx vertices, xx edges <!-- (like 1000W 点, 9000W 边) -->
   
   
   ### Your Question (问题描述)
   
   将数据从mysql数据库导入,配置存储后端也是mysql情况下,
   在用load工具添加节点元信息时,出现找不到groovy类的错误,不知道是不是版本匹配问题,jdk使用的也是1.8,还是中文问题?
   
   
   添加节点执行的groovy语句:
   schema.vertexLabel("car_model").usePrimaryKeyId().properties("car_model_id","车型配置","经销商报价","官方指导价","生产厂商","大中小等级","能源类型","上市时间","发动机参数","最大功率","发动机最大功率"···············,"大灯高度调节","大灯清洗功能","车内氛围灯","灯光特色功能","大灯延时关闭","前大灯雨雾模式","电动车窗1","电动车窗2","车窗一键升降","车窗防夹手功能","外后视镜功能1","外后视镜功能2","外后视镜功能3").primaryKeys("car_model_id").ifNotExist().create();
   
   属性共254个
   
   错误截图:
   ![image](https://user-images.githubusercontent.com/31767759/172287840-815904a9-4486-42c0-955c-23e25fbff21d.png)
   
   
   
   ### Vertex/Edge example (问题点 / 边数据举例)
   
   _No response_
   
   ### Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@hugegraph.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-hugegraph] seagle-yuan commented on issue #1898: groovy类找不到

Posted by GitBox <gi...@apache.org>.
seagle-yuan commented on issue #1898:
URL: https://github.com/apache/incubator-hugegraph/issues/1898#issuecomment-1148383458

   看起来像版本问题。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-hugegraph] javeme commented on issue #1898: [Question] 启动 server 时提示 groovy 类找不到

Posted by GitBox <gi...@apache.org>.
javeme commented on issue #1898:
URL: https://github.com/apache/incubator-hugegraph/issues/1898#issuecomment-1149687250

   有可能是groovy限制了动态参数长度问题,可以尝试将参数使用中括号:
   ```java
   schema.vertexLabel("car_model").usePrimaryKeyId().properties(["p1", "p2", "p3...").ifNotExist().create();
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-hugegraph] YXWisaboy commented on issue #1898: [Question] 启动 server 时提示 groovy 类找不到

Posted by GitBox <gi...@apache.org>.
YXWisaboy commented on issue #1898:
URL: https://github.com/apache/incubator-hugegraph/issues/1898#issuecomment-1149631822

   感谢回复,我把属性数量削减到200以下时,可以成功将节点数据导入了,但边数据导入仍存在问题
   
   我的后端为mysql,数据形式如下
   ![image](https://user-images.githubusercontent.com/31767759/172571646-cba89f39-fc64-4ec2-82eb-ccaf95b97908.png)
   
   我的schema文件中关于节点与边的定义如下:
   schema.vertexLabel("car_brand").usePrimaryKeyId().properties("car_brand_name").primaryKeys("car_brand_name").ifNotExist().create();
   schema.vertexLabel("car_model").usePrimaryKeyId().properties("car_model_id","车型配置","经销商报价",········,"110V/220V/230V电源插座","行李舱12V电源接口").primaryKeys("car_model_id").ifNotExist().create();
   schema.edgeLabel("product").sourceLabel("car_brand").targetLabel("car_model").ifNotExist().create();
   
   关于边的映射如下:
   {
     "version": "2.0",
     "structs": [
       {
         "id": "3",
         "skip": false,
         "input": {
           "type": "jdbc",
           "vendor":"MySQL",
           "driver": "com.mysql.cj.jdbc.Driver",
           "url": "jdbc:mysql://····",
           "database": "···",
           "table": "····",
           "username": "····",
           "password": "····"
         },
         "vertices": [
         ],
         "edges": [
            {
               "label": "product",
               "source": ["id"],
               "target": ["manufacturer"],
               "field_mapping": {
                 "id": "car_model_id",
                 "manufacturer": "car_brand_name"
               },
               "value_mapping": {},
               "selected": [],
               "ignored": [],
               "null_values": [
                 ""
               ],
               "update_strategies": {}
           }
         ]
       }
     ]
   }
   
   log中的报错如下:
   2022-06-08 15:48:52 [main] [ERROR] c.b.h.l.t.ParseTaskBuilder [] - Parse EDGE error
   com.baidu.hugegraph.loader.exception.ParseException: Make sure the the primary key fields [car_brand_name] are not empty, or check whether the headers or field_mapping are configured correctly
   	at com.baidu.hugegraph.loader.task.ParseTaskBuilder.lambda$buildTask$0(ParseTaskBuilder.java:121) ~[hugegraph-loader-0.12.0.jar:?]
   	at com.baidu.hugegraph.loader.task.ParseTaskBuilder$ParseTask.get(ParseTaskBuilder.java:160) [hugegraph-loader-0.12.0.jar:?]
   	at com.baidu.hugegraph.loader.HugeGraphLoader.executeParseTask(HugeGraphLoader.java:289) [hugegraph-loader-0.12.0.jar:?]
   	at com.baidu.hugegraph.loader.HugeGraphLoader.loadStruct(HugeGraphLoader.java:263) [hugegraph-loader-0.12.0.jar:?]
   	at com.baidu.hugegraph.loader.HugeGraphLoader.loadStructs(HugeGraphLoader.java:219) [hugegraph-loader-0.12.0.jar:?]
   	at com.baidu.hugegraph.loader.HugeGraphLoader.loadInputs(HugeGraphLoader.java:201) [hugegraph-loader-0.12.0.jar:?]
   	at com.baidu.hugegraph.loader.HugeGraphLoader.loadInputs(HugeGraphLoader.java:173) [hugegraph-loader-0.12.0.jar:?]
   	at com.baidu.hugegraph.loader.HugeGraphLoader.load(HugeGraphLoader.java:110) [hugegraph-loader-0.12.0.jar:?]
   	at com.baidu.hugegraph.loader.HugeGraphLoader.main(HugeGraphLoader.java:73) [hugegraph-loader-0.12.0.jar:?]
   Caused by: java.lang.IllegalArgumentException: Make sure the the primary key fields [car_brand_name] are not empty, or check whether the headers or field_mapping are configured correctly
   	at com.google.common.base.Preconditions.checkArgument(Preconditions.java:164) ~[guava-29.0-jre.jar:?]
   	at com.baidu.hugegraph.util.E.checkArgument(E.java:56) ~[hugegraph-common-2.0.1.jar:2.0.1.0]
   	at com.baidu.hugegraph.loader.builder.ElementBuilder$VertexPkKVPairs.extractFromEdge(ElementBuilder.java:515) ~[hugegraph-loader-0.12.0.jar:?]
   	at com.baidu.hugegraph.loader.builder.EdgeBuilder.build(EdgeBuilder.java:80) ~[hugegraph-loader-0.12.0.jar:?]
   	at com.baidu.hugegraph.loader.task.ParseTaskBuilder.lambda$buildTask$0(ParseTaskBuilder.java:98) ~[hugegraph-loader-0.12.0.jar:?]
   	... 8 more
   
   该问题也困扰我两天了,希望得到您的回复,谢谢
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-hugegraph] javeme commented on issue #1898: [Question] 启动 server 时提示 groovy 类找不到

Posted by GitBox <gi...@apache.org>.
javeme commented on issue #1898:
URL: https://github.com/apache/incubator-hugegraph/issues/1898#issuecomment-1149700997

   关于第二个边解析错误问题,请检查下error-data-log目录下实际的错误数据内容,确保car_brand(manufacturer)实际存在。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-hugegraph] github-actions[bot] commented on issue #1898: [Question] 启动 server 时提示 groovy 类找不到

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #1898:
URL: https://github.com/apache/incubator-hugegraph/issues/1898#issuecomment-1164871151

   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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-hugegraph] github-actions[bot] closed issue #1898: [Question] 启动 server 时提示 groovy 类找不到

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed issue #1898: [Question] 启动 server 时提示 groovy 类找不到
URL: https://github.com/apache/incubator-hugegraph/issues/1898


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org