Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Loading Java jars into database

Re: Loading Java jars into database

From: Vladimir M. Zakharychev <vladimir.zakharychev_at_gmail.com>
Date: 9 Jan 2007 23:13:06 -0800
Message-ID: <1168413186.112598.137280@p59g2000hsd.googlegroups.com>

Luch wrote:
> I've been reading/trying to learn about loading Java to run in the
> database... I've seen examples of loading classes or java source into
> the database, but nothing on jar files... Is it also possible to load a
> JAR file into the database?
>
> In my case, I want to load the Apache FOP processor jar files and all
> it's dependent jar to be called from within the database (as a stored
> proc). The Apache fop jar has a main method i can invoke. I figure I
> can maybe wrap the fop jar with all it's dependent ones, load it into
> the database, and try to invoke it. Is that feasible?

People are using FOP loaded into the database successfully, so it's certainly feasible. Use loadjava utility and load the extensions required by FOP first, then FOP itself. loadjava works the same regardless if you tell it to load single class or a JAR archive - it will simply extract all classes from a JAR and load them one by one, optionally resolving them on the way (with -resolve command line switch.)

It is highly recommended that you create a separate schema for FOP and load all JARs into this schema, not into SYS or SYSTEM schema. JAVAUSERPRIV role will need to be granted to the schema owner.

Hth,

    Vladimir M. Zakharychev
    N-Networks, makers of Dynamic PSP(tm)     http://www.dynamicpsp.com Received on Wed Jan 10 2007 - 01:13:06 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US