# Serialised attribute generates error

**URL:** <https://www.ruby-forum.com/t/serialised-attribute-generates-error/154228>\
**Category:** JRuby\
**Created:** [November 26, 2008, 4:13pm UTC](https://www.ruby-forum.com/t/serialised-attribute-generates-error/154228 "2008-11-26T16:13:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![raphael\_b](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/7c8e57/32.png) [@raphael\_b](https://www.ruby-forum.com/u/raphael_b)\
**Post date:** [November 26, 2008, 4:13pm UTC](https://www.ruby-forum.com/t/serialised-attribute-generates-error/154228/1 "2008-11-26T16:13:28Z")

</div>

Hi,

I’ve started to look at deployment of a Jruby on rails app, and am  
following the great post by Charles at:

> **[Zero to Production in 15 Minutes](http://blog.headius.com/2008/08/zero-to-production-in-15-minutes.html)**
>
> There still seems to be confusion about the relative simplicity or difficulty of deploying a Rails app using JRuby. Many folks still look around for the old tools and the old ways (Mongrel, generally), assuming that

(and so I am using Glassfish)

I ActiveRecord attribute that I serialize:

class PullTransfer \< ActiveRecord::Base  
serialize :headers  
end

and that causes problem with this call:

PullTransfer.create(:uploaded\_file =\> @file, :headers =\>  
request.headers)

commenting the serialize and removing the :header attribute from the  
create call works fine.

The stange thing is that worked fine when running the app with  
jruby ./script/server

With Glassfish, I get this error though:

TypeError (can’t dump anonymous class Class):  
/vendor/rails/activerecord/lib/active\_record/transactions.rb:127:in  
`rollback_active_record_state!' /vendor/rails/activerecord/lib/active_record/transactions.rb:106:in `save\_with\_transactions’  
/vendor/rails/activerecord/lib/active\_record/base.rb:644:in `create’

Any hint?

Thanks

Raph

jruby -v  
jruby 1.1.4 (ruby 1.8.6 patchlevel 114) (2008-08-28 rev 7570)  
[i386-java]  
rails 2.1  
glassfish-installer-v2ur2-b04-linux

–  
Web database: [http://www.myowndb.com](http://www.myowndb.com)  
Free Software Developers Meeting: [http://www.fosdem.org](http://www.fosdem.org)

* * *

To unsubscribe from this list, please visit:

```
http://xircles.codehaus.org/manage_email

```

---

<div class="post-metadata">

**Author:** ![raphael\_b](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/7c8e57/32.png) [@raphael\_b](https://www.ruby-forum.com/u/raphael_b)\
**Post date:** [November 28, 2008, 8:21pm UTC](https://www.ruby-forum.com/t/serialised-attribute-generates-error/154228/2 "2008-11-28T20:21:57Z")

</div>

Just to add that I’ve discovered I have the same problem when running  
with jetty-rails and jruby-1.1.5

Still not sure when I have to look to solve this, as the  
./scrpt/server way of running doesn’t give this problem.

Raph

On Wed, Nov 26, 2008 at 4:10 PM, Raphael B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> serialize :headers  
> jruby ./script/server  
> Any hint?
> 
> –  
> Web database: [http://www.myowndb.com](http://www.myowndb.com)  
> Free Software Developers Meeting: [http://www.fosdem.org](http://www.fosdem.org)

–  
Web database: [http://www.myowndb.com](http://www.myowndb.com)  
Free Software Developers Meeting: [http://www.fosdem.org](http://www.fosdem.org)

* * *

To unsubscribe from this list, please visit:

```
http://xircles.codehaus.org/manage_email

```
