
I was doing the deployment of data in one database when I got the following error message:
Command output:
dbms_java.grant_permission('TECH_DEP', 'SYS:java.io.FilePermission', '/u01/oracle/techrepo/scripts/*', 'read, write');
*
ERROR at line 4:
ORA-06550: line 4, column 4:
PLS-00201: identifier 'DBMS_JAVA.GRANT_PERMISSION' must be declared
ORA-06550: line 4, column 4:
After some researches, I found that the Oracle Database Java Packages component was invalid in the database as below:
SQL> SET PAGES 2000 SQL> SET LINES 2000 SQL> select comp_name, version, status from dba_registry; COMP_NAME VERSION STATUS --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------ --------------------------------- Oracle Database Catalog Views 19.0.0.0.0 VALID Oracle Database Packages and Types 19.0.0.0.0 VALID Oracle Real Application Clusters 19.0.0.0.0 VALID Oracle XDK 19.0.0.0.0 VALID Oracle Database Java Packages INVALID Oracle XML Database 19.0.0.0.0 VALID Oracle Workspace Manager 19.0.0.0.0 VALID 7 rows selected.
And the documentation that helped to find out it was (Doc ID 397770.1) and (Doc ID 2314363.1). This documentation helps you identify invalid components in the registry of your database and recreate this component in case one of them is with the INVALID status. After the procedure of creating any invalid features again, the output is as below:
set pages 2000
set lines 2000
select comp_name, version, status from dba_registry;
COMP_NAME VERSION STATUS
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------ ---------------------------------
Oracle Database Catalog Views 19.0.0.0.0 VALID
Oracle Database Packages and Types 19.0.0.0.0 VALID
Oracle Real Application Clusters 19.0.0.0.0 VALID
Oracle XDK 19.0.0.0.0 VALID
Oracle Database Java Packages 19.0.0.0.0 VALID
JServer JAVA Virtual Machine 19.0.0.0.0 VALID
Oracle XML Database 19.0.0.0.0 VALID
Oracle Workspace Manager 19.0.0.0.0 VALID
8 rows selected.
SQL> dbms_java.grant_permission('TECH_DEP', 'SYS:java.io.FilePermission', '/u01/oracle/techrepo/scripts/*', 'read, write');
PL/SQL procedure successfully completed.


*The views expressed here are my own and do not represent those of my employer.*
Hello, I’m Bruno — a dual citizen of Brazil and Sweden. I bring a global perspective shaped by experiences in both South America and Europe, with a strong focus on collaboration and innovation across cultures. I am a Computer Scientist, PhD Candidate in Information and Communication Technologies, focusing on Data Science and Artificial Intelligence, and hold dual Master’s degrees in Data Science and Cybersecurity. With over fifteen years of international experience spanning Brazil, Hungary, and Sweden, I have collaborated with global organizations such as IBM, Playtech, and Oracle, as well as contributed remotely to projects across multiple regions. My professional interests include Databases, Cybersecurity, Cloud Computing, Data Science, Data Engineering, Big Data, Artificial Intelligence, Programming, and Software Engineering, all driven by a deep passion for transforming data into strategic business value.