Oracle DBI problem

Hi,

I am using one-click installer 1.8.1, and trying to use DBI connecting to Oracle 9i.
And I got connection problem with it and wondering if anyone can help. Couldn't
find any info on google that solve my problem.

Here are the error message: ORA-06401: NETCMN: invalid driver designator

Using this simple ruby script:
#! /usr/bin/env ruby

require "dbi"

begin
    dbh = DBI.connect("dbi:Oracle:kms:172.19.12.143", "kmsproduct", "kmsproduct"
)
rescue DBI::DatabaseError => e
    puts "An error occured"
    puts "Error code: #{e.err}"
    puts "Error messagE: #{e.errstr}"
ensure
    dbh.disconnect if dbh
end

$ ruby --version
ruby 1.8.1 (2003-12-25) [i386-mswin32]

Thanks in advance

DBI is probably compiled with an 8i driver:
http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.htm#30_09

    robert

"Wirianto Djunaidi" <wirianto.djunaidi@mitrais.com> schrieb im Newsbeitrag
news:4141717E.4000402@mitrais.com...

···

Hi,

I am using one-click installer 1.8.1, and trying to use DBI connecting
to Oracle 9i.
And I got connection problem with it and wondering if anyone can help.
Couldn't
find any info on google that solve my problem.

Here are the error message: ORA-06401: NETCMN: invalid driver designator

Using this simple ruby script:
#! /usr/bin/env ruby

require "dbi"

begin
    dbh = DBI.connect("dbi:Oracle:kms:172.19.12.143", "kmsproduct",
"kmsproduct"
)
rescue DBI::DatabaseError => e
    puts "An error occured"
    puts "Error code: #{e.err}"
    puts "Error messagE: #{e.errstr}"
ensure
    dbh.disconnect if dbh
end

$ ruby --version
ruby 1.8.1 (2003-12-25) [i386-mswin32]

Thanks in advance

Robert Klemme wrote:

DBI is probably compiled with an 8i driver:
http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_f
aq.htm#30_09

    robert

I can confirm that it *was* compiled with with oracle 8.1.

Curt

···

"Wirianto Djunaidi" <wirianto.djunaidi@mitrais.com> schrieb im Newsbeitrag
news:4141717E.4000402@mitrais.com...
> Hi,
>
> I am using one-click installer 1.8.1, and trying to use DBI connecting
> to Oracle 9i.
> And I got connection problem with it and wondering if anyone can help.
> Couldn't
> find any info on google that solve my problem.
>
> Here are the error message: ORA-06401: NETCMN: invalid driver designator
>
> Using this simple ruby script:
> #! /usr/bin/env ruby
>
> require "dbi"
>
> begin
> dbh = DBI.connectdbiOraclekms172.19.12.143,kmsproduct,
> "kmsproduct"
> )
> rescue DBI::DatabaseError => e
> puts "An error occured"
> puts "Error code: #{e.err}"
> puts "Error messagE: #{e.errstr}"
> ensure
> dbh.disconnect if dbh
> end
>
> $ ruby --version
> ruby 1.8.1 (2003-12-25) [i386-mswin32]
>
> Thanks in advance
>

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.757 / Virus Database: 507 - Release Date: 9/9/2004

Thanks, I'll see if I can compile it with 9i driver..unless of course somebody else has done it :slight_smile:

-Wir

Curt Hibbs wrote:

···

Robert Klemme wrote:

DBI is probably compiled with an 8i driver:
http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_f
aq.htm#30_09

   robert
   
I can confirm that it *was* compiled with with oracle 8.1.

Curt

"Wirianto Djunaidi" <wirianto.djunaidi@mitrais.com> schrieb im Newsbeitrag
news:4141717E.4000402@mitrais.com...
   

Hi,

I am using one-click installer 1.8.1, and trying to use DBI connecting
to Oracle 9i.
And I got connection problem with it and wondering if anyone can help.
Couldn't
find any info on google that solve my problem.

Here are the error message: ORA-06401: NETCMN: invalid driver designator

Using this simple ruby script:
#! /usr/bin/env ruby

require "dbi"

begin
   dbh = DBI.connectdbiOraclekms172.19.12.143,kmsproduct,
"kmsproduct"
)
rescue DBI::DatabaseError => e
   puts "An error occured"
   puts "Error code: #{e.err}"
   puts "Error messagE: #{e.errstr}"
ensure
   dbh.disconnect if dbh
end

$ ruby --version
ruby 1.8.1 (2003-12-25) [i386-mswin32]

Thanks in advance

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.757 / Virus Database: 507 - Release Date: 9/9/2004

I now have Ruby 1.8.1 preview2, modruby1.2.2 and Arrow 0.1.0. However whenever I restart Apache it says in the log:

mod_ruby: failed to require arrow
mod_ruby: error in ruby
mod_ruby: /etc/arrow/lib/arrow/template/parser.rb:22:in 'require': No such file to load -- strscan (LoadError)

etc...etc...etc...

My configuration for Arrow reads:

<IfModule mod_ruby.c>
   RubyAddPath /etc/arrow/lib
    RubyRequire arrow
    <Location /ruby>
       SetHandler ruby-object
       RubyHandler "Arrow::Dispatcher::instance( '/etc/arrow/demo.cfg' )"
    </Location>
</IfModule>

Any ideas?

Zach

Wirianto Djunaidi wrote:

Thanks, I'll see if I can compile it with 9i driver..unless of course somebody else has done it :slight_smile:

I'm interested in a compiled 9i version too. So if you get it compiled could you put it somewhere on the web?

Thanks,

Peter

Zach Dennis wrote:

I now have Ruby 1.8.1 preview2, modruby1.2.2 and Arrow 0.1.0. However whenever I restart Apache it says in the log:

mod_ruby: failed to require arrow
mod_ruby: error in ruby
mod_ruby: /etc/arrow/lib/arrow/template/parser.rb:22:in 'require': No such file to load -- strscan (LoadError)

etc...etc...etc...

My configuration for Arrow reads:

<IfModule mod_ruby.c>
  RubyAddPath /etc/arrow/lib
   RubyRequire arrow
   <Location /ruby>
      SetHandler ruby-object
      RubyHandler "Arrow::Dispatcher::instance( '/etc/arrow/demo.cfg' )"
   </Location>
</IfModule>

Ok...I got rid of the errors. I am running a Debian 3.0.2 woody box. So far I have had to:

- download ruby source and custom compile. The debian ruby package didn't come with strscan.
- download modruby source and custom compile. This got rid of Apache errors

Zach

Zach Dennis wrote:

[...]
mod_ruby: /etc/arrow/lib/arrow/template/parser.rb:22:in 'require': No
such file to load -- strscan (LoadError)

