Comments (9)
Can you set the environment variable DPI_DEBUG_LEVEL=7 when building your driver? That will show the references and their types as well as which functions are being called. That should help track down what is happening here. At least I hope so!
from odpi.
ODPI: fn dpiPool_create(0x2340b60)
ODPI: ref 0x235dec0 (dpiPool) -> 1 [NEW]
ODPI: fn dpiPool_setTimeout(0x235dec0)
ODPI: fn dpiPool_setStmtCacheSize(0x235dec0)
ODPI: fn dpiPool_acquireConnection(0x235dec0)
ODPI: ref 0x23f64c0 (dpiConn) -> 1 [NEW]
ODPI: ref 0x235dec0 (dpiPool) -> 2
ODPI: fn dpiConn_prepareStmt(0x23f64c0)
ODPI: ref 0x23f6630 (dpiStmt) -> 1 [NEW]
ODPI: ref 0x23f64c0 (dpiConn) -> 2
ODPI: fn dpiStmt_execute(0x23f6630)
ODPI: fn dpiStmt_getBindCount(0x23f6630)
ODPI: fn dpiStmt_execute(0x23f6630)
ODPI: fn dpiStmt_getRowCount(0x23f6630)
ODPI: fn dpiStmt_release(0x23f6630)
ODPI: ref 0x23f6630 (dpiStmt) -> 0
ODPI: ref 0x23f64c0 (dpiConn) -> 1
ODPI: fn dpiPool_acquireConnection(0x235dec0)
ODPI: ref 0x23f6540 (dpiConn) -> 1 [NEW]
ODPI: ref 0x235dec0 (dpiPool) -> 3
ODPI: fn dpiStmt_execute((nil))
ODPI: fn dpiStmt_execute((nil))
ODPI: fn dpiConn_getObjectType(0x23f64c0)
ODPI: fn dpiStmt_release((nil))
ODPI: fn dpiConn_rollback(0x23f6540)
ODPI: fn dpiPool_acquireConnection(0x235dec0)
ODPI: ref 0x23f6610 (dpiConn) -> 1 [NEW]
ODPI: ref 0x235dec0 (dpiPool) -> 4
ODPI: fn dpiConn_prepareStmt(0x23f6610)
ODPI: ref 0x2486ba0 (dpiStmt) -> 1 [NEW]
ODPI: ref 0x23f6610 (dpiConn) -> 2
ODPI: fn dpiStmt_execute(0x2486ba0)
ODPI: fn dpiStmt_getBindCount(0x2486ba0)
ODPI: fn dpiStmt_execute(0x2486ba0)
ODPI: fn dpiStmt_getRowCount(0x2486ba0)
ODPI: fn dpiStmt_release(0x2486ba0)
ODPI: ref 0x2486ba0 (dpiStmt) -> 0
ODPI: ref 0x23f6610 (dpiConn) -> 1
--- FAIL: TestObject (1.32s)
conn.go:147: msg="PrepareContext" shortcut="--GET_OBJECT_TYPE--"
stmt.go:235: msg="QueryContext" args=[]driver.NamedValue{driver.NamedValue{Name:"", Ordinal:1, Value:"test_pkg_obj.int_tab_typ"}}
z_test.go:710: ORA-04043: DPI-1002: invalid dpiStmt handle
getObjectType("test_pkg_obj.int_tab_typ") conn=0x23f64c0
gopkg.in/goracle%2ev2.(*conn).GetObjectType
/home/gthomas/src/gopkg.in/goracle.v2/obj.go:165
gopkg.in/goracle%2ev2.(*statement).QueryContext
/home/gthomas/src/gopkg.in/goracle.v2/stmt.go:237
database/sql.ctxDriverStmtQuery
from odpi.
I'll try a database/sql
-free, "as direct as possible" call.
from odpi.
Ok, a more direct call (without the dance to get a dpiConn from database/sql.Conn):
! go install && go test -run=ObjectD
ODPI: fn dpiPool_create(0x2596b30)
ODPI: ref 0x25b3e90 (dpiPool) -> 1 [NEW]
ODPI: fn dpiPool_setTimeout(0x25b3e90)
ODPI: fn dpiPool_setStmtCacheSize(0x25b3e90)
ODPI: fn dpiPool_acquireConnection(0x25b3e90)
ODPI: ref 0x264c470 (dpiConn) -> 1 [NEW]
ODPI: ref 0x25b3e90 (dpiPool) -> 2
ODPI: fn dpiConn_prepareStmt(0x264c470)
ODPI: ref 0x264c5e0 (dpiStmt) -> 1 [NEW]
ODPI: ref 0x264c470 (dpiConn) -> 2
ODPI: fn dpiStmt_execute(0x264c5e0)
ODPI: fn dpiStmt_getRowCount(0x264c5e0)
ODPI: fn dpiStmt_release(0x264c5e0)
ODPI: ref 0x264c5e0 (dpiStmt) -> 0
ODPI: ref 0x264c470 (dpiConn) -> 1
ODPI: fn dpiConn_getObjectType(0x264c470)
ODPI: fn dpiConn_prepareStmt(0x264c470)
ODPI: ref 0x264c4f0 (dpiStmt) -> 1 [NEW]
ODPI: ref 0x264c470 (dpiConn) -> 2
ODPI: fn dpiStmt_execute(0x264c4f0)
ODPI: fn dpiStmt_getRowCount(0x264c4f0)
ODPI: fn dpiStmt_release(0x264c4f0)
ODPI: ref 0x264c4f0 (dpiStmt) -> 0
ODPI: ref 0x264c470 (dpiConn) -> 1
--- FAIL: TestObjectDirect (0.22s)
obj_test.go:67: ORA-04043: object test_pkg_obj.tab_typ does not exist
getObjectType("test_pkg_obj.tab_typ") conn=0x264c470
gopkg.in/goracle%2ev2.(*conn).GetObjectType
/home/gthomas/src/gopkg.in/goracle.v2/obj.go:165
gopkg.in/goracle%2ev2.TestObjectDirect
where
CREATE OR REPLACE PACKAGE test_pkg_obj IS
TYPE int_tab_typ IS TABLE OF PLS_INTEGER INDEX BY PLS_INTEGER;
TYPE rec_typ IS RECORD (int PLS_INTEGER, num NUMBER, vc VARCHAR2(1000), c CHAR(1000), dt DATE);
TYPE tab_typ IS TABLE OF rec_typ INDEX BY PLS_INTEGER;
END;
So, maybe I misunderstood, and GetObject(Type) can NOT manage types defined only in PL/SQL packages, only types resident in the DB (created by CREATE TYPE)?
from odpi.
Hmm, looking at your error message again, it looks like you have part of ORA-4043 (object does not exist) with a DPI error message. Is it possible the error isn't being caught properly?
from odpi.
So, maybe I misunderstood, and GetObject(Type) can NOT manage types defined only in PL/SQL packages, only types resident in the DB (created by CREATE TYPE)?
It can support types defined in PL/SQL packages, but only if you are running 12.1 or higher on both the database and on the client. If you have 11.2 anywhere in the equation it won't work.
from odpi.
Ah, I see. Though I use Instant Client 12.1, my db is 11.2.
Thanks for the clarification, and sorry for the noise!
from odpi.
No problem. Glad to be of help. :-)
from odpi.
Note to self: We need to doc these things better
from odpi.
Related Issues (20)
- XMLTYPE as "real" XML HOT 3
- Ability to set OCI_ATTR_LOBPREFETCH_SIZE HOT 7
- "ORA-03106: fatal two-task communication protocol error" when CLOB is fetched as strings and then lob locators HOT 3
- core dumps generated in libclntsh when timeouts are configured HOT 10
- Any plan to support Apple's M1 plat? HOT 1
- Is there a reference example dequeue message with message ID dequeue option HOT 9
- When ODPI tries to translate a variable to a temporary LOB, and there is inadequate TEMP tablespace, ODPI segfaults when the cursor is closed HOT 6
- M1 Mac issue ( incompatible architecture) HOT 2
- How to use ODPI-C with Oracle Times Ten? HOT 9
- Column Alias Error HOT 7
- Add an option to convert numbers between double and decimal in the same way as node.js, python3, ruby, rust or so HOT 5
- Oracle Rust driver HOT 2
- Option to get json float as float. It is got as double now. HOT 8
- Bytes after nul in members of dpiXid are zeroed. HOT 2
- Is DPI_TPC_END_SUSPEND an undocumented flag in the OCI manual? HOT 3
- dpiEnqOptions_setVisibility and dpiLob_getType are listed not in round_trips.rst HOT 2
- Get column name for position HOT 2
- `dpiStmt_execute` with `DPI_MODE_EXEC_PARSE_ONLY` will create a table. HOT 4
- Retrieving CLOB from an OUT parameter of an Store Procedure HOT 1
- ERROR: DPI-1047: Cannot locate a 32-bit Oracle Client library HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from odpi.