Hi, Ruby 1.8.6 (one-click) Camping 1.5 I''d submit this as a bug, but the tracker says I''m forbidden, so here you go. The first problem is that the sql to create the sessions table is broken. This is what it tried to send: CREATE TABLE sessions ( id NUMBER(38) NOT NULL PRIMARY KEY (38), --> Problem here hashid VARCHAR2(32), created_at DATE, ivars CLOB DEFAULT empty_clob() ) The problem is that second "(38)" after "PRIMARY KEY". So, I removed that and created the table manually. The next problem was a missing Oracle sequence (which I had no idea was required, but ok). I figured out (by stepping through oci8.rb) that the name of the sequence should be "sessions_seq". For that I used the following snippet: CREATE SEQUENCE ACS_SUPPORT.SESSIONS_SEQ START WITH 50 MAXVALUE 999999999999999999999999999 MINVALUE 0 NOCYCLE CACHE 50 NOORDER; Unfortunately, there are still problems, and here''s where I''m not sure what''s happening: [2007-10-04 15:53:24] INFO WEBrick 1.3.1 [2007-10-04 15:53:24] INFO ruby 1.8.6 (2007-03-13) [i386-mswin32] [2007-10-04 15:53:24] INFO WEBrick::HTTPServer#start: pid=1736 port=3301 [2007-10-04 15:53:31] ERROR NoMethodError: undefined method `[]='' for nil:NilClass C:/ruby/lib/ruby/gems/1.8/gems/camping-1.5/lib/camping/session.rb:21:in `[]='' C:/ruby/lib/ruby/gems/1.8/gems/camping-1.5/lib/camping/session.rb:110:in `service'' (eval):44:in `run'' C:/ruby/lib/ruby/gems/1.8/gems/camping-1.5/lib/camping/reloader.rb:117:i n `run'' C:/ruby/lib/ruby/gems/1.8/gems/camping-1.5/lib/camping/webrick.rb:45:in `service'' C:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'' C:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'' C:/ruby/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'' C:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'' C:/ruby/lib/ruby/1.8/webrick/server.rb:95:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `each'' C:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:23:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:82:in `start'' C:/ruby/lib/ruby/gems/1.8/gems/camping-1.5/bin/camping:244 C:/ruby/bin/camping:16:in `load'' C:/ruby/bin/camping:16 So, for whatever reason, it''s not pulling the sessions_seq.nextval properly. At least, that''s my guess. I haven''t debugged further as I sorta lost energy at that point. Any ideas? Regards, Dan This communication is the property of Qwest and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments.
Hi Daniel, I think that I have corrected that last week changeset [226]. The problem was that Session uses it''s own kind of id (hashid) and that by default, ActiveRecord uses an incremental version. See : http://code.whytheluckystiff.net/camping/changeset/226 Please tell me if I introduced any regression. -- Cheers, zimbatm
On 5-okt-2007, at 17:54, Jonas Pfenniger wrote:> I think that I have corrected that last week changeset [226]. The > problem was that Session uses it''s own kind of id (hashid) and that by > default, ActiveRecord uses an incremental version. > > See : http://code.whytheluckystiff.net/camping/changeset/226 > > Please tell me if I introduced any regression.I am for the proposal of having multiple session drivers, but totally _not_ for the proposal of abolishing the db sessions. I routinely run Camping in parallel fashion (multiplexed dispatchers) and I also store data that does not fit in the 4K cookie limit in the session (see Pasaporte, where the whole OpenID request is piggybacked in the session storage). I also like the idea that all Camping apps store their session in _one_ record, with many apps on one domain this would not be easily solvable because 4k is too small for one app, let alone many apps. So I am for a PStore-based session but not for cookie-based sessions. Their introduction in Rails among others revealed some problems that exist with this approach. The changeset did not introduce any regressions for me but I will keep my Set-Cookie workaround for a while, at least until Camping 1.6 hits the streets -- Julian ''Julik'' Tarkhanov please send all personal mail to me at julik.nl
> -----Original Message----- > From: camping-list-bounces at rubyforge.org > [mailto:camping-list-bounces at rubyforge.org] On Behalf Of > Jonas Pfenniger > Sent: Friday, October 05, 2007 9:54 AM > To: camping-list at rubyforge.org > Subject: Re: Session handling busted on Oracle > > > Hi Daniel, > > I think that I have corrected that last week changeset [226]. > The problem was that Session uses it''s own kind of id > (hashid) and that by default, ActiveRecord uses an > incremental version. > > See : http://code.whytheluckystiff.net/camping/changeset/226 > > Please tell me if I introduced any regression.Doesn''t work. Same error basically: [2007-10-05 14:46:17] ERROR NoMethodError: undefined method `[]='' for nil:NilClass C:/ruby/lib/ruby/gems/1.8/gems/camping-1.5/lib/camping/session.rb:24:in `[]='' C:/ruby/lib/ruby/gems/1.8/gems/camping-1.5/lib/camping/session.rb:129:in `service'' (eval):44:in `run'' C:/ruby/lib/ruby/gems/1.8/gems/camping-1.5/lib/camping/reloader.rb:117:i n `run'' C:/ruby/lib/ruby/gems/1.8/gems/camping-1.5/lib/camping/webrick.rb:45:in `service'' C:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'' C:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'' C:/ruby/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'' C:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'' C:/ruby/lib/ruby/1.8/webrick/server.rb:95:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `each'' C:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:23:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:82:in `start'' C:/ruby/lib/ruby/gems/1.8/gems/camping-1.5/bin/camping:244 C:/ruby/bin/camping:16:in `load'' Dan This communication is the property of Qwest and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments.
Weird, the ivars field should have been defined in the "generate" function. Did you drop the session schema on beforehand ? -- Cheers, zimbatm
> -----Original Message----- > From: camping-list-bounces at rubyforge.org > [mailto:camping-list-bounces at rubyforge.org] On Behalf Of > Jonas Pfenniger > Sent: Sunday, October 07, 2007 11:00 AM > To: camping-list at rubyforge.org > Subject: Re: Session handling busted on Oracle > > > Weird, the ivars field should have been defined in the > "generate" function. Did you drop the session schema on beforehand ?I dropped both the table and the sequence (and rebuilt them manually again). I uninstalled the camping gem, and installed the latest camping gem from source. Same error. This was the sql I used for the table: CREATE TABLE sessions ( id NUMBER(38) NOT NULL PRIMARY KEY, hashid VARCHAR2(32), created_at DATE, ivars CLOB DEFAULT empty_clob() ) Was there something else I should have used? Regards, Dan This communication is the property of Qwest and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments.
2007/10/8, Berger, Daniel <Daniel.Berger at qwest.com>:> Was there something else I should have used?Well technically, the id field is not necessary anymore. I don''t know how AR will react if it is set. Also, are you sure that you are using camping from trunk ? Btw, here is the schema I have on sqlite : CREATE TABLE sessions ("hashid" varchar(32) NOT NULL, "created_at" datetime DEFAULT NULL, "ivars" text DEFAULT NULL); -- Cheers, zimbatm
> -----Original Message----- > From: camping-list-bounces at rubyforge.org > [mailto:camping-list-bounces at rubyforge.org] On Behalf Of > Jonas Pfenniger > Sent: Monday, October 08, 2007 12:23 PM > To: camping-list at rubyforge.org > Subject: Re: Session handling busted on Oracle > > > 2007/10/8, Berger, Daniel <Daniel.Berger at qwest.com>: > > Was there something else I should have used? > > Well technically, the id field is not necessary anymore. I > don''t know how AR will react if it is set. Also, are you sure > that you are using camping from trunk ? > > Btw, here is the schema I have on sqlite : > > CREATE TABLE sessions ("hashid" varchar(32) NOT NULL, > "created_at" datetime DEFAULT NULL, "ivars" text DEFAULT NULL);Ok, this is what I went with: CREATE TABLE sessions ( hashid varchar(32) NOT NULL, created_at date DEFAULT NULL, ivars varchar(256) DEFAULT NULL ); It seems to be working, so I''m guessing that the id field was indeed the culprit. We''ll see how it goes. Many thanks! Dan This communication is the property of Qwest and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments.
> -----Original Message----- > From: camping-list-bounces at rubyforge.org > [mailto:camping-list-bounces at rubyforge.org] On Behalf Of > Jonas Pfenniger > Sent: Monday, October 08, 2007 12:23 PM > To: camping-list at rubyforge.org > Subject: Re: Session handling busted on Oracle > > > 2007/10/8, Berger, Daniel <Daniel.Berger at qwest.com>: > > Was there something else I should have used? > > Well technically, the id field is not necessary anymore. I > don''t know how AR will react if it is set. Also, are you sure > that you are using camping from trunk ? > > Btw, here is the schema I have on sqlite : > > CREATE TABLE sessions ("hashid" varchar(32) NOT NULL, > "created_at" datetime DEFAULT NULL, "ivars" text DEFAULT NULL);Upon further review that isn''t going to work. You can''t set the @state variable without an id field. Camping Problem! FastPath::Controllers::Login.POST ActiveRecord::StatementInvalid OCIError: ORA-00904: "ID": invalid identifier: UPDATE sessions SET hashid ''iNr6UPnc3KjbQBxZwktujSIENXWIhzfd'', ivars = ''--- !map:HashWithIndifferentAccess FastPath: !map:HashWithIndifferentAccess cuid: true '', created_at = ''2007-10-09 11:00:32'' WHERE id = NULL: C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/con nection_adapters/abstract_adapter.rb:128:in `log'' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/con nection_adapters/oracle_adapter.rb:222:in `execute'' ... Suggestions? Thanks, Dan This communication is the property of Qwest and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments.
> -----Original Message----- > From: camping-list-bounces at rubyforge.org > [mailto:camping-list-bounces at rubyforge.org] On Behalf Of > Berger, Daniel > Sent: Tuesday, October 09, 2007 11:15 AM > To: camping-list at rubyforge.org > Subject: RE: Session handling busted on Oracle > > > > -----Original Message----- > > From: camping-list-bounces at rubyforge.org > > [mailto:camping-list-bounces at rubyforge.org] On Behalf Of > > Jonas Pfenniger > > Sent: Monday, October 08, 2007 12:23 PM > > To: camping-list at rubyforge.org > > Subject: Re: Session handling busted on Oracle > > > > > > 2007/10/8, Berger, Daniel <Daniel.Berger at qwest.com>: > > > Was there something else I should have used? > > > > Well technically, the id field is not necessary anymore. I > > don''t know how AR will react if it is set. Also, are you sure > > that you are using camping from trunk ? > > > > Btw, here is the schema I have on sqlite : > > > > CREATE TABLE sessions ("hashid" varchar(32) NOT NULL, > > "created_at" datetime DEFAULT NULL, "ivars" text DEFAULT NULL); > > Upon further review that isn''t going to work. You can''t set > the @state variable without an id field.Upon further review of the previous review, it seems the problem is not the ID field, but the datatype of the ivars field. I went with this: CREATE TABLE sessions ( id number primary key, hashid varchar(32) NOT NULL, created_at date DEFAULT NULL, ivars varchar(256) DEFAULT NULL ); So far, so good.... Regards, Dan This communication is the property of Qwest and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments.
after a bit of fuss ... i fully shipped off EES at 8am today to Jason at Bren. I''m dabbling in drupal at the moment in some core themeing components. I know that I will need at least 2 other things to do this week besides IDs site ... Sakai themeing or ASP->PHP are others items i''m aware of ... but not sure as to the resource locations. -dg On Oct 9, 2007, at 10:57 AM, Berger, Daniel wrote:> > >> -----Original Message----- >> From: camping-list-bounces at rubyforge.org >> [mailto:camping-list-bounces at rubyforge.org] On Behalf Of >> Berger, Daniel >> Sent: Tuesday, October 09, 2007 11:15 AM >> To: camping-list at rubyforge.org >> Subject: RE: Session handling busted on Oracle >> >> >>> -----Original Message----- >>> From: camping-list-bounces at rubyforge.org >>> [mailto:camping-list-bounces at rubyforge.org] On Behalf Of >>> Jonas Pfenniger >>> Sent: Monday, October 08, 2007 12:23 PM >>> To: camping-list at rubyforge.org >>> Subject: Re: Session handling busted on Oracle >>> >>> >>> 2007/10/8, Berger, Daniel <Daniel.Berger at qwest.com>: >>>> Was there something else I should have used? >>> >>> Well technically, the id field is not necessary anymore. I >>> don''t know how AR will react if it is set. Also, are you sure >>> that you are using camping from trunk ? >>> >>> Btw, here is the schema I have on sqlite : >>> >>> CREATE TABLE sessions ("hashid" varchar(32) NOT NULL, >>> "created_at" datetime DEFAULT NULL, "ivars" text DEFAULT NULL); >> >> Upon further review that isn''t going to work. You can''t set >> the @state variable without an id field. > > Upon further review of the previous review, it seems the problem is > not > the ID field, but the datatype of the ivars field. I went with this: > > CREATE TABLE sessions ( > id number primary key, > hashid varchar(32) NOT NULL, > created_at date DEFAULT NULL, > ivars varchar(256) DEFAULT NULL > ); > > So far, so good.... > > Regards, > > Dan > > > This communication is the property of Qwest and may contain > confidential or > privileged information. Unauthorized use of this communication is > strictly > prohibited and may be unlawful. If you have received this > communication > in error, please immediately notify the sender by reply e-mail and > destroy > all copies of the communication and any attachments. > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list
On Oct 9, 2007, at 7:57 PM, Berger, Daniel wrote:> > So far, so good....I know it''s a minority concern, but maybe it is a good idea to make that ID field present and use it accordingly. -- Julian ''Julik'' Tarkhanov please send all personal mail to me at julik.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/camping-list/attachments/20071009/cdd6d4c8/attachment.html