ClassCastException when launching Rails App on Glassfishv3
----------------------------------------------------------
Key: JRUBY-4266
URL: http://jira.codehaus.org/browse/JRUBY-4266
Project: JRuby
Issue Type: Bug
Components: Rails WAR Deployment
Affects Versions: JRuby 1.4
Environment: OpenSolaris, Glassfishv3, JRuby-1.4.0, Rails-2.3.4,
activerecord-jdbcmysql-adapter-0.9.2, activerecord-jdbc-adapter-0.9.2,
jdbc-mysql-5.0.4, rack-1.0.1, Java-1.6, glassfishgem-0.9.5,
jruby-oppenssl-0.5.2, warbler-0.9.14
Reporter: Craig Stuber
Priority: Blocker
A simple learning app that reads and displays 2 items from a MySQL database.
The app works with the Glassfish gem, but when I create a war file and deploy
and launch on Glassfishv3 I get the following error message:
SEVERE: WebModule[/testapp]Application Error
java.lang.ClassCastException: org.jruby.java.proxies.ConcreteJavaProxy cannot
be cast to java.sql.Connection
at $Proxy156.newConnection(Unknown Source)
at
jdbc_adapter.RubyJdbcConnection.reconnect(RubyJdbcConnection.java:423)
at
jdbc_adapter.RubyJdbcConnection.connection(RubyJdbcConnection.java:171)
at
jdbc_adapter.RubyJdbcConnection$i_method_0_0$RUBYINVOKER$connection.call(jdbc_adapter/RubyJdbcConnection$i_method_0_0$RUBYINVOKER$connection.gen)
at
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:253)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:72)
at org.jruby.ast.VCallNode.interpret(VCallNode.java:85)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.ast.RescueNode.executeBody(RescueNode.java:225)
at
org.jruby.ast.RescueNode.interpretWithJavaExceptions(RescueNode.java:147)
at org.jruby.ast.RescueNode.interpret(RescueNode.java:110)
at
org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:182)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:153)
at
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:283)
at
org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:121)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:126)
at org.jruby.RubyClass$SpecificArityNew.call(RubyClass.java:554)
at
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:152)
more...
The jdbc connection pool pings successfully.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email