ORA-00904: "GET_JAVA_PROPERTY": invalid identifier - 11gR2

by aymanzone   Last Updated July 12, 2019 21:06 PM

In Oracle DB 11.2.0.4, linux 6.7 single instance

select get_java_property('java.version') from dual;

SQL> show user
USER is "SYS"
SQL> select get_java_property('java.version') from dual;
select get_java_property('java.version') from dual
       *
ERROR at line 1:
ORA-00904: "GET_JAVA_PROPERTY": invalid identifier

I can't find anything on this ORA-00904: "GET_JAVA_PROPERTY": invalid identifier, anyone know why this happens?

This works fine

SQL> SELECT  dbms_java.get_ojvm_property(PROPSTRING=>'java.version') FROM dual;

DBMS_JAVA.GET_OJVM_PROPERTY(PROPSTRING=>'JAVA.VERSION')
--------------------------------------------------------------------------------
1.6.0_191

SQL> 

thanks



Answers 1


Well, you found it somehow, didn't you?

It was never part of the database officialy, it is just some custom function you can find on the Internet. For example: https://stackoverflow.com/questions/28164252/how-to-check-jdk-version-in-oracle

create function get_java_property(prop in varchar2)
return varchar2 is
language java name 'java.lang.System.getProperty(java.lang.String) return java.lang.String';
Balazs Papp
Balazs Papp
July 12, 2019 21:04 PM

Related Questions



How to create oracle user for more than one version

Updated April 29, 2015 21:02 PM

UNZIP .dmp file in Linux Server

Updated April 11, 2017 22:06 PM

sqlplus (Oracle XE) doesn't start on CentOS 7

Updated June 28, 2015 13:02 PM