小编zii*_*web的帖子

类..Entity\User不是有效实体或映射超类

我尝试清除缓存时遇到此错误(例如):

[Doctrine\ORM\Mapping\MappingException]类Aib\PlatformBundle\Entity\User不是有效实体或映射超类.

这是User.php:

<?php
// src/Aib/PlatformBundle/Entity/User.php

namespace Aib\PlatformBundle\Entity;

use FOS\UserBundle\Entity\User as BaseUser;
use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity
 * @ORM\Table(name="fos_user")
 */
class User extends BaseUser
{
    /**
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;

    public function __construct()
    {
        parent::__construct();
        // your own logic
    }

}
Run Code Online (Sandbox Code Playgroud)

这是User.php存储的地方:

javier @javier:〜/ programacion/aib/src/Aib/PlatformBundle/Entity $ ls User.php UserRepository.php

这是AppKernel.php:

public function registerBundles()
{
    $bundles = array(
        ...
        new Aib\PlatformBundle\AibPlatformBundle(),
        ...
    );
Run Code Online (Sandbox Code Playgroud)

sf 2.0.4

symfony

5
推荐指数
2
解决办法
1万
查看次数

尝试调用用户检查操作时出错:"您必须配置要处理的检查路径..."

请求"app_dev.php/login_check"我收到此错误:

"您必须使用安全防火墙配置中的form_login配置防火墙处理的检查路径."

这些是我的文件:

security.yml

security:
    encoders:
        Symfony\Component\Security\Core\User\User: plaintext

    role_hierarchy:
        ROLE_ADMIN:       ROLE_USER
        ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN,
ROLE_ALLOWED_TO_SWITCH]

    providers:
        chain_provider:
            providers: [in_memory, fos_userbundle]

        in_memory:
            users:
                user:  { password: userpass, roles: [ 'ROLE_USER' ] }
                admin: { password: adminpass, roles:
[ 'ROLE_ADMIN' ] }
        fos_userbundle:
            id: fos_user.user_manager

    firewalls:
        main:
            pattern: ^/
            form_login:
                provider: chain_provider
                check_path: /login_check
                default_target_path: /chat

            logout:
                path:   /logout
                target: /
            anonymous:    true
            switch_user:  true
        dev:
            pattern:  ^/(_(profiler|wdt)|css|images|js)/
            security: false

    access_control:

        - { path: ^/_wdt/, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/login$, …
Run Code Online (Sandbox Code Playgroud)

symfony

5
推荐指数
1
解决办法
7906
查看次数

GWT/StockWatcher:无法连接服务器

我正在按照StockWatcher app的步骤操作.在Eclipse中运行应用程序后,我得到一个URL(http://127.0.0.1:8888/StockWatcher.html?gwt.codesvr=127.0.0.1:9997),显示:

http://code.google.com/webtoolkit/doc/1.6/tutorial/images/CreateStarterApplication.png

我在字段中插入我的名字,但是我收到此错误:

尝试联系服务器时发生错误.请检查您的网络连接,然后重试.

我在Eclipse中获得了这个输出:

Initializing App Engine server
   [WARN] ********************************************************
There is a new version of the SDK available.
-----------
Latest SDK:
Release: 1.6.0
Timestamp: Tue Oct 18 01:46:22 CEST 2011
API versions: [1.0]

-----------
Your SDK:
Release: 1.5.5
Timestamp: Sat Oct 08 03:15:30 CEST 2011
API versions: [1.0]

-----------
Please visit http://code.google.com/appengine for the latest SDK.
********************************************************

Nov 15, 2011 5:24:37 PM com.google.apphosting.utils.jetty.JettyLogger info
INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
Nov 15, 2011 5:24:37 PM …
Run Code Online (Sandbox Code Playgroud)

gwt google-app-engine

5
推荐指数
1
解决办法
7715
查看次数

StockWatcher:将内容翻译成德语时出错

我正在关注国际化章节.完成将内容翻译为德语的步骤后,当我尝试在浏览器中加载页面时出现此错误:

11:26:27.142 [ERROR] [stockwatcher] Error while executing the JavaScript provider for property 'locale'
com.google.gwt.core.client.JavaScriptException: (TypeError): Property 'locale' of object  is not a function
    at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:248)
    at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269)
    at com.google.gwt.dev.shell.ModuleSpacePropertyOracle.computePropertyValue(ModuleSpacePropertyOracle.java:193)
    at com.google.gwt.dev.shell.ModuleSpacePropertyOracle.getSelectionProperty(ModuleSpacePropertyOracle.java:130)
    at com.google.gwt.i18n.rebind.LocaleUtils.getInstance(LocaleUtils.java:85)
    at com.google.gwt.i18n.rebind.LocaleInfoGenerator.generate(LocaleInfoGenerator.java:101)
    at com.google.gwt.core.ext.GeneratorExtWrapper.generate(GeneratorExtWrapper.java:48)
    at com.google.gwt.core.ext.GeneratorExtWrapper.generateIncrementally(GeneratorExtWrapper.java:60)
    at com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:647)
    at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:41)
    at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:78)
    at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:268)
    at com.google.gwt.dev.shell.ShellModuleSpaceHost.rebind(ShellModuleSpaceHost.java:141)
    at com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:585)
    at com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:455)
    at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:49)
    at com.google.gwt.core.client.GWT.create(GWT.java:97)
    at com.google.gwt.i18n.client.LocaleInfo.<clinit>(LocaleInfo.java:37)
    at com.google.gwt.user.client.ui.HasHorizontalAlignment.<clinit>(HasHorizontalAlignment.java:123)
    at com.google.gwt.user.client.ui.VerticalPanel.<init>(VerticalPanel.java:31)
    at com.google.gwt.sample.stockwatcher.client.StockWatcher.<init>(StockWatcher.java:29)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:525) …
Run Code Online (Sandbox Code Playgroud)

gwt internationalization

5
推荐指数
1
解决办法
1722
查看次数

只是尝试安装/配置symfony2

我刚刚与供应商一起下载了一个symfony2(sf 2.0.12),当我转到 http://foo.localhost/config.php时,我收到以下消息:

Welcome! Welcome to your new Symfony project. This script will guide you through the basic configuration of your project. You can also do the same by editing the ‘app/config/ parameters.ini’ file directly.
- Configure your Symfony Application online
- Bypass configuration and go to the Welcome page
- Re-check configuration
Run Code Online (Sandbox Code Playgroud)

然后我点击"配置您的Symfony .."我得到这个:

InvalidConfigurationException:必须配置路径"fos_user"处的子节点"db_driver".

对你来说一样吗?

编辑:

此外,appKernel或autoload文件中的FOSUserBundle以及vendor文件夹中没有任何内容.无论如何,我在下面的app/config/config.yml文件中添加了以下行:

fos_user:
    db_driver: orm
    firewall_name: main
Run Code Online (Sandbox Code Playgroud)

但错误是一样的.

symfony

5
推荐指数
1
解决办法
9779
查看次数

如何在ubuntu统一中删除MySQL Workbench 5.2?

我刚刚下载了.deb并安装了它.有用.现在我想卸载它.

我试过了:

  • sudo apt-get删除mysql-workbench,但它说"E:无法找到包mysql-workbench".
  • 转到软件管理器,但它不在已安装的应用程序之间.
  • 再次执行.deb,但它没有提供卸载它的选项.

我安装后重新启动电脑.

任何的想法?

哈维尔.

mysql mysql-workbench ubuntu-11.04

5
推荐指数
4
解决办法
3万
查看次数

doctrine2:在一对多的双向关系中,如何从反面保存?

我有下面的一对多双向关系.

使用symfony2任务生成crud操作后,当我尝试在新/编辑类别表单中保存与类别关联的产品时,产品不会保存...

namespace Prueba\FrontendBundle\Entity;

use Gedmo\Mapping\Annotation as Gedmo;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;

/**
 * @ORM\Entity
 * @ORM\Table(name="category")
 */
class Category
{

