Forum: JRuby how to include ojdbc14.jar in my war file.

B0f6d8efcf671ea3163449e231264cc4?d=identicon&s=25 Msan Msan (msan)
on 2011-05-25 11:36
(Received via mailing list)
To connect to oracle database I've put ojbdc.jar unde JRUBY_HOME/lib.
Under development it works.
Now I've run warble to create my war file, I've deployed under tomcat6
but connectino to oracle doesn't work.
Where I have put ojdbc.jar file?
879729f95e12e753e282966d982cc8b6?d=identicon&s=25 Damian Steer (Guest)
on 2011-05-25 11:42
(Received via mailing list)
On 25/05/11 10:36, Mauro wrote:
> To connect to oracle database I've put ojbdc.jar unde JRUBY_HOME/lib.
> Under development it works.
> Now I've run warble to create my war file, I've deployed under tomcat6
> but connectino to oracle doesn't work.
> Where I have put ojdbc.jar file?

I put it in MY_RAILS_APP/lib. Works fine.

Damian
B0f6d8efcf671ea3163449e231264cc4?d=identicon&s=25 Msan Msan (msan)
on 2011-05-25 11:46
(Received via mailing list)
On 25 May 2011 09:41, Damian Steer <pldms@mac.com> wrote:
> On 25/05/11 10:36, Mauro wrote:
>> To connect to oracle database I've put ojbdc.jar unde JRUBY_HOME/lib.
>> Under development it works.
>> Now I've run warble to create my war file, I've deployed under tomcat6
>> but connectino to oracle doesn't work.
>> Where I have put ojdbc.jar file?
>
> I put it in MY_RAILS_APP/lib. Works fine.
>

I have various rails app that use the same drivers: ojdbc and postgres.
There a way to share these files between all rails app?
With my java apps I put the jars under tomcat/lib but it seems that
with rails it doesn't work.
2b4ffae0951fad82998610eb34b14272?d=identicon&s=25 "Reto Schüttel" <reto@schuettel.ch> (Guest)
on 2011-05-25 11:56
(Received via mailing list)
Am 25.05.2011 um 11:36 schrieb Mauro:

> To connect to oracle database I've put ojbdc.jar unde JRUBY_HOME/lib.
> Under development it works.
> Now I've run warble to create my war file, I've deployed under tomcat6
> but connectino to oracle doesn't work.
> Where I have put ojdbc.jar file?


Hi Mauro

If you like you can add the jar to tomcat's lib folder (or whatever
server you use). If you use maven you should set the scope to provided
to let it know that it doesn't have to be package into the war. I
personally prefer the option where I can use a vanilla tomcat, so I
package it as well.

Cheers
Reto Schttel
B0f6d8efcf671ea3163449e231264cc4?d=identicon&s=25 Msan Msan (msan)
on 2011-05-25 12:19
(Received via mailing list)
2011/5/25 Reto Schüttel <reto@schuettel.ch>:
>
> If you like you can add the jar to tomcat's lib folder

Are you talking about ojdbc.jar?
2b4ffae0951fad82998610eb34b14272?d=identicon&s=25 "Reto Schüttel" <reto@schuettel.ch> (Guest)
on 2011-05-25 14:30
(Received via mailing list)
Am 25.05.2011 um 12:19 schrieb Mauro:
>> If you like you can add the jar to tomcat's lib folder
>
> Are you talking about ojdbc.jar?

Yes i do. All jars in tomcat's lib folder can be imported by any
application in the container.

Cheers,
Reto
B0f6d8efcf671ea3163449e231264cc4?d=identicon&s=25 Msan Msan (msan)
on 2011-05-27 10:34
(Received via mailing list)
2011/5/25 Reto Schüttel <reto@schuettel.ch>:
> Am 25.05.2011 um 12:19 schrieb Mauro:
>>> If you like you can add the jar to tomcat's lib folder
>>
>> Are you talking about ojdbc.jar?
>
> Yes i do. All jars in tomcat's lib folder can be imported by any application in
the container.

