473,385 Members | 1,655 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

ServiceManager::get was unable to fetch or create an instance

132 100+
I have project in zend framework 2 and Doctrine 2 and i generated the Entity for the two data base and copy in one Entity of My Project
when i want to generate the entity doctrine and zend 2 from two data bases i get this errors:config/autoload/local.php : i have this Error:

Zend\ServiceManager\ServiceManager::get was unable to fetch or create an instance for doctrine.entitymanager.orm_alternative on line 122:

ine 122: i have this $entityManager =
Expand|Select|Wrap|Line Numbers
  1. $this->getServiceLocator()
  2.         ->get('doctrine.entitymanager.orm_alternative');
config/autoload/local.php
Expand|Select|Wrap|Line Numbers
  1. return array(
  2. 'doctrine' => array(
  3.     'connection' => array(
  4.         // default connection name
  5.         'orm_default' => array(
  6.             'driverClass' => 'Doctrine\DBAL\Driver\PDOMySql\Driver',
  7.             'params' => array(
  8.                 'host'     => 'localhost',
  9.                 'port'     => '3306',
  10.                 'user'     => 'root',
  11.                 'password' => '',
  12.                 'dbname'   => 'data1',
  13.                 'charset' => 'utf8', 
  14.                 'driverOptions' => array(
  15.                         1002=>'SET NAMES utf8'
  16.                 ),
  17.             ),
  18.  
  19.                 // Alternative DB connection
  20.                 'orm_alternative' => array(
  21.                         'driverClass' => 'Doctrine\DBAL\Driver\PDOMySql\Driver',
  22.                         'params' => array(
  23.                                 'host'     => 'localhost',
  24.                                 'port'     => '3306',
  25.                                 'user'     => 'root',
  26.                                 'password' => '',
  27.                                 'dbname'   => 'data2',
  28.                                 'charset' => 'utf8', 
  29.                                 'driverOptions' => array(
  30.                                          1002=>'SET NAMES utf8'
  31.                                          ),
  32.                         ),
  33.                 ),
  34.  
  35.                 // Entity Manager instantiation settings
  36.                 'entitymanager' => array(
  37.                         'orm_default' => array(
  38.                                 'connection'    => 'orm_default',
  39.                                 'configuration' => 'orm_default',
  40.                         ),
  41.                         'orm_alternative' => array(
  42.                                 'connection'    => 'orm_alternative',
  43.                                 'configuration' => 'orm_alternative',
  44.                         ),
  45.                 ),
i have 2 data bases and one Entity contains all tables

how can i resolved that

Thanks in advance
Apr 9 '16 #1
0 1405

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: MKoleoso | last post by:
Problem: C#- Unable to create instance of a class implementing from an interface I have: namespace someNamespace { public __gc class SomeClass1 { }
3
by: James Proctor | last post by:
Hi there, im brand new to ASP. Ive done loads of VB coding and one of my clients is intrested in a web based application, so im trying to play on and learn it a tad. However im comming across lots...
4
by: wardellcastles | last post by:
I am running SQLServer 2000 SP3 with MDAC 2.8. On instances created via MSDE, I am unable to create the first step in a job. Instances created with SQLServer 2000, this problem does not occur....
2
by: Jim | last post by:
All of a sudden I am unable to create tables or add columns to existing tables if I specify CHARACTER greater than 254. If I try I get the following error: DB21034E The command was processed as...
1
by: soni29 | last post by:
hi, i'm running windows 2000 and Internet Information Services 5.0, that's the version that the help file for iis shows, i'm using Visual Studio ..Net 2002 (version 7) but whenever i try to create...
0
by: SampathTangudu | last post by:
Hi, We are trying to use the Hash Tables for passing information from one aspx page to another aspx page. We are using the below code. IsolatedStorageFile isoStore =...
3
by: purkka | last post by:
Hi I replaced a Win 2000 Adv server to the Win 2003 Std with Front Page Server Extension and .Net Framework 2.0. FPSE is extended to Default Web Site. Visual Studio 2005: If I create a new web...
2
by: ashishjainism | last post by:
I am unable to install my windows service and the installutil is throwing the following error: Running a transacted installation. Beginning the Install phase of the installation. See the...
3
by: whizkid3030 | last post by:
I am creating web projects in MS-VS-2003, however when i publish to the virtual server configured as an IIS instance, the copy project option of VS-2003 is giving me a msg like. "unable to create...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.