[jruby-dev] [jira] Created: (JRUBY-2386) File upload of a 60KB file fails with 'invalid body size', 'mainly' on linux

2008-04-11 Thread JIRA
File upload of a 60KB file fails with 'invalid body size', 'mainly' on linux


 Key: JRUBY-2386
 URL: http://jira.codehaus.org/browse/JRUBY-2386
 Project: JRuby
  Issue Type: Bug
Affects Versions: JRuby 1.1
 Environment: Debian sarge on intel xeon, java version "1.5.0_15", 
jruby-1.1
Reporter: Andrés Cirugeda Esco
Assignee: Thomas E Enebo


Trying to upload a 60KB file results in a 'WEBrick::HTTPStatus::BadRequest: 
invalid body size.' error.

Tracing the problem to the httprequest.rb file I added a simple debug message 
to see the problem, just kept the @remaining_size in each iteration of the 
while loop, the result was this:

60107---56011---51915---47819---43723---salida: 43723

The 'salida' and the last number are from outside the loop. So it seems the 
loop breaks when there are still 43KB to read.

Uploading small files (around 4 KB) seems to run ok. Uploading the 60KB file on 
a linux server fails always. Uploading the same 60KB file failed once when 
running the server on my mac. That's the 'mainly' in the summary.

If you need me to perform any test or to provide any extra information, just 
tell me.

Regards



-- 
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




[jruby-dev] Oracle dates (w/ time) interpreted by ActiveRecord as Date objects, not Time

2008-04-11 Thread one_too_many

Greetings, all. 

When I use ActiveRecord within JRuby, and I access an Oracle 10g date field
(which include time in Oracle - it's really a DATETIME), the object
ActiveRecord gives me is a Date object, not a Time. As such, the time is
lost, so all I get is a truncated date w/o time. 

When I access these same fields in a normal Ruby/ActiveRecord interpreter
environment, I get a Time object as expected. 

I've searched for this issue and have not found a fix (though, this seems
closely related:
http://www.nabble.com/-jira--Created%3A-%28JRUBY-1217%29-Date-columns-ending-in-_at-returning-Jan-01%2C-2000-on-Oracle-to11675146.html#a11675146).
Any help would be greatly appreciated! The code below shows what I'm seeing:

-- Sample code that illustrates my problem
  class EtlParm < ActiveRecord::Base
  end
  
  parm = EtlParm.find_by_parm_name('abc_parm')
  x = parm.value_date  
  puts "x.class: #{x.class}"
  puts "x.inspect: #{x.inspect}"  

-- [JRuby] Output
>> x.class: Date
>> x.inspect: Sun, 01 Jan 2006

-- [Ruby] Output
>> x.class: Time
>> x.inspect: Sun, 01 Jan 2006 17:53:54

Here is what my environment looks like:

ruby 1.8.5 (2007-11-01 rev 4810) [x86-jruby1.0.2]
JRuby gem version: 0.9.4

JRuby gems (local):
activerecord (2.0.1)
Implements the ActiveRecord pattern for ORM.

ActiveRecord-JDBC (0.5)
JDBC adapter for ActiveRecord, for use within JRuby on Rails.

activeresource (2.0.1)
Think Active Record for web resources.

activesupport (2.0.1)
Support and utility classes used by the Rails framework.

ar-extensions (0.7.0)
Extends ActiveRecord functionality.
-- 
View this message in context: 
http://www.nabble.com/Oracle-dates-%28w--time%29-interpreted-by-ActiveRecord-as-Date-objects%2C-not-Time-tp16628183p16628183.html
Sent from the JRuby - Dev mailing list archive at Nabble.com.


-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email