Quoting from http://dev.rubycrafters.com/arrow-manual/install.html ...
(again :wink:

Ruby Library Dependencies

"Here also are some standard libraries that are used but may not be
  included with your ruby distribution (debian, for instance)."

   strscan (0.6.7)
   http://raa.ruby-lang.org/list.rhtml?name=strscan

:daz

Did anyone do this? Is there a Oracle 9.0.2 Client version of oci
connection for Ruby?

Please let me know...

daz wrote:

Zach Dennis wrote:

[...]
mod_ruby: /etc/arrow/lib/arrow/template/parser.rb:22:in 'require': No
such file to load -- strscan (LoadError)

Quoting from http://dev.rubycrafters.com/arrow-manual/install.html ...
(again :wink:

Ruby Library Dependencies

"Here also are some standard libraries that are used but may not be
included with your ruby distribution (debian, for instance)."

  strscan (0.6.7)
  http://raa.ruby-lang.org/list.rhtml?name=strscan

I think I am going to tell myself to RTFM....(if it helps I'm really tired but I want to get through the base install of Arrow before I go to bed and my patience is thin...long day)

But i havea nother problem and I swear this one isn't in the manual!

[Sat Sep 11 01:01:10 2004] [notice] Apache/1.3.31 (Debian GNU/Linux) mod_ruby/1.2.2 Ruby/1.8.2(2004-07-29) configured -- resuming normal operations
[Sat Sep 11 01:01:10 2004] [notice] Accept mutex: sysvsem (Default: sysvsem)
[Sat Sep 11 01:01:16 2004] [notice] (global) : Arrow config file is "/etc/arrow/demo.cfg"
[Sat Sep 11 01:01:16 2004] [error] Arrow::Dispatcher : RuntimeError while creating dispatcher: mod_ruby is not compiled with libapreq\n/usr/local/lib/ruby/site_ruby/1.8/arrow/dispatcher.rb:156:in `initialize'\n\t/usr/local/lib/ruby/site_ruby/1.8/arrow/dispatcher.rb:56:in `new'\n\t/usr/local/lib/ruby/site_ruby/1.8/arrow/dispatcher.rb:56:in `new'\n\t/usr/local/lib/ruby/site_ruby/1.8/arrow/dispatcher.rb:117:in `create'\n\t/usr/local/lib/ruby/site_ruby/1.8/arrow/dispatcher.rb:91:in `each'\n\t/usr/local/lib/ruby/site_ruby/1.8/arrow/dispatcher.rb:91:in `create'\n\t/usr/local/lib/ruby/site_ruby/1.8/arrow/dispatcher.rb:138:in `instance'\n\t(eval):0
[Sat Sep 11 01:01:16 2004] [crit] RuntimeError while creating dispatcher: mod_ruby is not compiled with libapreq\n/usr/local/lib/ruby/site_ruby/1.8/arrow/dispatcher.rb:156:in `initialize'\n\t/usr/local/lib/ruby/site_ruby/1.8/arrow/dispatcher.rb:56:in `new'\n\t/usr/local/lib/ruby/site_ruby/1.8/arrow/dispatcher.rb:56:in `new'\n\t/usr/local/lib/ruby/site_ruby/1.8/arrow/dispatcher.rb:117:in `create'\n\t/usr/local/lib/ruby/site_ruby/1.8/arrow/dispatcher.rb:91:in `each'\n\t/usr/local/lib/ruby/site_ruby/1.8/arrow/dispatcher.rb:91:in `create'\n\t/usr/local/lib/ruby/site_ruby/1.8/arrow/dispatcher.rb:138:in `instance'\n\t(eval):0
[Sat Sep 11 01:01:16 2004] [error] Arrow::Dispatcher : Fatal: No broker.
[Sat Sep 11 01:01:18 2004] [notice] (global) : Arrow config file is "/etc/arrow/demo.cfg"
[Sat Sep 11 01:01:18 2004] [error] Arrow::Dispatcher : RuntimeError while creating dispatcher: mod_ruby is not compiled with libapreq\n/usr/local/lib/ruby/site_ruby/1.8/arrow/dispatcher.rb:156:in `initialize'\n\t/usr/local/lib/ruby/site_ruby/1.8/arrow/dispatcher.rb:56:in `new'\n\t/usr/local/lib/ruby/site_ruby/1.8/arrow/dispatcher.rb:56:in `new'\n\t/usr/local/lib/ruby/site_ruby/1.8/arrow/dispatcher.rb:117:in `create'\n\t/usr/local/lib/ruby/site_ruby/1.8/arrow/dispatcher.rb:91:in `each'\n\t/usr/local/lib/ruby/site_ruby/1.8/arrow/dispatcher.rb:91:in `create'\n\t/usr/local/lib/ruby/site_ruby/1.8/arrow/dispatcher.rb:138:in `instance'\n\t(eval):0
[Sat Sep 11 01:01:18 2004] [crit] RuntimeError while creating dispatcher: mod_ruby is not compiled with libapreq\n/usr/local/lib/ruby/site_ruby/1.8/arrow/dispatcher.rb:156:in `initialize'\n\t/usr/local/lib/ruby/site_ruby/1.8/arrow/dispatcher.rb:56:in `new'\n\t/usr/local/lib/ruby/site_ruby/1.8/arrow/dispatcher.rb:56:in `new'\n\t/usr/local/lib/ruby/site_ruby/1.8/arrow/dispatcher.rb:117:in `create'\n\t/usr/local/lib/ruby/site_ruby/1.8/arrow/dispatcher.rb:91:in `each'\n\t/usr/local/lib/ruby/site_ruby/1.8/arrow/dispatcher.rb:91:in `create'\n\t/usr/local/lib/ruby/site_ruby/1.8/arrow/dispatcher.rb:138:in `instance'\n\t(eval):0
[Sat Sep 11 01:01:18 2004] [error] Arrow::Dispatcher : Fatal: No broker.
sapen:~#

mod_ruby is not compiled with libapreq ? eh?

Thanks,

Zach

Zach Dennis wrote:

I think I am going to tell myself to RTFM....(if it helps I'm really
tired but I want to get through the base install of Arrow before I go to
bed and my patience is thin...long day)

Yeah. It'll be easier tomorrow, though :wink:

But i havea nother problem and I swear this one isn't in the manual!

'Tis ...

The Generic Apache Request Library (libapreq)

"Arrow requires the libapreq extensions to mod_ruby,
  which in turn requires that you install the Generic
  Apache Request Library, or libapreq."
  Apache HTTP Request Library - The Apache HTTP Server Project

:daz

daz wrote:

Zach Dennis wrote:

I think I am going to tell myself to RTFM....(if it helps I'm really
tired but I want to get through the base install of Arrow before I go to
bed and my patience is thin...long day)

Yeah. It'll be easier tomorrow, though :wink:

But i havea nother problem and I swear this one isn't in the manual!

'Tis ...

The Generic Apache Request Library (libapreq)

"Arrow requires the libapreq extensions to mod_ruby,
which in turn requires that you install the Generic
Apache Request Library, or libapreq."
Apache HTTP Request Library - The Apache HTTP Server Project

Maybe I should just go to bed....I think I will.....because I can't find where it says how-to compile libapreq for use with mod_ruby and the libapreq for apache 1.3 download only gives instructions to compile and install with mod_perl.....and I dont want to install mod_perl unless i have to. Any ideas on this one?

Also on line 44 of the install.rb file in the Test-Unit-Mock-0.0.3 directory....there is a complaint from ruby. It has to do with comparison of strings against regexp....in case the Arrow guys want to check this out.....I am running ruby 1.8.2 now.... :wink:

Thanks for everything tonight daz.

Zach

Maybe I should just go to bed....I think I will.....because I can't find where it says how-to compile libapreq for use with mod_ruby and the libapreq for apache 1.3 download only gives instructions to compile and install with mod_perl.....and I dont want to install mod_perl unless i have to. Any ideas on this one?

I'm not sure about platforms other than MacOS X, Linux, and FreeBSD (as those are the only machines I use), but on all three of those installing libapreq was just a matter of following the instructions at the bottom of INSTALL:

   Alternatively, to build and install a shared version
   of libapreq using GNU libtool, do this:

    ./configure --with-apache-includes=DIR && make && make install

Also on line 44 of the install.rb file in the Test-Unit-Mock-0.0.3 directory....there is a complaint from ruby. It has to do with comparison of strings against regexp....in case the Arrow guys want to check this out.....I am running ruby 1.8.2 now.... :wink:

It's been fixed in the development version of Test::Unit::Mock, but since it's just a warning, I haven't packaged up a release for it. It should install fine despite the warning; please do let me know if such is not the case.

···

On Sep 10, 2004, at 10:47 PM, Zach Dennis wrote:

--
Michael Granger <ged@FaerieMUD.org>
Rubymage, Believer, Architect
The FaerieMUD Consortium <http://www.FaerieMUD.org/&gt;
12383406064495388618631689469409153107.to_s(36).tr('z',' ')