I'm administering a lot of Oracle DB, and some were created with DBCA, some were cloned from others, some restored from backup and use for testing...So, there are a lot of them, with many different options.
Several of them, developers noticed this error:
ORA-29540: class oracle/spatial/util/Adapters does not exist, when they want to use some Spatial Java class.
Investigating this, I found on Metalink, Note 400982.1, and Note says that if Oracle Spatial is installed, there are not problems with this error, and cause is missing spatial JAVA CLASS objects!
So, to implement the solution, please execute the following steps: (as Note says)
Install the spatial JAVA CLASS objects as follows:
1. Connect to the database via SQL*Plus as AS SYSDBA
SQL> alter session set current_schema=MDSYS;
3. Run sdoloadj.sql:
I solved this problem on a few databases already, and this really works...
But, something else bothers me. If we use this spatial Java class, does loading the Java classes means that we switch to use Oracle Spatial, and thus requiring a valid license ?
In my company, developers uses a lot Oracle Locator, rather than Spatial, because Spatial is a priced option available only with Oracle Enterprise Edition ( quick look the price :-), 17500$/ Processor)
I searched half the internet, but I found nothing except a few sites where people ask the same question ...
Finally, it is not nothing left but with a sword in one hand and the plasma gun in the boot, reach for the ultimate solution: I wrote MetaLink SR :-)
And so, the answer is as follows:
Yes, we can use and install that Spatial Java classes, the SDO Java classes are loaded with a Locator installation. These Java classes do not require a Spatial license to be used!!
This is my first story, and if you like it, I hope there will be more to come ..