简体   繁体   中英

OrientDB ETL - IllegalAccessError exception

I'm not able to make the ETL importer work.

the config file i'm using is the following

{
  "config": {
    "log": "debug"
  },
  "begin": [],
  "source": {
    "file": {
      "path": "/mnt/shares/Sites/store.csv"      
    }
  },
  "extractor": {
    "csv" : {
      "ignoreEmptyLines": true
    }
  },
  "transformers": [
    {
      "vertex": { 
        "class": "Store" ,
        "skipDuplicates": true
      }
    }
  ],
  "loader": {
    "orientdb": {
      "dbURL": "plocal:/usr/local/src/orientdb-community-2.2.6/databases/my_database_name",
      "dbUser": "myuser",
      "dbPassword": "mypass",
      "dbAutoCreate": false,
      "tx": false,
      "batchCommit": 1000,
      "wal" : false
    }
  },
  "end": []
}

and the error i'm getting is:

Exception in thread "main" java.lang.IllegalAccessError: tried to access method com.orientechnologies.common.exception.OException.(Ljava/lang/String;Ljava/lang/Throwable;)V from class com.orientechnologies.orient.etl.OETLProcessor at com.orientechnologies.orient.etl.OETLProcessor.parseConfigAndParameters(OETLProcessor.java:136) at com.orientechnologies.orient.etl.OETLProcessor.main(OETLProcessor.java:113)

i even have the same error if i put the config file just with the "config" entry alone ...

anyone have some ideas on the topic?

UPDATE: the error seems to be thrown in OETLProcessor.java at the following line:

        final OTransformer tr = factory.getTransformer(name);

I tried to import this csv

storeid,name
1,store1
2,store2
3,store3

with this json

    {
      "config": {
        "log": "debug"
      },
      "begin": [],
      "source": {
        "file": {
          "path": "myPath/Store.csv"      
        }
      },
      "extractor": {
        "csv" : {
            "separator": ",",
            "ignoreEmptyLines": true
        }
      },
      "transformers": [
        {
          "vertex": { 
            "class": "Store" ,
            "skipDuplicates": true
          }
        }
      ],
      "loader": {
        "orientdb": {
          "dbURL": "plocal:myPath/Store",
          "dbUser": "admin",
          "dbPassword": "admin",
          "dbAutoCreate": false,
          "tx": false,
          "batchCommit": 1000,
          "wal" : false
        }
      },
      "end": []
    }

and it worked for me.

在这里输入代码

Hope it helps.

after retrying i found the problem: for some reason i had 2 different .jar version, and obviously the one used was the wrong one. i had - ORIENTDB_HOME/LIB/orientdb-etl-2.1.3.jar - ORIENTDB_HOME/LIB/orientdb-etl-2.2.6.jar

i just renamed the 2.1.3 one in orientdb-etl-2.1.3.jarUNUSED

and things started to work.

The next problem was that i couldn't access using the root account (there is a clear described motive on a github issue, but i'm not able to find it again...), so i created a new admin account and used that instead.

So in the end it worked.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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