0

尝试使用 OETL 将数据从 oracle 数据库导入 OrientDB 图。

我注意到在jdbc-drivers.jsonoracle 驱动程序的 URL 上不起作用

{
  "Oracle": {
    "className": "oracle.jdbc.driver.OracleDriver",
     ## "className": "oracle.jdbc.driver.OracleDriver",
    "url": "http://svn.ets.berkeley.edu/nexus/content/repositories/myberkeley/com/oracle/ojdbc7/12.1.0.1/ojdbc7-12.1.0.1.jar",
    "version": "7-12.1.0.1",
    "format": [
      "jdbc:oracle:thin:@<HOST>:<PORT>:<SID>"
    ]
  },

所以我用两者都替换它

"url": "https://github.com/MHTaleb/ojdbc7/raw/master/ojdbc7.jar",

并且还与

"url": "C:\Users\sviu\Desktop\orientdb-3.0.26\ojdbc7.jar",

我正在使用以下配置

{
  "config": {
    "log": "error"
  },
  "extractor" : {
    "jdbc": { 
              "driver": "oracle.jdbc.OracleDriver",
              ## "driver": "oracle.jdbc.driver.OracleDriver",
              "url": "jdbc:oracle:thin:@URL:1521:SID",
              "userName": "DB_OWNER",
              "userPassword": "DBPWD",
              "query": "select * from LOT" }
  },
  "transformers" : [
   { "vertex": { "class": "Lot"} }
  ],
  "loader" : {
    "orientdb": {
      "dbURL": "plocal:../databases/LDS",
      "dbUser": "admin",
      "dbPassword": "admin",
      "dbAutoCreate": true,
    "dbType": "graph"
    }
  }
}

jdbc-drivers.json在和中尝试了驱动程序名称和类名更改组合lots.json

总是找不到驱动程序。

C:\Users\sviu\Desktop\orientdb-3.0.26\bin>oetl.bat lots.json
OrientDB etl v.3.0.26 - Veloce (build 39bd95d70410374ab1cf6770ef2feca26145b04f, branch 3.0.x) https://www.orientdb.com
Exception in thread "main" com.orientechnologies.orient.core.exception.OConfigurationException: Error on creating ETL processor
        at com.orientechnologies.orient.etl.OETLProcessorConfigurator.parse(OETLProcessorConfigurator.java:153)
        at com.orientechnologies.orient.etl.OETLProcessorConfigurator.parseConfigAndParameters(OETLProcessorConfigurator.java:92)
        at com.orientechnologies.orient.etl.OETLProcessor.main(OETLProcessor.java:116)
Caused by: com.orientechnologies.orient.core.exception.OConfigurationException: [JDBC extractor] JDBC Driver oracle.jdbc.OracleDriver not found
        at com.orientechnologies.orient.etl.extractor.OETLJDBCExtractor.configure(OETLJDBCExtractor.java:69)
        at com.orientechnologies.orient.etl.OETLProcessorConfigurator.configureComponent(OETLProcessorConfigurator.java:158)
        at com.orientechnologies.orient.etl.OETLProcessorConfigurator.configureExtractor(OETLProcessorConfigurator.java:216)
        at com.orientechnologies.orient.etl.OETLProcessorConfigurator.parse(OETLProcessorConfigurator.java:115)
        ... 2 more
Caused by: java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at com.orientechnologies.orient.etl.extractor.OETLJDBCExtractor.configure(OETLJDBCExtractor.java:67)
    ... 5 more

任何见解将不胜感激。

BR

4

0 回答 0