Symfony2 warning - 从现有数据库生成实体类

Here's the issue - I am trying to generate entities classes from an existing database, but I am getting the following warning:

 [Symfony\Component\Debug\Exception\ContextErrorException]
 Warning: SimpleXMLElement::addAttribute(): string is not in UTF-8

Is there any solution for this problem? Or maybe another method to generate the entities classes from an existing database?

I had the same problem, it was because one column name(an attribute) has a special character so I revolved it removing that character.

When Doctrine creates a "orm.xml definition"(each one for every table) the column names are mapped to an "attribute" of xml (called column) and this is the reason because it use the SimpleXMLElement::addAttribute() function.