Ver Mensaje Individual
  #6 (permalink)  
Antiguo 08/03/2013, 08:41
wilmer30
 
Fecha de Ingreso: enero-2010
Mensajes: 491
Antigüedad: 14 años, 10 meses
Puntos: 12
Respuesta: Error usando Doctrine 2.1.7

Estoy usando la integración oficial de Doctrine, la estructura que uso es esta

application
- library
-- bin
---- doctrine
---- doctrine.php
-- Bisna
-- Application
---- Resource
------ Doctrine.php
-- Doctrine
---- Container.php
-- Exception
-- Doctrine
---- Common
---- DBAL
---- ORM
---- Symfony
-- Doctrine
modifiqué bootstrap.php
Código PHP:
Ver original
  1. class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
  2. {
  3.     public function _initAutoloaderNamespaces()
  4.     {
  5.         require_once APPLICATION_PATH . '/../library/Doctrine/Common/ClassLoader.php';
  6.  
  7.         $autoloader = \Zend_Loader_Autoloader::getInstance();
  8.         $fmmAutoloader = new \Doctrine\Common\ClassLoader('Bisna');
  9.         $autoloader->pushAutoloader(array($fmmAutoloader, 'loadClass'), 'Bisna');
  10.     }
  11.  
  12. }
y configs/application.ini
Cita:
includePaths.library = APPLICATION_PATH "/../library"


bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"

pluginPaths.Bisna\Application\Resource\ = "Bisna/Application/Resource"

autoloaderNamespaces[] = Bisna
autoloaderNamespaces[] = Application\Entity

appnamespace = "Application"

resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
resources.frontController.params.displayExceptions = 0


resources.doctrine.classLoader.loaderClass = "Doctrine\Common\ClassLoader"
resources.doctrine.classLoader.loaderFile = APPLICATION_PATH "/../library/Doctrine/Common/ClassLoader.php"

resources.doctrine.classLoader.loaders.doctrine_co mmon.namespace = "Doctrine\Common"
resources.doctrine.classLoader.loaders.doctrine_co mmon.includePath = APPLICATION_PATH "/../library/Doctrine/Common"

resources.doctrine.classLoader.loaders.doctrine_db al.namespace = "Doctrine\DBAL"
resources.doctrine.classLoader.loaders.doctrine_db al.includePath = APPLICATION_PATH "/../library/Doctrine/DBAL"

resources.doctrine.classLoader.loaders.doctrine_or m.namespace = "Doctrine\ORM"
resources.doctrine.classLoader.loaders.doctrine_or m.includePath = APPLICATION_PATH "/../library/Doctrine/ORM"

resources.doctrine.classLoader.loaders.symfony_con sole.namespace = "Symfony\Component\Console"
resources.doctrine.classLoader.loaders.symfony_con sole.includePath = APPLICATION_PATH "/../library/Doctrine/Symfony/Component/Console"

resources.doctrine.classLoader.loaders.symfony_yam l.namespace = "Symfony\Component\Yaml"
resources.doctrine.classLoader.loaders.symfony_yam l.includePath = APPLICATION_PATH "/../library/Doctrine/Symfony/Component/Yaml"
cuando ejecuto 'php doctrine' me arroja este mensaje:

Warning: require(C:\xampp\htdocs\libro2\application/../library/Doctrine/Symfony/
Component/Console\Symfony\Component\Console\Application.php) : failed to open str
eam: No such file or directory in C:\xampp\htdocs\libro2\library\Doctrine\Common
\ClassLoader.php on line 148

Fatal error: require(): Failed opening required 'C:\xampp\htdocs\libro2\applicat
ion/../library/Doctrine/Symfony/Component/Console\Symfony\Component\Console\Appl
ication.php' (include_path='C:\xampp\htdocs\libro2\application/../library;C:\xam
pp\htdocs\libro2\library;.;C:\xampp\php\library;C: \xampp\php\PEAR') in C:\xampp\
htdocs\libro2\library\Doctrine\Common\ClassLoader. php on line 148

imagino que los paths no están bien, pero quisiera saber donde más tendría que arregar estas rutas.

gracias