Jdbc date troubles after packing app with rawr

Hi,

I hope this is the right place to ask this question.

I have a jruby app, which works perfectly while running normally, but
I get an error after packing the app with rawr:

Exception in thread “AWT-EventQueue-0”
file:/K:/AAA_MF_Reconc/package/package/jar/lib/java/jruby-complete.jar!/date.rb:730:in
civil': no constructor with arguments matching [class org.jruby.RubyNumeric] on object #<Java::JavaUtil::Date:901705720144119/2,0,2299161> (NameError) from lib/ruby/dbd/jdbc/type_conversion.rb:115:inget_calendar’
from lib/ruby/dbd/jdbc/type_conversion.rb:93:in
jdbctimestamp_to_timestamp' from lib/ruby/dbd/jdbc/statement.rb:204:inget_value’
from lib/ruby/dbd/jdbc/statement.rb:113:in `fill_data’

I am using Jruby 1.3.1 and the most recent versions of dbi & dbd-jdbc.
Next to these I’m also using the Oracle ojdbc5.jar to access an Oracle
DB and profligacy.

I did a quick test with Jruby 1.4.0RC1, but the problem didn’t go away.

Any suggestion is greatly appreciated,

Thanks,

John vdL

“The trouble with doing something right the first time is that nobody
appreciates how difficult it was” – Walt West
“Do the best you can in the time available to you.” – Paul Raymond


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

On Tue, Oct 6, 2009 at 2:44 AM, John van de Loo [email protected]
wrote:

jdbctimestamp_to_timestamp' Â Â from lib/ruby/dbd/jdbc/statement.rb:204:inget_value’
  from lib/ruby/dbd/jdbc/statement.rb:113:in `fill_data’

Well it looks like it’s passing a class to some method. Can you give
us the rest of this trace and perhaps the code on your side that
caused it? It looks like a bug in our stuff.

  • Charlie

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Hi Charlie,

The full trace is below.

As I understand the problem now get_calendar uses java.util.Calendar
which executes a few levels down this function

1071 public final Date getTime() {
1072 return new Date(getTimeInMillis());
1073 }

Which then tries to create a new jruby Date in stead of a java.util.Date

Thx, cheers,

John

Exception in thread “AWT-EventQueue-0”
file:/K:/AAA_MF_Reconc/package/package/jar/lib/java/jruby-complete.jar!/date.rb:607:in
valid_civil?': undefined method-’ for #Java::JavaObject:0x164f8d4
(NoMethodError)
from
file:/K:/AAA_MF_Reconc/package/package/jar/lib/java/jruby-complete.jar!/date.rb:726:in
civil' from lib/ruby/dbd/jdbc/type_conversion.rb:116:inget_calendar’
from lib/ruby/dbd/jdbc/type_conversion.rb:94:in
jdbctimestamp_to_timestamp' from lib/ruby/dbd/jdbc/statement.rb:204:inget_value’
from lib/ruby/dbd/jdbc/statement.rb:113:in fill_data' from lib/ruby/dbd/jdbc/statement.rb:112:ineach’
from lib/ruby/dbd/jdbc/statement.rb:112:in fill_data' from lib/ruby/dbd/jdbc/statement.rb:101:infetch’
from lib/ruby/dbi/handles/statement.rb:211:in fetch' from src/mf_recon.rb:64:infind’
from src/main.rb:150:in recon' from src/main.rb:79:ininitialize’
from (eval):240:in call' from (eval):240:inmethod_missing’
from :1
…internal jruby stack elided…
from
#Class:01x6bbb36.valid_civil?(file:/K:/AAA_MF_Reconc/package/package/jar/lib/java/jruby-complete.jar!/date.rb:726)
from
#Class:01x6bbb36.civil(lib/ruby/dbd/jdbc/type_conversion.rb:116)
from
DBI::DBD::Jdbc::TypeConversions.get_calendar(lib/ruby/dbd/jdbc/type_conversion.rb:94)
from
DBI::DBD::Jdbc::TypeConversions.jdbctimestamp_to_timestamp(lib/ruby/dbd/jdbc/statement.rb:204)
from
DBI::DBD::Jdbc::Statement.get_value(lib/ruby/dbd/jdbc/statement.rb:113)
from
DBI::DBD::Jdbc::Statement.fill_data(lib/ruby/dbd/jdbc/statement.rb:112)
from Range.each(lib/ruby/dbd/jdbc/statement.rb:112)
from
DBI::DBD::Jdbc::Statement.fill_data(lib/ruby/dbd/jdbc/statement.rb:101)
from
DBI::DBD::Jdbc::Statement.fetch(lib/ruby/dbi/handles/statement.rb:211)
from DBI::StatementHandle.fetch(src/mf_recon.rb:64)
from MfRecon.find(src/main.rb:150)
from Recon.recon(src/main.rb:79)
from Recon.initialize((eval):240)
from Proc.call((eval):240)
from
Profligacy::Swing::Listeners::ActionListenerProc.method_missing(:1)
from (unknown).(unknown)(:1)

On Sun, Oct 11, 2009 at 12:12 AM, Charles Oliver N.
[email protected] wrote:

from lib/ruby/dbd/jdbc/type_conversion.rb:93:in


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

“The trouble with doing something right the first time is that nobody
appreciates how difficult it was” – Walt West
“Do the best you can in the time available to you.” – Paul Raymond


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs