Table does not exist in database


#1

Hello, I have upgraded to Bitnami DreamFactory 2.0.3-0 (64-bit) for Linux. I’m experiencing the same issue issue with this version locally hosted, and SQL Server 2014, when trying to retrieve records from any table. I am getting this message: “Api Error Table does not exist in the database.” However, The API is able to list all tables names. Would you please help me in solving this issue? Thanks


Table doesn't exist in database (2.0 Beta issue w/ sql server)
#2

This is a known issue where DF treats table names as lowercase, which causes the issue you are seeing if your table has capital letters in it. We have developed a fix for this and will be releasing soon. Likely today.


#3

Thank you very much @drewpearce for your fast reply. Could you please tell me where I can find the fix once it is released.


#4

This fix is released – DreamFactory 2.0.4


Instructions for upgrading instances are here: http://wiki.dreamfactory.com/DreamFactory/Installation


#5

Hello @drewpearce
Thank you for this release. It works fine now and solved the issue of database tables.
However, this version is not compatible with Google Chrome. I was able to run it correctly with Firefox, Microsoft Edge.
In Google chrome there is many issues such as drop-down lists is not showing its content. Also Config page is not visualized correctly. Are you aware of this incompatibility? Do I need to create a new topic for this? Thanks


#6

new topic would be best. can you include details about operating system and version and browser version?


#7

Hi @drewpearce,

I’m getting a very similar error when I attempt to create a package for my application including a database schema. I can export the application as long as I don’t include any tables but as soon as I do (even a test table with little content) I get the error (stack trace below). I’m making sure to include the service that creates the schema inside the export.

I’ve already tried upgrading to 2.0.4. I’m running the Bitnami stack on Windows 8.1. The schema I’m attempting to export is in a local MySQL database.

The table “test” mentioned in the below stack trace has only two columns: id (id) and text (text).

Stack trace:

