symfony2 - Symfony 2.5 MappingException: Class "" is not a valid or mapped super class Error After moving to liver server -



symfony2 - Symfony 2.5 MappingException: Class "" is not a valid or mapped super class Error After moving to liver server -

i have created web application using symfony 2.5. application work on local wamp server when move live godaddy dedicated server gives mappingexception error.

my wampserver settings: wampserver version: 2.2 apache version: 2.4.2 php version: 5.4.3 mysql version: 5.5.24

my godaddy dedicated server settings: os: cent os 6.5 apache version: 2.2.15 php version: 5.4.33 mysql version: 5.5.40

the web application works in wampserver shown in pic below: http://pch.supportsurveys.info/screenshot%20(27).jpg

but shows error after moving live godaddy dedicated server shown in pic below: http://pch.supportsurveys.info/screenshot%20(28).jpg

it shows below error: mappingexception: class "stom\securitybundle\entity\user" not valid entity or mapped super class.

i have done below: registered bundle in appkernel. have set auto_mapping: true in config.yml file there no eaccelerator installed in server

still working. thankful if help or guide me through solution in advance.

' namespace stom\securitybundle\entity; utilize doctrine\orm\mapping orm; utilize symfony\component\security\core\user\advanceduserinterface; utilize doctrine\common\collections\arraycollection; /** * user */ class user implements advanceduserinterface, \serializable { /** * @var integer */ private $id; /** * @var string */ private $firstname; /** * @var string */ private $lastname; /** * @var string */ private $username; /** * @var string */ private $salt; /** * @var string */ private $password; /** * @var string */ private $email; /** * @var boolean */ private $is_active; /** * @var \doctrine\common\collections\collection */ private $roles; public function __construct() { //$this->is_active; //$this->salt = md5(uniqid(null, true)); $this->roles = new arraycollection(); } /** * id * * @return integer */ public function getid() { homecoming $this->id; } /** * set firstname * * @param string $firstname * @return user */ public function setfirstname($firstname) { $this->firstname = $firstname; homecoming $this; } /** * firstname * * @return string */ public function getfirstname() { homecoming $this->firstname; } /** * set lastname * * @param string $lastname * @return user */ public function setlastname($lastname) { $this->lastname = $lastname; homecoming $this; } /** * lastname * * @return string */ public function getlastname() { homecoming $this->lastname; } /** * set username * * @param string $username * @return user */ public function setusername($username) { $this->username = $username; homecoming $this; } /** * username * * @return string */ public function getusername() { homecoming $this->username; } /** * set salt * * @param string $salt * @return user */ public function setsalt($salt) { $this->salt = $salt; homecoming $this; } /** * salt * * @return string */ public function getsalt() { homecoming null; } /** * set password * * @param string $password * @return user */ public function setpassword($password) { $this->password = $password; homecoming $this; } /** * password * * @return string */ public function getpassword() { homecoming $this->password; } /** * set email * * @param string $email * @return user */ public function setemail($email) { $this->email = $email; homecoming $this; } /** * email * * @return string */ public function getemail() { homecoming $this->email; } /** * set is_active * * @param boolean $isactive * @return user */ public function setisactive($isactive) { $this->is_active = $isactive; homecoming $this; } /** * is_active * * @return boolean */ public function getisactive() { homecoming $this->is_active; } public function getroles() { homecoming $this->roles->toarray(); } public function erasecredentials() { } public function serialize() { homecoming serialize(array( $this->id, $this->username, $this->salt, $this->password, )); } public function unserialize($serialized) { list( $this->id, $this->username, $this->salt, $this->password, ) = unserialize($serialized); } public function isaccountnonexpired() { homecoming true; } public function isaccountnonlocked() { homecoming true; } public function iscredentialsnonexpired() { homecoming true; } public function isenabled() { homecoming $this->is_active; } /** * add together roles * * @param \capaa\securitybundle\entity\role $roles * @return user */ public function addrole(\stom\securitybundle\entity\role $roles) { $this->roles[] = $roles; homecoming $this; } /** * remove roles * * @param \capaa\securitybundle\entity\role $roles */ public function removerole(\stom\securitybundle\entity\role $roles) { $this->roles->removeelement($roles); } }

'

below yaml mapping file

' stom\securitybundle\entity\user: type: entity repositoryclass: stom\securitybundle\entity\userrepository table: user id: id: type: integer generator: { strategy: auto } fields: firstname: type: string length: 25 lastname: type: string length: 25 username: type: string length: 25 unique: true salt: type: string length: 60 nullable: true password: type: string length: 60 email: type: string length: 60 unique: true is_active: type: boolean manytomany: roles: targetentity: role inversedby: users'

in config.yml file, add together following:

doctrine: orm: entity_managers: default: mappings: user: type: annotation dir: "%kernel.root_dir%/../src/stom/securitybundle/entity/user" prefix: stom\securitybundle is_bundle: false

this should solve issue. i'm assuming you're using annotations map classes though. in case you're not, utilize xml, yml,php or staticphp depending of case.

symfony2 wamp godaddy

Comments

Popular posts from this blog

java Multi query from Mysql using netbeans -

c# - DotNetZip fails with "stream does not support seek operations" -

c++ - StartServiceCtrlDispatcher don't can access 1063 error -