在ActiveRecord中使用OrientDB的JDBC驱动程序的正确方法是什么?在ActiveRecord中使用OrientDB的JDBC驱动程序
我想连接到OrientDB 1.4的Rails 3.2应用程序。我安装宝石activerecord-jdbc-adapter
,并配置了database.yml
如下:
development:
adapter: jdbc
username: admin
password: admin
driver: com.orientechnologies.orient.jdbc.OrientJdbcDriver
url: jdbc:orient:local:db/test_db2
我加载OrientDB的JDBC驱动如下:
# in config/application.rb:
require '/home/myuser/jars/orientdb-jdbc-1.4.0-all.jar'
应用程序启动时(使用rails s
)以下异常被抛出:
java.lang.NullPointerException
at arjdbc.jdbc.RubyJdbcConnection.unmarshalResult(RubyJdbcConnection.java:1187)
at arjdbc.jdbc.RubyJdbcConnection.set_native_database_types(RubyJdbcConnection.java:537)
at arjdbc.jdbc.RubyJdbcConnection$INVOKER$i$0$0$set_native_database_types.call(RubyJdbcConnection$INVOKER$i$0$0$set_native_database_types.gen)
...
在我的配置中是否缺少某些东西?使用ActiveRecord使用OrientDB的JDBC驱动程序的正确方法是什么?
您是否成功实施此实施?你能推荐一种解决方案吗?谢谢... – Xdrone