Bugs: Browse | Submit New | Admin

[#21115] Glassfish gem not supporting JNDI database connection pooling?

Date:
2008-07-07 23:12
Priority:
3
Submitted By:
Raphaël Valyi (rvalyi)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Target Release:
 
Summary:
Glassfish gem not supporting JNDI database connection pooling?

Detailed description
Hi all,

I think I followed the intruction to declare a JNDI datasource on Glassfish using the standard method with the asadmin
command inside the installed gem, just like explained on that Sun blog:
http://weblogs.java.net/blog/arungupta/archive/2007/09/totd_9_using_jd.html

I'm pretty sure those were created as I got the confirmation messages and also because when trying again Glassfish said
those stuff already existed.

Then I referenced my JNDI datasource in my Rails application, again, like explained with:
  adapter: jdbc
  jndi: jdbc/jndi_rails
  driver: com.mysql.jdbc.Driver
in my database.yml

Still, Glassfish failed to init the JNDI database connection and I got that error at startup:

rvalyi@rvalyi-laptop:~/DEV$ glassfish_rails livetribune
7 juil. 2008 23:00:08 com.sun.enterprise.glassfish.bootstrap.ASMain main
INFO: Launching GlassFish on HK2 platform
7 juil. 2008 23:00:08 com.sun.enterprise.glassfish.bootstrap.ASMainHK2 findDerbyClient
INFO: Cannot find javadb client jar file, jdbc driver not available
7 juil. 2008 23:00:08 com.sun.enterprise.glassfish.bootstrap.ExtensibleClassLoader <init>
INFO: Added file:/usr/lib/jvm/jdk7/lib/tools.jar to shared classpath
7 juil. 2008 23:00:09 com.sun.enterprise.v3.services.impl.GrizzlyProxy start
INFO: Listening on port 8080
7 juil. 2008 23:00:09 com.sun.enterprise.v3.services.impl.GrizzlyEmbeddedHttpConfigurator configureSSL
ATTENTION: pewebcontainer.all_ssl_protocols_disabled
7 juil. 2008 23:00:09 com.sun.enterprise.v3.services.impl.GrizzlyEmbeddedHttpConfigurator configureSSL
ATTENTION: pewebcontainer.all_ssl_ciphers_disabled
7 juil. 2008 23:00:09 com.sun.enterprise.v3.services.impl.GrizzlyProxy start
INFO: Listening on port 3131
7 juil. 2008 23:00:09 com.sun.enterprise.v3.services.impl.GrizzlyProxy start
INFO: Listening on port 3838
7 juil. 2008 23:00:09 com.sun.enterprise.v3.admin.adapter.AdminConsoleAdapter setContextRoot
INFO: Admin Console Adapter: context root: /admin
7 juil. 2008 23:00:09 com.sun.grizzly.jruby.RailsAdapter startRubyRuntimePool
INFO: Starting Rails instances
7 juil. 2008 23:00:19  
GRAVE: JNDI data source unavailable: javax.naming.NoInitialContextException: Need to specify class name in environment
or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial; trying
straight JDBC
7 juil. 2008 23:00:19  
GRAVE: Exception in thread "pool-5-thread-1" 
7 juil. 2008 23:00:19 org.glassfish.scripting.rails.RailsDeployer load
INFO: Loading application livetribune at /
7 juil. 2008 23:00:19  
GRAVE: :1: 
7 juil. 2008 23:00:19 com.sun.enterprise.v3.server.AppServerStartup run
INFO: Glassfish v3 started in 11254 ms
7 juil. 2008 23:00:19  
GRAVE: IO error -- /home/rvalyi/DEV/livetribune//config/environment (LoadError)
7 juil. 2008 23:00:19  
GRAVE: 	...internal jruby stack elided...


Does JNDI works in the Glassfish gem? If not please consider this would be appreciated for real production usage. Best
regards,

Raphaël Valyi.

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item