Opened 11 years ago
Closed 5 years ago
#5083 closed defect (wontfix)
OCI driver Error ORA-21301 not initialized in object mode
Reported by: | gtmapping | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | closed_because_of_github_migration |
Component: | OGR_SF | Version: | 1.10.0 |
Severity: | normal | Keywords: | OCI, Oracle |
Cc: | ilucena |
Description
http://trac.osgeo.org/gdal/browser/trunk/gdal/ogr/ogrsf_frmts/oci/ogrocisession.cpp
In the above linked file the OCIEnvironment is being initialized in OCI_DEFAULT mode on some if statements. this causes error ORA-21301 when trying to load spatial data into oracle database with views (not tables) listed in the oracle metadata table. i belive because it thinks its not going to be deailing with objects it switches to a if statement where it only has OCI_DEFAULT. if no spatial views in database then driver works fine.
you can launch the session handshake in bot OIC_DEFAULT mode and OCI_OBJECT mode as listed on line 139 of ogrocisession.cpp. if the object component isn't used it doesn't cause any harm... just a object cache that is unused.
so can someone please change lines listed below to have OCI_DEFAULT replaced with
OCI_DEFAULT | OCI_OBJECT
93 147 216 251
-Regards Shaun
Change History (5)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
i get the same message for each view in the database (ORA-04043) and it would aprea that it dosent stop it because it doesn't stop till it get to ORA-21301
and i can run it fine on oracle 11g express edition but doing the same process on oracle 11g enterprise i get the ORA-21301 message.
i tested using the same permitions as the user i use on express edition and as a user with absolutly every administrator permition as dba. with same results
when i investigated the ORA-21301 message all i could find was oracle application developers saying its because the sessions was initialized in OCI_DEFAULT mode and not OCI_OBJECT mode. checking the source for the ORG_OCI.dll driver i found a few if statements that only use OCI_DEFAULT mode.
so i assumed it was the ORA-04043 error making it go to one of the other if statements that only has OCI_DEFAULT mode...
the process creates the table name, fields and field types for the table but it doesn't insert any data into that table.
i tried this on already having the table created in the database as well but to no avail.
so as i said i have no problem using the same commands on 11g express edition but it wont work on 11g enterprise.
Actual Error ORA-21301: not initialized in object mode in OCIObjectNew(elem_info)
-regards Shaun
comment:3 by , 11 years ago
Version: | 1.9.0 → 1.10.0 |
---|
comment:4 by , 11 years ago
Cc: | added |
---|---|
Component: | default → OGR_SF |
Summary: | OCI driver error when existing spatail views in metadata table → OCI driver Error ORA-21301 not initialized in object mode |
comment:5 by , 5 years ago
Milestone: | → closed_because_of_github_migration |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub. If you believe this ticket is still valid, you may file it to https://github.com/OSGeo/gdal/issues if it is not already reported there.
What exactly fails for you? I have spatial views in Oracle and I do get errors like this ERROR 1: ORA-04043: Object ...._VIEW does not exist in OCIDescribeAny.
However, despite of those messages I have not experienced problems with creating new tables or appending data to existing ones with ogr2ogr.