(no subject)

From: Boris Y Iyutin (iyutin@mit.edu)
Date: Thu Jul 27 2000 - 20:22:49 MEST


Hello. 

I am trying to define a new class which uses root libs
and connects to oracle database. 

It compiles pretty much ok, but gives Segmentation fault 
when calls TSQLServer::Connect. (Exactly the same piece of code 
works well from root prompt)

Inside TSQLServer::Connect

 TSQLServer *TSQLServer::Connect(const char *db, const char *uid, const char 
*pw)
{
   TSQLServer *serv = 0;

   if (!strncmp(db, "mysql", 5)) {
      if (gROOT->LoadClass("TMySQLServer", "MySQL"))
         return 0;
      serv = (TSQLServer *) gROOT->ProcessLineFast(Form(
             "new TMySQLServer("%s", "%s", "%s")", db, uid, pw));
   } else if (!strncmp(db, "oracle", 6)) {
      if (gROOT->LoadClass("TOracleServer", "Oracle"))
         return 0;
      serv = (TSQLServer *) gROOT->ProcessLineFast(Form(
             "new TOracleServer("%s", "%s", "%s")", db, uid, pw));
   }
   return serv;
}


It crashes somewhere within this call since it does not go inside 
TOracleServer constructor. Maybe gROOT->LoadClass does not work properly
without root command prompt environment. libOracle.so looks ok. 
I compiled it on the same computer and copied into $ROOTSYS/lib

Maybe you have some ideas.

Thank you very much. 

Boris. 



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:30 MET