NameError:无法加载 jdbc.OracleDriver - jrubyNameError
我有一个导入 OracleDriver 的类,
require 'java'
java_import 'oracle.jdbc.OracleDriver' <= Get error here
我得到:
NameError: cannot load Java class oracle.jdbc.OracleDriver
for_name at org/jruby/javasupport/JavaClass.java:1204
get_proxy_class at org/jruby/javasupport/JavaUtilities.java:34
java_import at /home/pboob/apps/jruby-1.6.4/lib/ruby/site_ruby/shared/builtin/javasupport/core_ext/object.rb:46
这之前工作正常,但我觉得环境中有些混乱。
我调用的脚本是 jruby --1.9 ..但是从堆栈跟踪来看它似乎正在拾取 jruby-1.6.4 ?
我有什么想法应该如何调试这个以及发生了什么?
I have a class that imports OracleDriver
require 'java'
java_import 'oracle.jdbc.OracleDriver' <= Get error here
I am getting :
NameError: cannot load Java class oracle.jdbc.OracleDriver
for_name at org/jruby/javasupport/JavaClass.java:1204
get_proxy_class at org/jruby/javasupport/JavaUtilities.java:34
java_import at /home/pboob/apps/jruby-1.6.4/lib/ruby/site_ruby/shared/builtin/javasupport/core_ext/object.rb:46
This was working fine before but I thing something messed up in the env.
The was I am invoking the script is jruby --1.9 .. but from the stack trace it seems like it is picking up jruby-1.6.4 ?
Any ideas how I should debug this and what is happening ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我将ojdbc14.jar复制到jruby中的lib后问题得到解决。
The problem got resolved after I copied ojdbc14.jar to lib in jruby.