473,549 Members | 2,719 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

132 New Member
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\ServiceMan ager\ServiceMan ager::get was unable to fetch or create an instance for doctrine.entity manager.orm_alt ernative 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 1419

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

Similar topics

1
14898
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
2650
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 of problems. Up until now ive managed to sort most of them, but now im strugling. When i run my application i keep getting this. Server Error in...
4
2101
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. The message I am receiving on the instances created with MSDE, the message I get immediately upon pressing the Add button to define a step is...
2
11257
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 an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: SQL0604N The length, precision,...
1
2102
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 an asp.net project i get an error. here is what i do: Click Create Project For Location type: http://localhost/5040/WebApplication1 5040 is...
0
3093
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 = IsolatedStorageFile.GetStore( IsolatedStorageScope.User | IsolatedStorageScope.Assembly |IsolatedStorageScope.Domain , null, null );
3
2392
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 by VS2005 installed on my server, no problem, but if i try to do same remotely using http, I got "Unable to create the Web...
2
12783
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 contents of the log file for the d:\practice in .net\mywindowsservice\mywindowsservice\mywindowsservice\bin\practiceservice.exe assembly's progress. The...
3
1896
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 web project. The filepath "x" doesnt correspond to the URL, http://www.xxx.com, the two need to map to the same server location. Any advise ?
0
7520
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7450
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7720
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7809
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6043
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5368
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5088
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3500
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3481
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.