{
“error”: {
“context”: null,
“message”: “Table ‘test/’ does not exist in the database.”,
“code”: 404,
“trace”: [
“0 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\vendor\dreamfactory\df-core\src\Resources\BaseDbSchemaResource.php(497): DreamFactory\Core\SqlDb\Resources\Schema->describeTable(‘test/’, false)”,
“1 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\vendor\dreamfactory\df-core\src\Resources\BaseDbSchemaResource.php(301): DreamFactory\Core\Resources\BaseDbSchemaResource->describeTables(‘test/’, false)”,
“2 [internal function]: DreamFactory\Core\Resources\BaseDbSchemaResource->handleGET()”,
“3 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\vendor\dreamfactory\df-core\src\Components\RestHandler.php(271): call_user_func(Array)”,
“4 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\vendor\dreamfactory\df-core\src\Components\RestHandler.php(177): DreamFactory\Core\Components\RestHandler->processRequest()”,
“5 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\vendor\dreamfactory\df-core\src\Components\RestHandler.php(224): DreamFactory\Core\Components\RestHandler->handleRequest(Object(DreamFactory\Core\Utility\ServiceRequest), ‘’)”,
“6 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\vendor\dreamfactory\df-core\src\Services\BaseDbService.php(116): DreamFactory\Core\Components\RestHandler->handleResource(Array)”,
“7 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\vendor\dreamfactory\df-core\src\Components\RestHandler.php(172): DreamFactory\Core\Services\BaseDbService->handleResource(Array)”,
“8 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\vendor\dreamfactory\df-core\src\Services\BaseRestService.php(65): DreamFactory\Core\Components\RestHandler->handleRequest(Object(DreamFactory\Core\Utility\ServiceRequest), ‘_schema’)”,
“9 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\vendor\dreamfactory\df-core\src\Utility\ServiceHandler.php(99): DreamFactory\Core\Services\BaseRestService->handleRequest(Object(DreamFactory\Core\Utility\ServiceRequest), ‘_schema’)”,
“10 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\vendor\dreamfactory\df-core\src\Utility\Packager.php(686): DreamFactory\Core\Utility\ServiceHandler::handleRequest(‘GET’, ‘cid_data’, ‘_schema’, Array)”,
“11 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\vendor\dreamfactory\df-core\src\Utility\Packager.php(739): DreamFactory\Core\Utility\Packager->packageSchemas()”,
“12 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\vendor\dreamfactory\df-core\src\Resources\System\App.php(43): DreamFactory\Core\Utility\Packager->exportAppAsPackage(true, false)”,
“13 [internal function]: DreamFactory\Core\Resources\System\App->handleGET()”,
“14 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\vendor\dreamfactory\df-core\src\Components\RestHandler.php(271): call_user_func(Array)”,
“15 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\vendor\dreamfactory\df-core\src\Components\RestHandler.php(177): DreamFactory\Core\Components\RestHandler->processRequest()”,
“16 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\vendor\dreamfactory\df-core\src\Components\RestHandler.php(224): DreamFactory\Core\Components\RestHandler->handleRequest(Object(DreamFactory\Core\Utility\ServiceRequest), ‘4’)”,
“17 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\vendor\dreamfactory\df-core\src\Components\RestHandler.php(172): DreamFactory\Core\Components\RestHandler->handleResource(Array)”,
“18 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\vendor\dreamfactory\df-core\src\Services\BaseRestService.php(65): DreamFactory\Core\Components\RestHandler->handleRequest(Object(DreamFactory\Core\Utility\ServiceRequest), ‘app/4’)”,
“19 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\vendor\dreamfactory\df-core\src\Utility\ServiceHandler.php(57): DreamFactory\Core\Services\BaseRestService->handleRequest(Object(DreamFactory\Core\Utility\ServiceRequest), ‘app/4’)”,
“20 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\bootstrap\cache\compiled.php(17653): DreamFactory\Core\Utility\ServiceHandler::processRequest(‘v2’, ‘system’, ‘app/4’)”,
“21 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\bootstrap\cache\compiled.php(17618): DreamFactory\Http\Controllers\RestController->handleService(‘v2’, ‘system’, ‘app/4’)”,
“22 [internal function]: DreamFactory\Http\Controllers\RestController->handleGET(‘v2’, ‘system’, ‘app/4’)”,
“23 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\bootstrap\cache\compiled.php(8873): call_user_func_array(Array, Array)”,
“24 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\bootstrap\cache\compiled.php(8942): Illuminate\Routing\Controller->callAction(‘handleGET’, Array)”,
“25 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\bootstrap\cache\compiled.php(8922): Illuminate\Routing\ControllerDispatcher->call(Object(DreamFactory\Http\Controllers\RestController), Object(Illuminate\Routing\Route), ‘handleGET’)”,
“26 [internal function]: Illuminate\Routing\ControllerDispatcher->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))”,
“27 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\bootstrap\cache\compiled.php(9592): call_user_func(Object(Closure), Object(Illuminate\Http\Request))”,
“28 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\bootstrap\cache\compiled.php(17802): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))”,
“29 [internal function]: DreamFactory\Http\Middleware\AccessCheck->handle(Object(Illuminate\Http\Request), Object(Closure))”,
“30 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\bootstrap\cache\compiled.php(9584): call_user_func_array(Array, Array)”,
“31 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))”,
“32 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\bootstrap\cache\compiled.php(9574): call_user_func(Object(Closure), Object(Illuminate\Http\Request))”,
“33 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\bootstrap\cache\compiled.php(8923): Illuminate\Pipeline\Pipeline->then(Object(Closure))”,
“34 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\bootstrap\cache\compiled.php(8908): Illuminate\Routing\ControllerDispatcher->callWithinStack(Object(DreamFactory\Http\Controllers\RestController), Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), ‘handleGET’)”,
“35 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\bootstrap\cache\compiled.php(7862): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), ‘DreamFactory\\Ht…’, ‘handleGET’)”,
“36 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\bootstrap\cache\compiled.php(7833): Illuminate\Routing\Route->runWithCustomDispatcher(Object(Illuminate\Http\Request))”,
“37 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\bootstrap\cache\compiled.php(7486): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))”,
“38 [internal function]: Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))”,
“39 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\bootstrap\cache\compiled.php(9592): call_user_func(Object(Closure), Object(Illuminate\Http\Request))”,
“40 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))”,
“41 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\bootstrap\cache\compiled.php(9574): call_user_func(Object(Closure), Object(Illuminate\Http\Request))”,
“42 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\bootstrap\cache\compiled.php(7487): Illuminate\Pipeline\Pipeline->then(Object(Closure))”,
“43 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\bootstrap\cache\compiled.php(7475): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))”,
“44 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\bootstrap\cache\compiled.php(7460): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))”,
“45 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\bootstrap\cache\compiled.php(2307): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))”,
“46 [internal function]: Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))”,
“47 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\bootstrap\cache\compiled.php(9592): call_user_func(Object(Closure), Object(Illuminate\Http\Request))”,
“48 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\app\Http\Middleware\AuthCheck.php(170): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))”,
“49 [internal function]: DreamFactory\Http\Middleware\AuthCheck->handle(Object(Illuminate\Http\Request), Object(Closure))”,
“50 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\bootstrap\cache\compiled.php(9584): call_user_func_array(Array, Array)”,
“51 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\vendor\barryvdh\laravel-cors\src\HandleCors.php(34): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))”,
“52 [internal function]: Barryvdh\Cors\HandleCors->handle(Object(Illuminate\Http\Request), Object(Closure))”,
“53 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\bootstrap\cache\compiled.php(9584): call_user_func_array(Array, Array)”,
“54 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\bootstrap\cache\compiled.php(17894): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))”,
“55 [internal function]: DreamFactory\Http\Middleware\FirstUserCheck->handle(Object(Illuminate\Http\Request), Object(Closure))”,
“56 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\bootstrap\cache\compiled.php(9584): call_user_func_array(Array, Array)”,
“57 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\bootstrap\cache\compiled.php(12952): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))”,
“58 [internal function]: Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))”,
“59 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\bootstrap\cache\compiled.php(9584): call_user_func_array(Array, Array)”,
“60 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\bootstrap\cache\compiled.php(11549): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))”,
“61 [internal function]: Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))”,
“62 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\bootstrap\cache\compiled.php(9584): call_user_func_array(Array, Array)”,
“63 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\bootstrap\cache\compiled.php(12689): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))”,
“64 [internal function]: Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))”,
“65 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\bootstrap\cache\compiled.php(9584): call_user_func_array(Array, Array)”,
“66 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\bootstrap\cache\compiled.php(12626): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))”,
“67 [internal function]: Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))”,
“68 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\bootstrap\cache\compiled.php(9584): call_user_func_array(Array, Array)”,
“69 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\bootstrap\cache\compiled.php(2982): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))”,
“70 [internal function]: Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))”,
“71 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\bootstrap\cache\compiled.php(9584): call_user_func_array(Array, Array)”,
“72 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))”,
“73 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\bootstrap\cache\compiled.php(9574): call_user_func(Object(Closure), Object(Illuminate\Http\Request))”,
“74 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\bootstrap\cache\compiled.php(2254): Illuminate\Pipeline\Pipeline->then(Object(Closure))”,
“75 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\bootstrap\cache\compiled.php(2237): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))”,
“76 C:\Bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\public\index.php(53): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))”,
“77 {main}”
]
}
}