    /**
     * @var integer $id
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @ORM\OneToMany(targetEntity="Product", mappedBy="category")
     */
    protected $products;

    /**
     * @ORM\Column(name="name")
     */
    protected $name;

    public function __construct()
    {
        $this->products = new ArrayCollection();
    }

    public function getId()
    {
        return $this->id;
    }

    public function getName()
    {
        return $this->name;
    }

    public function setName($name)
    {
        $this->name …
Run Code Online (Sandbox Code Playgroud)

php doctrine symfony doctrine-orm

5
推荐指数
1
解决办法
1万
查看次数

在本地计算机中安装主题.我应该需要FTP数据连接吗?

我刚刚第一次在我的localhost上安装了wordpress.

我想安装一个主题,它询问我的FTP用户名和密码.

它说:"要执行请求的操作,WordPress需要访问您的Web服务器.请输入您的FTP凭据以继续.如果您不记得您的凭据,您应该联系您的网站主机."

我想知道wp是否通常直接安装在生产Web服务器中,或者它是否可以先安装在本地机器上......我该怎么办?

wordpress

5
推荐指数
2
解决办法
2905
查看次数

关于BS 3中的@ grid-float-breakpoint变量

在Boostrap 3文档中,我发现了这个:

自定义折叠点

根据导航栏中的内容,您可能需要更改导航栏在折叠模式和水平模式之间切换的点.自定义@ grid-float-breakpoint变量或添加您自己的媒体查询.

我可以@grid-float-breakpointmain.css文件中定义变量,还是应该生成新的自定义boostrap?

css twitter-bootstrap

5
推荐指数
1
解决办法
9280
查看次数

git:我的提示中显示“ am / rebase”,该怎么办?

我不知道自己有什么“触摸”,但现在在提示下有:

(master|AM/REBASE)

我该怎么办?

git

5
推荐指数
1
解决办法
2801
查看次数