Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8909171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T03:21:54+00:00 2026-06-15T03:21:54+00:00

I am trying to get data from a table with Doctrine 2 in a

  • 0

I am trying to get data from a table with Doctrine 2 in a Symfony2 application. Code that works on my development machine throws an error when deployed to a production server. Here is one of my controllers.

public function listEntitiesAction($entity, Request $request)
{       
    $repository = $this->getDoctrine()->getRepository('AALCOInventoryBundle:' . $entity);
    $metadata = $this->getDoctrine()->getEntityManager()->getClassMetadata('AALCOInventoryBundle:' . $entity);
    $dataTable = new Datatable( $request->query->all(), $repository, $metadata, $this->getDoctrine()->getEntityManager());  
    $dataTable->makeSearch();   
    $view = $this->view($dataTable->getSearchResults(), 200)
            ->setFormat('json');
    return $this->get('fos_rest.view_handler')->handle($view);
}

The above code works on a linux server in my local development machine. One of the entities, is as follows.

<?php
namespace AALCO\InventoryBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
 * AALCO\InventoryBundle\Entity\Uom
 *
 * @ORM\Table(name="uoms")
 * @ORM\Entity
 */
class Uom
{
    // entity stuff
}

I have default settings for doctrine on config.yml and this is the error.

request: ErrorException: Warning: class_parents() [<a href='function.class-parents'>function.class-parents</a>]: Class AALCO\InventoryBundle\Entity\uom does not exist and could not be loaded in 
/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/RuntimeReflectionService.php line 40 (uncaught exception) at 
/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/RuntimeReflectionService.php line 40

Running php app/console doctrine:mapping:info returns OK for all the entities. I’ve checked other answers on SO for this type of error and none match my specific problem.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T03:21:56+00:00Added an answer on June 15, 2026 at 3:21 am

    Symfony2 uses autoloading to load files with classes. When you ask for uow class it looks for uow.php file. File names are case sensitive on a linux server , so uow.php and Uow.php are different files.

    You’ll need to add some sort of map or use ucfirst function on $entity.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to get some data from a table, where the tag has no
Now, I am trying to get the top 10 data from the table through
I'm trying to get character data from www.wowarmory.com using PHP and cURL. The code
I am trying to get data from a specific column in a database table
I'm trying to get the very last table data row. I have this code:
I'm trying to get around pulling all the data from a table, and cycling
I am trying to get column data from sqlLite DB and put that data
I am trying to get data from my sql server data table to a
I have a problem trying to get data from a table (via entity) using
I am trying to get data from Excel File to DataTable. Here's my code-snippet

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.