Start a new topic

Error when launching object view on Oracle function

[This topic is migrated from our old forums. The original author name has been removed]
[Attachment has been removed.]

I get the following error: An error occurred while executing the database request for: Oracle Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production Oracle JDBC driver 10.2.0.1.0XE Short message: -1 The command that caused the problem: Could not read FUNCTION: GENP_GET_NXT_PRSN_ID Long Message: -1 Details: Type: java.lang.ArrayIndexOutOfBoundsException System Information: Product: DbVisualizer Personal 6.0.10 Build: #1303 (2008/04/10 08:08) Java VM: Java HotSpot(TM) Client VM Java Version: 1.6.0_05 Java Vendor: Sun Microsystems Inc. OS Name: Windows Vista OS Arch: x86 OS Version: 6.0 I am experiencing this problem when I attempt to edit a function that I have loaded into the database. The DDL tab shows the source code but the Object View tab gives the error. The attached file 'dbvis_error.doc' contains a screen shot that shows the error that I received in the Object View window: "An error occurred while performing the operation: -1" I have also attached a copy of the debug output (dbvis_error_log.txt). I successfully ran the last SQL statement from the log in the SQL Commander, so there would appear to be no permissions issues. The error at the end of the log listing seems to indicate a problem with an array index.

[This reply is migrated from our old forums. The original author name has been removed]

Re: Error when launching object view on Oracle function
Further to my previous post, I have identified that the problem occurs only with functions that have a compilation error. I created a simpler function with no errors and it appears correctly in the Object View.
[This reply is migrated from our old forums.]

Re: Error when launching object view on Oracle function
Hi Paul, Can you please try this with the Early Access version: http://www.minq.se/products/dbvis/eap/index.jsp We have changed the stored procedure editor feature quite a bit in that version, so hopefully this problem is solved as a side-effect. Thanks, Hans
[This reply is migrated from our old forums. The original author name has been removed]
[Attachment has been removed.]

Re: Error when launching object view on Oracle function
Hi Hans, Same error. See below: An error occurred while executing the database request for: Oracle Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production Oracle JDBC driver 10.2.0.1.0XE Short message: 1 The command that caused the problem: Could not read FUNCTION: GENP_GET_NXT_PRSN_ID Long Message: 1 Details: Type: java.lang.ArrayIndexOutOfBoundsException System Information: Product: DbVisualizer Personal 6.1.1.2 Build: #1304 (2008/04/10 22:40) Java VM: Java HotSpot(TM) Client VM Java Version: 1.6.0_05 Java Vendor: Sun Microsystems Inc. OS Name: Windows XP OS Arch: x86 OS Version: 5.1 I did, however, observe that the error did not occur if I created a new (simple) function with a deliberate compile error embedded in it. I am wondering whether it has something to do with the kind of function I have been trying to modify. I have attached a copy of the code that is causing the grief. It is a function that returns a student_id with an attached check-digit. The function obtains the id from a sequence that is set up to start at, say, 800000. The resulting number is checked against the existing PERSON table to make sure it doesn't already exist. To make the function work you would need to set up the sequence and the PERSON table, but for the purposes of this exercise the absence of these objects should just report as compile errors. - Paul L.
[This reply is migrated from our old forums.]

Re: Error when launching object view on Oracle function
Hi Paul, Thanks for sending the code for the function. I can reproduce the problem now and I'm looking for a solution. Best Regards, Hans
[This reply is migrated from our old forums.]

Re: Error when launching object view on Oracle function
Hi Paul, I have found what causing the problem and a fix that will be included in the next EA version. For your info, there was two things. Your function declaration looks like this: create or replace FUNCTION -- VERINFO ===================================== -- VERINFO Release: TEST41 -- VERINFO genp_get_nxt_prsn_id.fnc -- VERINFO PL/SQL source code for SIS_OWNER -- VERINFO Generated 27-FEB-2002 12:09:12 -- VERINFO ===================================== GENP_GET_NXT_PRSN_ID( p_person_id OUT NUMBER , p_message_num OUT NUMBER ) RETURN BOOLEAN IS [...] The newlines between "FUNCTION" and the name, plus the lack of a space between the name and the parameter list, caused our parsing code to fail. Something like this works until the new version is available: CREATE OR REPLACE FUNCTION HR.GENP_GET_NXT_PRSN_ID -- VERINFO ===================================== -- VERINFO Release: TEST41 -- VERINFO genp_get_nxt_prsn_id.fnc -- VERINFO PL/SQL source code for SIS_OWNER -- VERINFO Generated 27-FEB-2002 12:09:12 -- VERINFO ===================================== ( p_person_id OUT NUMBER , p_message_num OUT NUMBER ) RETURN BOOLEAN IS [...] Kind Regards, Hans