Hi Isaac

I am was having the same issue. The DoctrineMongoDBBundle tries to inject 
the non-existing service `doctrine_mongodb.odm.conn1_configuration` into 
your MongoDB connection `doctrine_mongodb.odm.conn1_connection`. The 
configuration services are named after your document_managers. So, it seems 
that you have to name your document_managers and connections the same, 
although I did not see mentioned this anywhere in the documentation. It 
solved the issue for me.

Regards
Manuel

On Monday, March 25, 2013 9:13:54 PM UTC+1, Ariel Isaac wrote:
>
> I just want to be able to access 2 differents databases, I want to access 
> to documents from database called "videosStore" and "musicStore" which are 
> 2 different databases.
>
>  I write this configuration to config.yml
>
> doctrine_mongodb:
>   default_document_manager: dm2
>   default_connection: conn2
>   connections:
>     conn1:
>       server: mongodb://localhost:27017
>       options:
>         connect: true
>     conn2:
>       server: mongodb://localhost:27017
>       options:
>         connect: true
>   document_managers:
>     dm1:
>       connection: conn1
>       metadata_cache_driver: xcache
>     dm2:
>       connection: conn2
>       metadata_cache_driver: apc   
>
> but I get this error:
> Whoops, looks like something went wrong. 
> 1/1 ServiceNotFoundException: The service 
> "doctrine_mongodb.odm.conn1_connection" has a dependency on a non-existent 
> service "doctrine_mongodb.odm.conn1_configuration". 
>
> I hope you can help me.
>
> Regards,
> Ariel
>
> On Mon, Mar 25, 2013 at 3:13 PM, Jasper N. Brouwer <[email protected] 
> <javascript:>> wrote:
>
>> Hi Ariel,
>>
>> What exactly is the setup? Replication? Sharding? Or just 2 databases 
>> each containing their own content?
>>
>> What have you tried exactly? Maybe show us some configuration?
>>
>> And most important: What did the error say?
>>
>> --
>> Jasper N. Brouwer
>>
>>
>>
>> On 25-03-2013, at 19:27, Ariel Isaac <[email protected] <javascript:>> 
>> wrote:
>>
>> > Hi everybody, I would want to know how to configure 2 different mongodb 
>> databases connections with mongodb-odm. I have tried after view some pages 
>> like 
>> http://jwage.com/post/30490170860/doctrine-mongodb-object-document-mapper-in-symfony2
>>  
>> but it doesnt work and an error is raised by symfony.
>> >
>> > Could you help me please ?
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "doctrine-user" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at http://groups.google.com/group/doctrine-user?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to