简体   繁体   English

OrientDB验证错误

[英]OrientDB Verify Error

This is tough one. 这是艰难的。

We have a xlsx parser that creating vertexes. 我们有一个创建顶点的xlsx解析器。 However, this recently started happening after refactoring the original free-form project in Maven (I'm not ready to blame the refactoring... yet.) 但是,这是在Maven中重构了原始的自由格式项目之后才开始发生的(我还没准备好责怪重构……)。

However, we can't see past this error as we're not doing anything that would typically generate this error. 但是,我们看不到该错误,因为我们没有执行通常会产生此错误的任何操作。

We are using the v2.1.8 OrientJars, tinkerpop 2.6.0, there is a OrientDB 2.1.8 DB running and the connection via the console, eg, connect database user password works. 我们正在使用OrientJars v2.1.8,tinkerpop 2.6.0,正在运行OrientDB 2.1.8 DB,并通过控制台进行连接,例如, connect database user password

All the test cases reading the xlsx pass from the JAR pass. 从JAR阶段读取xlsx所有测试用例。 Meaning 含义

InputStream is = ReadAndPopulateList.class.getResourceAsStream(filepath); reads the file from the JAR. 从JAR读取文件。

In fact, we typically see the debugging output from the loading the xlsx 实际上,我们通常会从加载xlsx看到调试输出

The error follows with the first internal error below that: 错误之后是第一个内部错误:

Exception in thread "main" java.lang.VerifyError: Bad type on operand stack
Exception Details:
  Location:
    com/orientechnologies/orient/core/Orient.startup()Lcom/orientechnologies/orient/core/Orient; @78: putfield
  Reason:
    Type 'com/orientechnologies/common/profiler/OProfilerStub' (current frame, stack[1]) is not assignable to 'com/orientechnologies/common/profiler/OProfiler'
  Current Frame:
    bci: @78
    flags: { }
    locals: { 'com/orientechnologies/orient/core/Orient' }
    stack: { 'com/orientechnologies/orient/core/Orient', 'com/orientechnologies/common/profiler/OProfilerStub' }
  Bytecode:
    0x0000000: 2ab4 0015 b900 3801 00b9 0039 0100 2ab4
    0x0000010: 0024 9900 152a 4c2a b400 15b9 0038 0100
    0x0000020: b900 3a01 002b b02a 123b b800 2cb6 003c
    0x0000030: b500 3d2a b400 3ec7 000f 2abb 003f 5904
    0x0000040: b700 40b5 003e 2abb 0041 59b7 0042 b500
    0x0000050: 432a bb00 4459 b700 45b5 0046 2ab4 0047
    0x0000060: c700 152a bb00 4859 b700 49b5 0047 2ab4
    0x0000070: 0047 b600 4ab8 004b b600 4c3c 2abb 004d
    0x0000080: 591b 1b06 6814 004e b200 50bb 0051 592a
    0x0000090: 1b11 01f4 68b7 0052 b700 53b5 0054 2abb
    0x00000a0: 0055 59b7 0056 b600 572a bb00 5859 b700
    0x00000b0: 59b6 0057 2a12 5ab7 005b b200 5cb6 005d
    0x00000c0: 9900 09b2 005e b800 5f2a 04b5 0024 2ab4
    0x00000d0: 001e b900 6001 004d 2cb9 0061 0100 9900
    0x00000e0: 2e2c b900 6201 00c0 0063 4e2d c600 092d
    0x00000f0: b900 6401 00a7 0014 3a04 b800 662a 1267
    0x0000100: 1904 03bd 0068 b600 69a7 ffcf 2ab7 006a
    0x0000110: 2ab4 001f b900 6001 004d 2cb9 0061 0100
    0x0000120: 9900 3d2c b900 6201 00c0 006b 4e2d c600
    0x0000130: 182d b600 6cc0 0063 3a04 1904 c600 0a19
    0x0000140: 04b9 0064 0100 a700 143a 04b8 0066 2a12
    0x0000150: 6719 0403 bd00 68b6 0069 a7ff c02a b400
    0x0000160: 15b9 0038 0100 b900 3a01 00a7 0016 3a05
    0x0000170: 2ab4 0015 b900 3801 00b9 003a 0100 1905
    0x0000180: bf2a b0                                
  Exception Handler Table:
    bci [235, 245] => handler: 248
    bci [301, 326] => handler: 329
    bci [14, 23] => handler: 366
    bci [39, 349] => handler: 366
    bci [366, 368] => handler: 366
  Stackmap Table:
    same_frame(@39)
    same_frame(@70)
    same_frame(@117)
    append_frame(@201,Integer)
    append_frame(@216,Object[#351])
    append_frame(@245,Object[#352])
    same_locals_1_stack_item_frame(@248,Object[#353])
    chop_frame(@265,1)
    chop_frame(@268,1)
    append_frame(@282,Object[#351])
    append_frame(@326,Object[#354])
    same_locals_1_stack_item_frame(@329,Object[#353])
    chop_frame(@346,1)
    chop_frame(@349,2)
    same_locals_1_stack_item_frame(@366,Object[#355])
    same_frame(@385)

    at com.orientechnologies.orient.core.serialization.serializer.record.string.ORecordSerializerStringAbstract.<clinit>(ORecordSerializerStringAbstract.java:52)
    at com.orientechnologies.orient.core.serialization.serializer.record.ORecordSerializerFactory.<init>(ORecordSerializerFactory.java:47)
    at com.orientechnologies.orient.core.serialization.serializer.record.ORecordSerializerFactory.<clinit>(ORecordSerializerFactory.java:37)
    at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.<clinit>(ODatabaseDocumentTx.java:129)
    at com.orientechnologies.orient.core.db.OPartitionedDatabasePool.initQueue(OPartitionedDatabasePool.java:386)
    at com.orientechnologies.orient.core.db.OPartitionedDatabasePool.<init>(OPartitionedDatabasePool.java:186)
    at com.tinkerpop.blueprints.impls.orient.OrientGraphFactory.setupPool(OrientGraphFactory.java:161)
    at com.company.orientdb.dataimport.DBConnectionFactory.createOrientGraphFactory(DBConnectionFactory.java:13)
    at com.company.orientdb.dataimport.CreateAgentVertex.createAgentVertex(CreateAgentVertex.java:13)
    at com.company.orientdb.dataimport.ReadAndPopulateList.createAgentResource(ReadAndPopulateList.java:172)
    at com.company.orientdb.dataimport.ReadAndPopulateList.main(ReadAndPopulateList.java:24)

com.company.orientdb.dataimport.CreateAgentVertex.createAgentVertex(CreateAgentVertex.java:13 follows: com.company.orientdb.dataimport.CreateAgentVertex.createAgentVertex(CreateAgentVertex.java:13如下:

...
import com.orientechnologies.orient.core.metadata.schema.OClass;
import com.orientechnologies.orient.core.metadata.schema.OType;
import com.tinkerpop.blueprints.impls.orient.OrientGraph;
import com.tinkerpop.blueprints.impls.orient.OrientGraphNoTx;
import com.tinkerpop.blueprints.impls.orient.OrientVertex;

public class CreateAgentVertex {
    public void createAgentVertex(List<Resource> resourceList){     
        OrientGraphNoTx graph=DBConnectionFactory.createOrientGraphFactory().getNoTx();
...
  <dependencies>
    <dependency>
      <groupId>com.tinkerpop.blueprints</groupId>
      <artifactId>blueprints-core</artifactId>
      <version>2.6.0</version>
    </dependency>
    <dependency>
      <groupId>com.googlecode.concurrentlinkedhashmap</groupId>
      <artifactId>concurrentlinkedhashmap-lru</artifactId>
      <version>1.4.2</version>
    </dependency>
    <dependency>
      <groupId>org.lucee</groupId>
      <artifactId>dom4j</artifactId>
      <version>1.6.1</version>
    </dependency>
    <dependency>
      <groupId>net.java.dev.jna</groupId>
      <artifactId>jna</artifactId>
      <version>4.2.1</version>
    </dependency>
    <dependency>
      <groupId>net.java.dev.jna</groupId>
      <artifactId>jna-platform</artifactId>
      <version>4.2.1</version>
    </dependency>
    <dependency>
      <groupId>com.orientechnologies</groupId>
      <artifactId>orient-commons</artifactId>
      <version>1.7.10</version>
    </dependency>
    <dependency>
      <groupId>com.orientechnologies</groupId>
      <artifactId>orientdb-client</artifactId>
      <version>2.1.8</version>
    </dependency>
    <dependency>
      <groupId>com.orientechnologies</groupId>
      <artifactId>orientdb-core</artifactId>
      <version>2.1.8</version>
    </dependency>
    <dependency>
      <groupId>com.orientechnologies</groupId>
      <artifactId>orientdb-enterprise</artifactId>
      <version>2.1.8</version>
    </dependency>
    <dependency>
      <groupId>com.orientechnologies</groupId>
      <artifactId>orientdb-graphdb</artifactId>
      <version>2.1.8</version>
    </dependency>
    <dependency>
      <groupId>org.apache.poi</groupId>
      <artifactId>poi</artifactId>
      <version>3.13</version>
    </dependency>
    <dependency>
      <groupId>org.apache.poi</groupId>
      <artifactId>poi-ooxml</artifactId>
      <version>3.13</version>
    </dependency>
    <dependency>
      <groupId>org.apache.poi</groupId>
      <artifactId>poi-ooxml-schemas</artifactId>
      <version>3.13</version>
    </dependency>
    <dependency>
      <groupId>org.apache.xmlbeans</groupId>
      <artifactId>xmlbeans</artifactId>
      <version>2.6.0</version>
    </dependency>
  </dependencies>

Well, 2.1.8 is quite old, we just released 2.1.20 last week and 2.2.6. 好吧,2.1.8已经很老了,上周我们发布了2.1.20,而我们发布了2.2.6。 I see a `Well, 2.1.8 is quite old, we just released 2.1.20 last week and 2.2.6. 我看到`嗯,2.1.8已经很老了,我们上周刚发布了2.1.20和2.2.6。 BTW, I see a 顺便说一句,我看到一个

<dependency>
      <groupId>com.orientechnologies</groupId>
      <artifactId>orient-commons</artifactId>
      <version>1.7.10</version>
</dependency> 

Be consistent with versions! 与版本保持一致! The best way is to define a property in the properties section of you pom and then refer to it inside dependency : 最好的方法是在pom的properties部分中定义一个属性,然后在dependency中引用该属性:

<properties>
        <orientdb.version>2.1.8</orientdb.version>
</properties>

    <dependency>
          <groupId>com.orientechnologies</groupId>
          <artifactId>orient-commons</artifactId>
          <version>${orientdb.version}</version>
    </dependency> 

Moreover, I suggest to get rid of 而且,我建议摆脱

<dependency>
      <groupId>com.tinkerpop.blueprints</groupId>
      <artifactId>blueprints-core</artifactId>
      <version>2.6.0</version>
    </dependency>
    <dependency>
      <groupId>com.googlecode.concurrentlinkedhashmap</groupId>
      <artifactId>concurrentlinkedhashmap-lru</artifactId>
      <version>1.4.2</version>
    </dependency>

because these are transitive dependencies of graph and core modules of orient. 因为这些是东方图和核心模块的传递依赖。 You can check that nothing changes with a 'mvn dependency:tree' command before and after commenting these deps. 您可以在注释这些dep之前和之后使用'mvndependency:tree'命令检查是否没有任何更改。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM