# GeoDjango with Oracle Backend

**URL:** <https://forum.djangoproject.com/t/geodjango-with-oracle-backend/28865>\
**Category:** Mystery Errors\
**Created:** [March 8, 2024, 1:53pm UTC](https://forum.djangoproject.com/t/geodjango-with-oracle-backend/28865 "2024-03-08T13:53:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![stevew2511](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/stevew2511/32/19747_2.png) [@stevew2511](https://forum.djangoproject.com/u/stevew2511)\
**Post date:** [March 8, 2024, 1:53pm UTC](https://forum.djangoproject.com/t/geodjango-with-oracle-backend/28865/1 "2024-03-08T13:53:18Z")

</div>

Hello Django users!

Does anybody have experience with geodjango and the rest\_framework\_gis with Oracle as the backend?

I have successfully created an api to ‘see’ the data that has been serialized using the GeoFeatureModelSerializer. Everything works great and appears in the admin page. I can also see the geometry of the data by extending the admin class with the OSMGeoAdmin class.

However if I edit or add a new feature, I get an error as follows:

> # DatabaseError at /admin/api/airport/
> 
> ORA-12801: error signaled in parallel query server P002, instance 1 ORA-06502: PL/SQL: numeric or value error ORA-06512: at “MDSYS.SDO\_CONSTRUCT\_DIM\_ARRAY”, line 33 ORA-06512: at “MDSYS.SDO\_CONSTRUCT\_DIM\_ARRAY”, line 22 ORA-06512: at “MDSYS.SDO\_UTIL”, line 848
> 
> | Request Method: | GET |
> | --- | --- |
> | Request URL: | [http://127.0.0.1:8000/admin/api/airport/](http://127.0.0.1:8000/admin/api/airport/) |
> | Django Version: | 4.2 |
> | Exception Type: | DatabaseError |
> | Exception Value: | ORA-12801: error signaled in parallel query server P002, instance 1 ORA-06502: PL/SQL: numeric or value error ORA-06512: at “MDSYS.SDO\_CONSTRUCT\_DIM\_ARRAY”, line 33 ORA-06512: at “MDSYS.SDO\_CONSTRUCT\_DIM\_ARRAY”, line 22 ORA-06512: at “MDSYS.SDO\_UTIL”, line 848 |
> | Exception Location: | C:\python38\lib\site-packages\django\db\utils.py, line 98, in inner |
> | Raised during: | django.contrib.admin.options.changelist\_view |
> | Python Executable: | C:\python38\python.exe |
> | Python Version: | 3.8.1 |
> | Python Path: | [‘C:\Users\steve\OneDrive\Documents\Work\Django\restDemo\mysite’, ‘C:\python38\python38.zip’, ‘C:\python38\DLLs’, ‘C:\python38\lib’, ‘C:\python38’, ‘C:\Users\steve\AppData\Roaming\Python\Python38\site-packages’, ‘C:\python38\lib\site-packages’] |
> | Server time: | Fri, 08 Mar 2024 13:12:22 +0000 |

When I query the database using SQL Developer I can see that the row has been inserted but there is a problem with the geometry. Below is a JSON output of the feature geometry, which has not been created correctly:

“geometry” : “MDSYS.SDO\_GEOMETRY(NULL, 4326, NULL, NULL, NULL)”

This is how it should look:

“geometry” : “MDSYS.SDO\_GEOMETRY(2001, 4326, MDSYS.SDO\_POINT\_TYPE(-86.9205944444444, 12.7689611111111, NULL), NULL, NULL)”

I have spent hours searching the internet for some clues, but have had no luck. So hopefully someone may be able to help me with my first post on the forum.