#8

Can you look at the readme in C:\Bitnami\dreamfactory-2.0.3\apps\dreamfactory\htdocs\vendor\dreamfactory\df-core and see what version it is?
do the same for …\vendor\dreamfactory\df-sqldb.


#9

Hi Drew,

At the top of the readme for df-core I have:

## DreamFactory Core v0.1.8

The readme in df-sqldb has no version.

They both have a modified date of 2015-12-31 08:00.


#10

df-core should be on 0.1.12
Your update was not successful. Did you use this process? http://wiki.dreamfactory.com/DreamFactory/Installation#Windows


#11

Hi Drew,

I did but it looks like I missed an error when updating the first time. When I run composer.phar install --no-dev I get:

$ c:/Bitnami/dreamfactory-2.0.3-0/php/php.exe composer.phar install --no-dev

Loading composer repositories with package information
Installing dependencies from lock file

  • Updating symfony/http-foundation (v2.7.7 => v2.7.8)

[RuntimeException]
The .git directory is missing from C:\Bitnami\dreamfactory-2.0.3-0\apps\dre
amfactory\htdocs\vendor\symfony\http-foundation, see https://getcomposer.or
g/commit-deps for more information

Am I missing something?


#12

I’m seeing that same error. Let me investigate.


#13

Don’t know what happened when Bitnami was packaging 2.0.3, but it appears this problem exists universally. Here’s my work around:

  1. Make sure you have made a backup of the htdocs folder. If something goes wrong you can copy it back over and revert to the working version.
  2. Delete this folder: C:\bitnami\dreamfactory-2.0.3-0\apps\dreamfactory\htdocs\vendor
  3. Proceed to follow the rest of the upgrade instructions.

edit: I changed this to delete the whole vendor directory because I kept running across this issue in multiple repos.


#14

Hi @drewpearce, hope you had a good weekend.

Thanks for your help so far, I’ve successfully updated after deleting the vendor directory.

Unfortunately it doesn’t seem to have resolved the package export issue. I can export services but as soon as I pick any tables from a MySQL schema I get the above error.

Is it actually necessary to export a schema as part of a package? Will DreamFactory determine schema details if I create a new MySQL service pointing at an existing MySQL database?

I was thinking that as a workaround I could create the MySQL database via other means and simply point a new DreamFactory service at it when I import the package.


#15

Your proposed workaround seems like it should work.

I have not tried to export a package with mixed case/uppercase table name, but I had assumed the fix that applied to other parts of the API would work here. I’ll have to test to verify.


#16

In this case the table I’m exporting is lowercase-only: in order to try and reduce it to the simplest scenario I am just attempting to export table with name “test” and two columns: “id” and “text”. I still get the error.

Is there anything else I can try? It must be something to do with my service configuration if this issues isn’t happening elsewhere.