Session data from Java Applet

Hello,

I'm trying to upload files from a Java applet, but this applet does not have the same session as the browser. My solution is to pass the session id through the URL and have RAILS find the data needed to process the photos. I found this code which works in getting me there partially,       @user = CGI::Session::ActiveRecordStore::Session.find_by_session_id(params[:session]).data[:user]

but I keep running into this error:

ArgumentError (undefined class/module User):     .//app/controllers/account_controller.rb:162:in `load'     .//app/controllers/account_controller.rb:162:in `upload_photos'     /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ action_controller/base.rb:1095:in `send'     /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ action_controller/base.rb:1095:in `perform_action_without_filters'

The @user variable get's loaded with the base64 data but it doesn't recognize the User class when unmarshaling. Anyone know why this would happen?

Thanks, Jason