I've tried but it doesn't work.
I've delete ojdbc14.jar from my rails app lib directory and put under
tomcat/lib.
Oracle connection doesn't work.
Then I've deleted ojdbc14.jar from tomcat/lib and put it under my
rails lib directory and it works.
A52b0e1c5d982f2512a03c5dbfd033d6?d=identicon&s=25 Dick Davies (Guest)
on 2011-05-27 20:59
(Received via mailing list)
What version of Tomcat?
B0f6d8efcf671ea3163449e231264cc4?d=identicon&s=25 Msan Msan (msan)
on 2011-05-27 21:28
(Received via mailing list)
On 27 May 2011 18:58, Dick Davies <rasputnik@gmail.com> wrote:
> What version of Tomcat?

Tomcat6 with linux debian.
I use also grails and grails sees the jars that I put under tomcat lib
directory while rails seems not.
B0f6d8efcf671ea3163449e231264cc4?d=identicon&s=25 Msan Msan (msan)
on 2011-05-28 23:56
(Received via mailing list)
On 27 May 2011 19:27, Mauro <mrsanna1@gmail.com> wrote:
> On 27 May 2011 18:58, Dick Davies <rasputnik@gmail.com> wrote:
>> What version of Tomcat?
>
> Tomcat6 with linux debian.
> I use also grails and grails sees the jars that I put under tomcat lib
> directory while rails seems not.

I've do that:
put ojdbc14.jar under Rails.root/lib, then I run bundle exec warble to
create the war file, deploy under tomcat and all is ok.
After I delete ojdbc14.jar from Rails.root/lib, run bundle exec warble
and deploy under tomcat.
Then I put ojdbc14.jar under tomcat/lib, but the oracle connection
doesn't work.
Am I doing something wrong?
2c0c4cf3ccc8da22f7c3b9586ce1cd70?d=identicon&s=25 Christian MICHON (Guest)
on 2011-05-29 00:02
(Received via mailing list)
On Sat, May 28, 2011 at 11:53 PM, Mauro <mrsanna1@gmail.com> wrote:
> create the war file, deploy under tomcat and all is ok.
>
>

I'm not familiar with oracle db, having used it once outside of
rails/jruby dev.

But I believe in the tomcat logs, you should find why the connection
seems not to work.

--
Christian
B0f6d8efcf671ea3163449e231264cc4?d=identicon&s=25 Msan Msan (msan)
on 2011-05-29 00:04
(Received via mailing list)
On 28 May 2011 22:01, Christian MICHON <christian.michon@gmail.com>
wrote:
>> put ojdbc14.jar under Rails.root/lib, then I run bundle exec warble to
>>
>>
>>
>
> I'm not familiar with oracle db, having used it once outside of rails/jruby dev.
>
> But I believe in the tomcat logs, you should find why the connection
> seems not to work.
>
Now I'm not in my production server and I can't view tomcat logs, but
I know that the connection works if I leave ojdbc14.jar under
Rails.root/lib
2c0c4cf3ccc8da22f7c3b9586ce1cd70?d=identicon&s=25 Christian MICHON (Guest)
on 2011-05-29 00:07
(Received via mailing list)
On Sun, May 29, 2011 at 12:03 AM, Mauro <mrsanna1@gmail.com> wrote:
>>> I've do that:
>>>  http://xircles.codehaus.org/manage_email
> I know that the connection works if I leave ojdbc14.jar under
> Rails.root/lib
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>  http://xircles.codehaus.org/manage_email
>
>
>

maybe you could setup tomcat with a jndi, pointing to the oracle db
through ojdbc14.jar

I haven't done that myself yet with H2, but you can easily find
pointers on how to change your database.yml once the jdbi is set up
properly.

--
Christian
F472b397918df02e70d8d7d0cf086c00?d=identicon&s=25 Dick Davies (Guest)
on 2011-05-29 00:14
(Received via mailing list)
That's the right place on Tomcat 6, those classes should be available to
tomcat (if you want to configure a connection pool at that level) and
all webapps
(if you just want straight JDBC connections).

You need to check logs to get any further I think.
This topic is locked and can not be replied to.