Issue Details (XML | Word | Printable)

Key: JRUBY-3515
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Arun Gupta
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
JRuby

JNDI context using ActiveRecord JDBC Adapter

Created: 20/Mar/09 11:50 AM   Updated: 25/Aug/09 11:32 AM
Return to search
Component/s: None
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified


 Description  « Hide

Deployed an WAR-based application on GlassFish v2.1 using JRuby 1.2.0 + Rails 2.3.2 + ActiveRecord JDBC Adapter 0.9.1 and production segment as:

production:
adapter: jdbcmysql
encoding: utf8
reconnect: false
database: runner_production
pool: 5
username: duke
password: glassfish
socket: /tmp/mysql.sock
jndi: jdbc/runner_production
driver: com.mysql.jdbc.Driver

The deployment goes fine after following the workarounds mentioned at:

http://wiki.jruby.org/wiki/Rails_2.3.2

But invoking "http://localhost:8080/runner/runners" shows the error message:

– cut here –
We're sorry, but something went wrong.

We've been notified about this issue and we'll take a look at it shortly.
– cut here –

This application works fine in Tomcat because it falls back on jdbcmysql adapter instead of JNDI. I can always create JNDI reference in Tomcat but would like to understand how to debug this error in GlassFish first.

For experimental purposes, I deployed the same application w/o "jndi" and "driver" entries and it worked fine.

The Admin Console Ping to JDBC connection pool is successful as well. I tried creating another JDBC connection pool/resource using Web-based Admin GUI, still the same result.

More details about how the app is created/configured etc are available at:

http://blogs.sun.com/arungupta/entry/totd_73_jruby_and_glassfish

No error is shown in domains/domain1/logs/server.log or logs/development.log or logs/production.log.



Arun Gupta added a comment - 20/Mar/09 12:06 PM

This worked with JRuby 1.2.0 RC2 + Rails 2.2.2.