GithubHelp home page GithubHelp logo

Comments (10)

Ocramius avatar Ocramius commented on August 22, 2024

Heya, could you eventually attach the previous exception? "was unable to fetch or create an instance" means some error happened during factory work

from doctrinemodule.

crazystars avatar crazystars commented on August 22, 2024

Hey

i've included a try-catch in the getServiceConfig() in Module.php

public function getServiceConfig() {
        return array (
                'factories' => array (
                        'Zend\Authentication\AuthenticationService' => function ($serviceManager) {

                            try {
                                return $serviceManager->get ( 'doctrine.authentication.orm_default' );
                            } catch (\Exception $e) {
                                do {
                                    var_dump($e->getMessage());
                                } while ($e = $e->getPrevious());
                            }

                        } 
                ) 
        );
    }

but its always the same...

string(121) "Zend\ServiceManager\ServiceManager::get was unable to fetch or create an instance for doctrine.authentication.orm_default"

where can i go from here?? Where should i include another try-catch

from doctrinemodule.

superdweebie avatar superdweebie commented on August 22, 2024

@crazystars I'm not sure what's wrong here. Have you tried stepping through the ServiceManager creation process with your debugger? It should isolate the issue clearly. In particular, if the if fails on ServiceManager.php line 441, then there is something wrong with the ServiceManager config (which you should be able to inspect ServiceManager::config in your debugger).

from doctrinemodule.

texdc avatar texdc commented on August 22, 2024

try "doctrine.authenticationservice.orm_default"

from doctrinemodule.

superdweebie avatar superdweebie commented on August 22, 2024

I think @texdc is on the money. Nice pick up on the typo.

from doctrinemodule.

Ocramius avatar Ocramius commented on August 22, 2024

@texdc does it work now?

from doctrinemodule.

crazystars avatar crazystars commented on August 22, 2024

Hey thx for the response :)
@texdc no it doesn't work for me with "doctrine.authenticationservice.orm_default" in Module.php

@superdweebie i went into my application with xdebug

well the ServiceManager.php on line 411 says,that the $retrieveFromPeeringManagerFirst is false and the config in line 110 is Uninitialized

from doctrinemodule.

crazystars avatar crazystars commented on August 22, 2024

Hey guys it works now :)

i did the follwoing:

i have deleted all my doctrine sources in in the vendor directory and made an update...
i've added the two methods getMail() and getPassword() to my Account-Entity

AND (i think that was the fault) i've set my Core Module before the Application in the application.config

and i have refactored all my module-configs and classes for "doctrine.authenticationservice.orm_default" and something else

it was a strange fight

Thx for your help guys

from doctrinemodule.

texdc avatar texdc commented on August 22, 2024

Yes, I'm using the auth service and it works like a champ. SOOO, much easier than fighting with ZfcUser.

On Oct 31, 2012, at 3:38 AM, Marco Pivetta [email protected] wrote:

@texdc does it work now?


Reply to this email directly or view it on GitHub.

from doctrinemodule.

Ocramius avatar Ocramius commented on August 22, 2024

@texdc ZfcUser is not just authentication ;) Btw, nice to see it's been solved

from doctrinemodule.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.