invalid object for describe

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
valentl
Posts: 16
Joined: Wed 22 May 2013 06:15

invalid object for describe

Post by valentl » Thu 12 Dec 2019 08:16

Hello,
Can I get more information about this error message?
When I try to execute a stored procedure, which is invalid, and cannot be validated, I cannot get any information about that object.

for example Defsession.Execproc('updateemp',[]) I get ORA-24372: invalid object for describe, and nothing more.

Where can I catch the statement, which is executed, or prepared?
on the session.onerror event, I can find nothing.

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: invalid object for describe

Post by MaximG » Fri 13 Dec 2019 12:10

Do you use our product in OCI Mode or Direct Mode? Is 'updateemp' the name of a procedure or a synonym? Please send us the DDL script for creating 'updateemp'.

valentl
Posts: 16
Joined: Wed 22 May 2013 06:15

Re: invalid object for describe

Post by valentl » Sat 14 Dec 2019 13:37

I use OCI mode.

The 'updatetemp' is only a sample.
In some circumstances, somethimes procedures are in invalid state, and cannot be validated, for example, parameters of an other procedure has changed.
At this time, if you try to call it from ODAC, you get this error message, and nothing more.

create or replace procedure somethingwrong as
begin
end;
/

If you try to execute it with
DefSession.ExecProc('somethingwrong',[]);

you will get
ORA-24372: invalid object for describe

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: invalid object for describe

Post by MaximG » Mon 16 Dec 2019 13:31

The error ORA-24372 is returned by the Oracle server, not our components. If you would like to get more information about the error in addition to the error message "invalid object for describe", you may contact Oracle support.

valentl
Posts: 16
Joined: Wed 22 May 2013 06:15

Re: invalid object for describe

Post by valentl » Tue 17 Dec 2019 07:15

Of course, I know, that there is no more information in the error message, but, is it possible to get any information about the current statement, which caused the problem?
Somewhere, in the Orasession?
I tried to check the SQL and OraSQL property of the Orasession, but these properties are empty.

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: invalid object for describe

Post by MaximG » Tue 24 Dec 2019 17:49

To construct a complete SQL statement for running your stored procedure, we have to describe its parameters, but we can't do that because the server returns the error discussed here and we can't affect this behavior in any way.

valentl
Posts: 16
Joined: Wed 22 May 2013 06:15

Re: invalid object for describe

Post by valentl » Mon 30 Dec 2019 10:34

Of course, it is obvious.
My only problem is, that I cannot see, what is the statement, that failed.
If the procedure does not exists, it is not a problem, because I get
ORA-04043: object somethingwrong does not exist

But, as I see, even the dbMonitor does not helps me to find the invalid object, becuase the statement is not monitored, but the error appears at the previous SQL statement. Which, of course, executed without errors.
This is the Delphi code:
osn_piramis.Open;
with TOraQuery.Create(Application) do
try
SQL.Text:='select * from dual';
Open;
Close;
finally
Free;
end;

DefSession.ExecProc('somethingwrong',[]);

This is the db Monitor log.

c:\temp\Project64.exe (host: LSO62-VALENTL.lsoft.hu)
2019. 12. 30. 11:25:59 n/a ODAC monitoring is started Complete
2019. 12. 30. 11:26:00 1,000 Connect: pir2019_meo@fejleszt11n [osn_piramis$B8B71384]
Complete
2019. 12. 30. 11:26:02 0,093 SQL Execute [$062BB1A0] : select * from dual
Complete
2019. 12. 30. 11:26:02 0,016 Object destroyed: TOraQuery ($062BB1A0)Error: ORA-24372: invalid object for describe

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: invalid object for describe

Post by MaximG » Wed 08 Jan 2020 10:19

As we mentioned earlier, the error discussed here occurs when you try to describe parameters while a SQL statement for executing the DefSession.ExecProc method has not been built yet.
Therefore, you only see information about the error returned by the Oracle server in the logs of the dbMonitor tool, and no information about the database object or what causes the error is available in the logs.
Please clarify what solution you suggest and what additional information you'd like to get in dbMonitor?

valentl
Posts: 16
Joined: Wed 22 May 2013 06:15

Re: invalid object for describe

Post by valentl » Wed 08 Jan 2020 10:43

Thank you for the answer.
Of course, I understand the problem, the SQL statement to be executed, is not built yet, but an error occurs.
My problem is, that it is not enough information to me, to start the investigation.

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: invalid object for describe

Post by MaximG » Thu 09 Jan 2020 14:07

Please clarify what information you expect from our data access components in this case?

valentl
Posts: 16
Joined: Wed 22 May 2013 06:15

Re: invalid object for describe

Post by valentl » Thu 13 Feb 2020 11:38

Hello,

Any information would help.
I've found a "hack".
I wrote a class helper for the EDaError, and I see, that the component property in this case is TORASQL.
This OraSQL component has an FStoredProcName field, which contains the stored procedure name, which I want to execeute, but due to the invalid state, it fails.
I will use this fstoredprocname to make the error message more clear.

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: invalid object for describe

Post by MaximG » Fri 14 Feb 2020 17:21

We are glad that you found a necessary solution. Please don't hesitate to contact us with questions concerning ODAC usage.

Post Reply