« Return to Thread: Forward: From Rich Manalang on Oracle w/ JNDI configuration question

Re: Forward: From Rich Manalang on Oracle w/ JNDI configuration question

by Chris Evans-8 :: Rate this Message:

Reply to Author | View in Thread

Our primary db is DB2 and I'm pretty pumped about JRuby so I'd be
willing to help out as much as I can.   I might need some hand holding
at first to get started.

Chris


On Feb 7, 2008 9:49 PM, Nick Sieger <nicksieger@...> wrote:

> The other recent thread has a similar NPE error, but the configuration
> is quite different. My recommendation to Rich would be the same -- add
> a debug line to try to see what the connection error is.
>
> We could really use some community members to step up and help support
> Oracle and DB2, because Ola and I don't have much access to those
> systems.
>
> Even just setting up continuous integration, so we could get feedback
> when something breaks on the proprietary databases would be great.
>
> /Nick
>
>
> On Feb 7, 2008 3:18 PM, Thomas E Enebo <tom.enebo@...> wrote:
> > We are having an issue with subscribing to our mailing lists (which I
> > have reported).  Here is an email from Rich:
> >
> > Has anyone had any success with using jndi connection pools using
> > JRuby 1.1RC1/activerecord-jdbc-0.7.1 on Oracle?  I followed the
> > instructions on the JRuby wiki
> > (http://wiki.jruby.org/wiki/Goldspike#Using_a_connection_from_a_pool_via_JNDI)
> > and when that didn't work, I tried several variations.
> >
> >
> > Here's how I currently have this configured:
> >
> > database.yml:
> >
> > development:
> >   adapter: jdbc
> >    jndi: java:comp/env/jdbc/mydb
> >   driver: oracle.jdbc.driver.OracleDriver
> >
> > I've also tried this:
> >
> > development:
> >    adapter: jdbc
> >    jndi: jdbc/mydb
> >    driver: oracle.jdbc.driver.OracleDriver
> >
> > I get an exception with these two configurations -> jdbc_adapter.rb
> > (line 303) throws "Failed to load Rails: The driver encountered an
> > error: java.lang.NullPointerException: null"
> >
> > I've also tried this (this is how it's specified on the JRuby wiki...
> > I get a "can't find oracle driver" exception with this):
> >
> > development:
> >    adapter: jdbc
> >    jndi: java:comp/env/jdbc/mydb
> >    driver: oracle.jdbc.driver.OracleDriver
> >
> > I've also tried excluding the driver attribute, but get this exception:
> >
> > "Failed to load Rails: The driver encountered an error: can't convert
> > nil into String" -- jdbc_adapter.rb (line 303)
> >
> > My web.xml has the following in it:
> >
> > ...
> >     <resource-ref>
> >       <res-ref-name>jdbc/mydb</res-ref-name>
> >       <res-type>javax.sql.DataSource</res-type>
> >       <res-auth>Container</res-auth>
> >      </resource-ref>
> > ...
> >
> > And... I've configured my container (Oracle app server, aka, OC4J
> > 10.3) with the requisite data source and connection pool
> > configurations and tested that I can connect to them.
> >
> > One thing I'm not clear on is why the driver has to be specified in
> > the database.yml if it's a jndi resource.  I'm going to try this on
> > Jetty to see if it's a container issue, but if anyone out there know's
> > what I'm doing wrong, please let me know.
> >
> > Thanks.
> >
> > Rich Manalang
> > https://mix.oracle.com
> >
> >
> > --
> > Blog: http://www.bloglines.com/blog/ThomasEEnebo
> > Email: enebo@... , tom.enebo@...
> >
> > ---------------------------------------------------------------------
> > To unsubscribe from this list, please visit:
> >
> >     http://xircles.codehaus.org/manage_email
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


 « Return to Thread: Forward: From Rich Manalang on Oracle w/ JNDI configuration question