Ok. I figured out where one of these errors comes from... If i have a manager class that does:
$res= Manager->get( with_objects=> ['child'] ); and i access $res->child this gets called Rose::DB::Object::MakeMethods::Generic::object_by_key and I'm catching an error on line 2180 return undef unless($obj->load(speculative => 1)); which is part of the 'get_set_on_save' interface ( line 1993) ===== now the issue is caused from when i set the default rose db object to be 'null', which isn't a valid db -- as i make a rose db object with specific args and pass it in to the object so i can control transactions better ( i've migrated 70% of 1 webapp to rose, and about 40% of another. all of the rose stuff needs to encapsulate within other db logic ) what was exactly happening in this case is : I was saving an object 'as yaml' to memcached I expected the object to contain with_object / require_objects subclasses -- it does not when i populated, share_db clones a new class of my default rose db object - which is invalid by design when i accessed the child object, it tried to load ( as it was not already ) to fix it, i saved the child object as a sep. memcached key, and integrated by hand. i just wanted to let people know, that this behavior exists. some might expect Rose to work like this , and be right. others might expect it to work differently, and plow through source for a few hours. I'll have to track down more cases of this db connection issue. I think this might be happening elsewhere: share_db clones a new class of the default rose db object i expect share_db to clone a new class of the current rose db object ( which could be the default object, but with some overridden connect args ) but that is probably well outside of the scope of what John wants rose to handle, and I'm not even sure that's what is going on. On Oct 9, 2006, at 2:57 PM, Jonathan Vanasco wrote: > This is an odd issue... > > I'm using Rose::DB::Object under mod_perl & apache::dbi > > During setup i connect with a real db handle so I can prime_all_caches > > Then I disconnect and do a little swap, setting the db args to NULL/ > NULL/NULL -- this is just to make sure that Rose doesn't handle any > of its own connections. i'm using connection pooling and multiple > handles / transactions, so I just create rose::db objects with > whatever db i'm using at the time, and pass them to rose::db::object > objects as needed. > > the problem is that after long periods of inactivity on my dev box, i > get > > [Mon Oct 09 14:51:04 2006] [error] [client 127.0.0.1] DBI connect > ('dbname=NULL;host=localhost','NULL',...) failed: FATAL: database > "NULL" does not exist\n at /Library/Perl/5.8.6/Rose/DB.pm line 685 > \nCompilation failed in require at /Library/Perl/5.8.6/darwin-thread- > multi-2level/Apache2/Reload.pm line 160.\n > > so reload (?) or rose is causing this non-functional rose::db class > to try and connect-- which it never can. > > before doing a dirty hack ( tossing in a sqlite or something )- i was > hoping someone could point me to where I can better track this down > to catch it. > > ---------------------------------------------------------------------- > --- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to > share your > opinions on IT & business topics through brief surveys -- and earn > cash > http://www.techsay.com/default.php? > page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Rose-db-object mailing list > Rose-db-object@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rose-db-object > // Jonathan Vanasco | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | FindMeOn.com - The cure for Multiple Web Personality Disorder | Web Identity Management and 3D Social Networking | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | RoadSound.com - Tools For Bands, Stuff For Fans | Collaborative Online Management And Syndication Tools | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object