Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Empty package <package name> definition (no public members)

I'm facing an issue when trying to run or debug a package where Oracle SQL Developer doesn't display public members (procedures) that don't have input parameters.

There is a couple of procedures, some overloads, but Oracle SQL Developer doesnt display no invoke-able members.

enter image description here

I've tried with following versions of Oracle SQL Developer

  • 4.1.1.19 link to article saying this version solves the issue, but it didn't
  • 4.0.3.16 - same behavior
  • 4.0.0.13 - same behavior
  • 3.2.20.09 - this version actually displayed invokable members, but debugger doesnt work.

This is the Oracle version :

select * from v$version;

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
PL/SQL Release 11.2.0.4.0 - Production
"CORE   11.2.0.4.0  Production"
TNS for IBM/AIX RISC System/6000: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 - Production

Has anyone successfully resolved similar situation and how? (Upgrading database is not an option atm)

like image 377
Mladen Oršolić Avatar asked Sep 15 '15 07:09

Mladen Oršolić


People also ask

Can SQL packages be anonymous?

Anonymous Blocks. An anonymous block is a PL/SQL program unit that has no name. An anonymous block consists of an optional declarative part, an executable part, and one or more optional exception handlers. The declarative part declares PL/SQL variables, exceptions, and cursors.

What is package body explain with example?

Package BodyIt consists of the definition of all the elements that are present in the package specification. It can also have a definition of elements that are not declared in the specification, these elements are called private elements and can be called only from inside the package.

What is refer cursor in different package?

The specification is the interface to the package. It declares the types, variables, constants, exceptions, cursors, and subprograms that can be referenced from outside the package. The body defines the queries for the cursors and the code for the subprograms.

What is package in Plsql?

A PL/SQL package is a named collection of functions, procedures, variables, cursors, user-defined types, and records that are referenced using a common qualifier, the package name.


2 Answers

A bit late, but i could help. There is a SqlDeveloper bug. What I have to do is to "Save" it before Compile it...

Hope it helps

like image 53
Diego Avatar answered Sep 16 '22 12:09

Diego


I found 2 possible cause that may cause the no public member problem

1) SQL Developer hit some kind of bugs itself. This can be resolved by completely close and restarting the SQL developer

2) Some keywords used in your codes (e.g. field name in SQL statements) that works fine in compiled execution , but would ruin the display of function list.

I resolved my problem by applying double quote to the entire packages where a field named “CASE” is used.

i.e. SELECT table1.case FROM table1

change to

SELECT table1."CASE" FROM table1

Alex

like image 34
Alex Ma Avatar answered Sep 20 '22 12:09

Alex Ma