Hey,

I have the same issue, how did you resolve it?
I cannot figure out how to enable throwExceptions...

Thanks,
~Stephen

On Tue, Mar 10, 2009 at 12:12 PM, rumeau<[email protected]> wrote:
>
> Thanks so much, that solved the problem, i was using an enviroment wich
> disabled the throwExceptions property.
>
> Thanks again.
>
>
> rumeau wrote:
>>
>> I created a project with Zend Studio, wich creates the initial structure
>> for the Zend Framework Application, an Initialize class is created,  at
>> this point everything works fine, but when i try to open a DB conection i
>> get the following exception.
>>
>> <pre>Fatal error: Uncaught exception 'Zend_Controller_Exception' with
>> message 'No default module defined for this application' in
>> /home/test/library/Zend/Controller/Dispatcher/Standard.php:380
>> Stack trace:
>> #0 /home/test/library/Zend/Controller/Dispatcher/Standard.php(203):
>> Zend_Controller_Dispatcher_Standard->getControllerClass(Object(Zend_Controller_Request_Http))
>> #1 /home/test/library/Zend/Controller/Dispatcher/Standard.php(237):
>> Zend_Controller_Dispatcher_Standard->isDispatchable(Object(Zend_Controller_Request_Http))
>> #2 /home/test/library/Zend/Controller/Front.php(934):
>> Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http),
>> Object(Zend_Controller_Response_Http))
>> #3 /home/test/application/bootstrap.php(28):
>> Zend_Controller_Front->dispatch()
>> #4 /home/test/public_html/index.php(8): require('/home/test/a...')
>> #5 {main} thrown in
>> /home/test/library/Zend/Controller/Dispatcher/Standard.php on line
>> 380</pre>
>>
>> the code that seems to trigger this error is this:
>>
>> <pre>public function initDb()
>>     {
>>       $config = new Zend_Config_Xml($this->_root .
>> '/configuration/configuration.xml', 'database');
>>
>>       $this->_db = Zend_Db::factory($config->production);
>>       Zend_Db_Table_Abstract::setDefaultAdapter($this->_db);
>>
>>       if($this->_env == 'test'){
>>               $profiler = new Zend_Db_Profiler_Firebug('All DB Queries');
>>               $profiler->setEnabled(true);
>>
>>               // Attach the profiler to your db adapter
>>               $this->_db->setProfiler($profiler);
>>       }
>>     }</pre>
>>
>> The exception dissapears when i comment the factory line:
>>
>> <pre>$this->_db = Zend_Db::factory($config->production);</pre>
>>
>> I dont know why this affects the front controller, i found a workaround
>> setting the default module in the bootstrap, but the default module should
>> be set by default in the front controller.
>>
>> any help is appreciated.
>>
>> info:
>> Zend Framework: 1.7.6
>>
>> thanks
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/No-default-module-defined-for-this-application-when-instantiating-Zend_Db%3A%3Afactory-tp22426528p22426725.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>



-- 
Stephen Rees - Valorin
 http://valorin.net/

Hallowed are the Ori!

Reply via email to