No Java in Oracle XE
While helping in the forum, I noticed that folks don’t know that Java isn’t deployed with the Oracle 10g XE. However, it strikes me that you might be able to fudge it but I’m not sure that’s allowed in the EULA. If you want Java inside the database, why wouldn’t you install the licensed product?
There was an OTN article that listed three limitations but this wasn’t one in the article. Maybe I’ll run across the marketing note sometime in the furture or somebody will post the URL as a comment, which is always appreciated.
Anyway, the presence or lack of Java inside the database is pretty easy to test. You only need to do this:
SQL*Plus: Release 10.2.0.1.0 - Production ON Thu Nov 26 21:19:42 2009 Copyright (c) 1982, 2005, Oracle. ALL rights reserved. Connected TO: Oracle DATABASE 10g Express Edition Release 10.2.0.1.0 - Production SQL> CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED HelloWorldSQL AS 2 public class HelloWorldSQL { 3 public static String hello() { 4 RETURN "Hello World."; } 5 } 6 / CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED HelloWorldSQL AS * ERROR at line 1: ORA-29538: Java NOT installed |
This is also true for Oracle Database 11g XE, as shown:
SQL*Plus: Release 11.2.0.2.0 Production ON Fri DEC 9 02:34:20 2011 Copyright (c) 1982, 2011, Oracle. ALL rights reserved. Connected TO: Oracle DATABASE 11g Express Edition Release 11.2.0.2.0 - 64bit Production SQL> CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED HelloWorldSQL AS 2 public class HelloWorldSQL { 3 public static String hello() { 4 RETURN "Hello World!"; } 5 } 6 / CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED HelloWorldSQL AS * ERROR at line 1: ORA-29538: Java NOT installed |
It also explains the lack of loadjava or dropjava from the $ORACLE_HOME/bin directory.
“If you want Java inside the database, why wouldn’t you install the licensed product?”
Well the short answer is I have a copy of the licensed product running on my production and test servers… but the DBAs won’t give us access to create our own tables even in test.
So I installed XE on my local machine to try and give myself a sandbox where I could try a few things I want to implement on our system, but need to play with before I can confidently design the tables.
So why do I want java in the DB? Because it’s the only way I’ve been able to find to execute OS commands from within PL/SQL…
Walter
2 Apr 10 at 8:00 am
Walt, I understand the problem but Oracle’s opinion is that’s all they want to give away for free.
maclochlainn
2 Apr 10 at 10:21 pm
Think Bfile and java does not work in Oracle 10G Express
Following found on http://monkeyonoracle.blogspot.com/2009/10/storing-images-outside-oracle-xe-with.html
Toon
13 Sep 10 at 12:32 pm