Oracle DBI problem

W

Wirianto Djunaidi

--------------030000080802030701060501
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

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

--------------030000080802030701060501
Content-Type: text/x-vcard; charset=utf-8;
name="wirianto.djunaidi.vcf"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="wirianto.djunaidi.vcf"

begin:vcard
fn:Wirianto Djunaidi
n:Djunaidi;Wirianto
org:pT Mitrais;Java Stream
adr:;;Jl. Kediri No 38;Kuta;BALI;80361;INDONESIA
email;internet:[email protected]
title:Senior Software Engineer
tel;work:+62 361 755025
tel;fax:+62 361 755024
x-mozilla-html:FALSE
url:http://www.mitrais.com
version:2.1
end:vcard


--------------030000080802030701060501--
 
C

Curt Hibbs

Robert said:
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 said:
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
 
W

Wirianto Djunaidi

--------------000803070403020609070109
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

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

-Wir

Curt said:
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



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

--------------000803070403020609070109
Content-Type: text/x-vcard; charset=utf-8;
name="wirianto.djunaidi.vcf"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="wirianto.djunaidi.vcf"

begin:vcard
fn:Wirianto Djunaidi
n:Djunaidi;Wirianto
org:pT Mitrais;Java Stream
adr:;;Jl. Kediri No 38;Kuta;BALI;80361;INDONESIA
email;internet:[email protected]
title:Senior Software Engineer
tel;work:+62 361 755025
tel;fax:+62 361 755024
x-mozilla-html:FALSE
url:http://www.mitrais.com
version:2.1
end:vcard


--------------000803070403020609070109--
 
Z

Zach Dennis

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
 
Z

Zach Dennis

Zach said:
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
 
Z

Zach Dennis

daz said:
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 ;)

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
 
D

daz

Zach said:
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 ;-)
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."
http://httpd.apache.org/apreq/



:daz
 
Z

Zach Dennis

daz said:
Zach Dennis wrote:



Yeah. It'll be easier tomorrow, though ;-)




'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."
http://httpd.apache.org/apreq/
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.... ;)

Thanks for everything tonight daz.

Zach
 
P

Peter C. Verhage

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

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
 
M

Michael Granger

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.... ;)

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,204
Latest member
LaverneRua

Latest Threads

Top