Hello Sequel team,
Currently I am working on a solution to migrate an existing Java web
app which is more dependent on Oracle Pl/SQL stored procs for most of
its business logics, onto a Jruby platform,
Looking thru all existing frameworks on Jruby, I thought it would be
better option to use Sinatra & sequel ORM stack which has good support
for DB stored procs, cursors etc.
Since TBox provides a very good enterprise support & compatability for
Jruby & Rack applications, I choose TBox as a platform for hosting
migrated app.
While working on a POC, I recently faced an issue, when connecting to
Oracle DB from Sinatra app from TBox, which otherwise works well while
running independantly as simple rack app or thru IRB.
Working on Windows XP with following gems, connecting to Oracle 11g DB
server,
json (1.7.3 java)
mail (2.4.4)
mime-types (1.18)
multi_json (1.3.5)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.2)
rack-protection (1.2.0)
rack-ssl (1.3.2)
rack-test (0.6.1)
rake (0.8.7)
rdoc (3.12)
sequel (3.35.0)
sinatra (1.3.2)
sources (0.0.1)
sprockets (2.1.3)
thor (0.15.0, 0.14.6)
tilt (1.3.3)
torquebox (2.0.3)
torquebox-cache (2.0.3 java)
torquebox-capistrano-support (2.0.3)
torquebox-configure (2.0.3 java)
torquebox-core (2.0.3 java)
torquebox-messaging (2.0.3 java)
torquebox-naming (2.0.3 java)
torquebox-no-op (2.0.3)
torquebox-rake-support (2.0.3)
torquebox-security (2.0.3 java)
torquebox-stomp (2.0.3)
torquebox-transactions (2.0.3)
torquebox-web (2.0.3 java)
treetop (1.4.10)
tzinfo (0.3.33)
=========================================================================================
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented
it from fulfilling this request.
exception
javax.servlet.ServletException: org.jruby.exceptions.RaiseException:
(DatabaseConnectionError) NativeException:
java.lang.NoClassDefFoundError: javax/transaction/xa/XAResource
NativeException: java.lang.NullPointerException: null
org.torquebox.web.servlet.RackFilter.doRack(RackFilter.java:117)
org.torquebox.web.servlet.RackFilter.doFilter(RackFilter.java:101)
org.torquebox.web.servlet.RackFilter.doFilter(RackFilter.java:72)
root cause
org.jruby.exceptions.RaiseException: (DatabaseConnectionError)
NativeException: java.lang.NoClassDefFoundError: javax/transaction/xa/
XAResource
NativeException: java.lang.NullPointerException: null
ConnectionPool.make_new(c:/TorqueBox/jruby/lib/ruby/gems/1.8/gems/
sequel-3.35.0/lib/sequel/connection_pool.rb:103)
ThreadedConnectionPool.make_new(c:/TorqueBox/jruby/lib/ruby/gems/
1.8/gems/sequel-3.35.0/lib/sequel/connection_pool/threaded.rb:144)
ThreadedConnectionPool.available(c:/TorqueBox/jruby/lib/ruby/gems/
1.8/gems/sequel-3.35.0/lib/sequel/connection_pool/threaded.rb:130)
ThreadedConnectionPool.acquire(c:/TorqueBox/jruby/lib/ruby/gems/
1.8/gems/sequel-3.35.0/lib/sequel/connection_pool/threaded.rb:120)
ThreadedConnectionPool.sync(c:/TorqueBox/jruby/lib/ruby/gems/1.8/
gems/sequel-3.35.0/lib/sequel/connection_pool/threaded.rb:162)
ThreadedConnectionPool.sync(c:/TorqueBox/jruby/lib/ruby/gems/1.8/
gems/sequel-3.35.0/lib/sequel/connection_pool/threaded.rb:162)
ThreadedConnectionPool.acquire(c:/TorqueBox/jruby/lib/ruby/gems/
1.8/gems/sequel-3.35.0/lib/sequel/connection_pool/threaded.rb:119)
ThreadedConnectionPool.hold(c:/TorqueBox/jruby/lib/ruby/gems/1.8/
gems/sequel-3.35.0/lib/sequel/connection_pool/threaded.rb:91)
Database.synchronize(c:/TorqueBox/jruby/lib/ruby/gems/1.8/gems/
sequel-3.35.0/lib/sequel/database/connecting.rb:233)
Database.execute(c:/TorqueBox/jruby/lib/ruby/gems/1.8/gems/
sequel-3.35.0/lib/sequel/adapters/jdbc.rb:234)
Dataset.execute(c:/TorqueBox/jruby/lib/ruby/gems/1.8/gems/
sequel-3.35.0/lib/sequel/dataset/actions.rb:744)
Dataset.fetch_rows(c:/TorqueBox/jruby/lib/ruby/gems/1.8/gems/
sequel-3.35.0/lib/sequel/adapters/jdbc.rb:604)
Dataset.each(c:/TorqueBox/jruby/lib/ruby/gems/1.8/gems/
sequel-3.35.0/lib/sequel/dataset/actions.rb:133)
(Anonymous).handle(file:/c:/TorqueBox/jboss/modules/org/torquebox/
web/main/torquebox-web.jar!/org/torquebox/web/rack/response_handl
er.rb:41)
===========================================================================================
The error is about
Sequel::DatabaseConnectionError at sms
NativeException: java.sql.SQLRecoverableException: IO Error: Socket
read timed out NativeException: java.lang.NoClassDefFoundError: javax/
transaction/xa/XAResource
file: T4CConnection.java
location: logon
line: 458
============================================================================================
I have copied ojdbc6.jar to C:\TorqueBox\jruby\lib and the simple code
is as follows
require 'rubygems'
require 'sinatra'
require 'sequel'
DB = Sequel.connect('jdbc:oracle:thin:sms/greenbrick#@1??.2??.1?.5?:1?
2?:?XSD605')
get '/' do
DB.tables
end
===========================================================================================
Please help me to resolve the issue, let me know if I had missed any
of the configurations required specific for sequel \ Sinatra
framework in TBox.
Thanks & Regards,
Balaji
P.S I also upgraded to latest version, but stiill error persists.
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sequel-talk?hl=en.