-jarasresource option in for loadjava utility. How does it work?

Hi, I have a simple java function I want to load into Oracle DB as java custom function. This I can do no problem when it is so simple it doesn't import any other classes outside of the standard java jre, but when I want to include third party libraries I start hitting the problems.
I would like to load the third party libraries as jar files (in this case common-codec.jar from apache), but can only get this to load without the -jarasresource option i.e where the loadjava utility unpacks all the files in the jar an loads them separately. This just doesn't seem right - surely it would be better to load the jar file as a whole and have it on the class path for my custom class to use.
The problems is thus...
D:\>loadjava -thin -u audit/****@<dbname>:1521:devdb -verbose -force -order -resolve -grant public -s -jarasresource d:\commons-codec-1.3\commons-cod
ec-1.3.jar
arguments: '-thin' '-u' 'audit/****@<dbname>:1521:devdb' '-verbose' '-force' '-order' '-
resolve' '-grant' 'public' '-s' '-jarasresource' 'd:\commons-codec-1.3\commons-codec-1.3.jar'
creating : resource d:/commons-codec-1.3/commons-codec-1.3.jar
loading  : resource d:/commons-codec-1.3/commons-codec-1.3.jar
granting : execute on resource d:/commons-codec-1.3/commons-codec-1.3.jar to public
skipping : resource d:/commons-codec-1.3/commons-codec-1.3.jar
D:\>loadjava -thin -u audit/****@<dbname>:1521:devdb -verbose -force -order -resolve -grant public -s StringPatternEncoder.class
arguments: '-thin' '-u' 'audit/****@<dbname>:1521:devdb' '-verbose' '-force' '-order' '-
resolve' '-grant' 'public' '-s' 'StringPatternEncoder.class'
creating : class uk/police/kent/util/StringPatternEncoder
loading  : class uk/police/kent/util/StringPatternEncoder
granting : execute on class uk/police/kent/util/StringPatternEncoder to public
resolving: class uk/police/kent/util/StringPatternEncoder
errors   : class uk/police/kent/util/StringPatternEncoder
    ORA-29521: referenced name org/apache/commons/codec/language/DoubleMetaphone could not be found
synonym  : uk/police/kent/util/StringPatternEncoder
The following operations failed
    class uk/police/kent/util/StringPatternEncoder: resolution
exiting  : Failures occurred during processingso my questions are
1. did the load of the jar fail in the first command as it said it was skipped?
2. if it didn't fail, how do I reference it when I issue the second command i.e. to resolve using the jar file - do I need to specify a -resolver option (this seems to suggest in the docs that this is how to supply a different 'classpath')
Could example usage of --resolver be given using my example as the ones in docs only give example on ((* SCOTT) (* PUBLIC)) which doesn't mean a lot to me?
also, how do I check the existence of my classes and jar files in the db? I have checked the user_objects view and can see my jar file there, but don't know what schema etc. it is in.
platform
loadjava - windows
db - 10g Linux
be gentle with me - I am a developer and don't usually get involved with db at this level.
Thanks
Conrad
thanks

Hi,
The default resolver spec for SCOTT schema is '{(*SCOTT) (* PUBLIC)}'.
If you want a non-default resolver spec, you have to explictly specify it. Example the following resolver spec will search the SCOTT, OTHER, and PUBLIC schemas:
loadjava -resolve -resolver "((* SCOTT)(* OTHER)(*PUBLIC))" ...Loadjava does not resolve Java resources; the resources objects
are looked up by the Java VM within the scope of the resolver spec of the
referring class. A Java resource can have a “resolver spec” but is only looked up and used during the resolution of the class, which refers to it;
All these are explained in chapter 2 and 3 of my book (see below).
In your case, it looks like you need to explode the jar (without -jarasresource option).
Kuassi
- blog http://db360.blogspot.com/
- book http://db360.blogspot.com/2006/08/oracle-database-programming-using-java_01.html

Similar Messages

  • FOR UPDATE OF how does it work?

    Hi,
    I was wondering what was happening in the databse when a SELECT...FOR UPDATE... is executed. How does Oracle handle this Row Share Table Locks? How does the DB know which rows are locked?
    Thanks for any feedback
    Maurice

    When you do a SELECT ... FOR UPDATE, Oracle locks each row that is returned by the SELECT. The mechanics of locking in Oracle is that the lock bit is actually stored in the row, rather than being centralized in the v$lock table. This allows Oracle to be very scalable and prevents you from worrying about things like lock escalation, but it makes it hard for individual DBA's and developer's to know what rows are locked.
    Justin

  • What is the "Saved Gestures" option in iOS7 for iPad, and how does it work?

    I can't find any guides or tutorials on it anywhere.

    Not helpful at all, but I probably should have been more specific. I'm trying to figure out how to use the custom gestures. Do they do anything more than just trace specific shapes on the screen? For example, can you make a gesture that will open your photos or mail app without having to back out of the app you're in? Or to close the app you're in without using multitasking?

  • Menu Object; MANUAL option. What is this, and how does it work?

    What is this... and, how does it work? Can't find documentation on this.

    My knee-jerk reaction is, "are f'n kidding me?"... but, of course, you're not.
    I must say, that is an incredibly useless option. How would that 'option" differ from simply making a text object (or text/rectangle/image combo or group) and creating a link?
    What got me looking at this option was the hope to find some way to insert a dynamic "field" that could be used on a master page to display the current page title (of a page based on that master). Something similar to Word (and other applications) that you can enter information into a document property and then insert that information anywhere within the document by using a field code for that info. I don't know if there is an HTML code that could be used to accomplish this, in this case. Something that would refer to the page title.
    Thanks for the info none-the-less.

  • I received an oline fax, error message "You are not signed up for an appropriate enhanced pdf delivery option required for this request" How do I fix this?

    I received an oline fax, error message "You are not signed up for an appropriate enhanced pdf delivery option required for this request" How do I fix this?

    Hi howardw93055634,
    Please tell me where you are seeing this error message. It's not one that I'm familiar with as being related to Acrobat or Reader. Is it coming from your online fax service, or does it appear when you try to open the PDF file that you received in Acrobat or Reader?
    Best,
    Sara

  • I got a itunes gift card and when i try and buy some thing it asks me for my credit card details how does that work when i have £15 on my fone that i got on a gift card?

    i got a itunes gift card and when i try and buy some thing it asks me for my credit card details how does that work when i have £15 on my fone that i got on a gift card? as i am trying to buy a song and it is starting to really cheese me of now where it keeps asking for credit card details is there a way round it with out having to use a credit card?

    Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

  • I just bought a WD external HD but it is formated for windows. It says the drive has to be reformatted for Mac. How does one do that?

    I just bought a WD external HD but it is formated for windows. It says the drive has to be reformatted for Mac. How does one do that?

    shldrtothewheel
    http://lmgtfy.com/?q=youre+awesome+

  • Hi i want to send an ipad of a gift to a friend in italy, can it be done? will the wifi and 3g still work? also how does it work for a warrenty?

    hi i want to send an ipad of a gift to a friend in italy, can it be done? will the wifi and 3g still work? also how does it work for a warrenty?

    WiFi will work, cellular will work but they may not be able to access LTE, they will have to send it back to you for the warranty work.

  • The special offer for the printer that is going on with a Mac, how does that work? Is it true i can get a free printer?

    The special offer for the printer that is going on with a Mac, how does that work? Is it true i can get a free printer?

    you pay for it up front, and they give you a rebate or $99, so if you buy a $99 printer from them (Epson Stylus NX430 Small-in-One Color Inkjet Printer $99.95) then the printer becomes free. You can not get this deal unless you also buy a mac with it.

  • Java.util.ProperyPermission does not work for

    Hi again!
    I have some problems with a security.policy file. Its content is provided below:
    grant{
         //Alow the client to connect to any port above 1024
         permission java.net.SocketPermission "*:1024-", "connect";
    permission java.util.PropertyPermission "user.language", "read, write";
    Unfortunately, the java.util.PropertyPermission does not work. I always get the following exception:
    java.security.AccessControlException: access denied (java.util.PropertyPermission user.language write)
    at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
    at java.security.AccessController.checkPermission(AccessController.java:427)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
    at java.util.Locale.setDefault(Locale.java:352)
    at essex.kkarad.cache.daemon.SimplePopulationStrategy.doPopulate(SimplePopulationStrategy.java:41)
    at essex.kkarad.cache.daemon.Populator.run(Populator.java:42)
    Is there any problem with the decleration of the premission? Any ideas?

    Err, this may come as a shock, but it's because you changed the system clock.
    The Timer class works out the absolute time when to next to do something, and when you change the system clock you break that time.
    How much are you changing it by?

  • Iphone fell down and there is a very big dent on the left side. the screen split on both side. can i send it to apple and the repair it for like 160€ or how does it work?

    hi my iphone fell down and there is a very big dent on the left side. the screen split on both side. can i send it to apple and the repair/change it for like 160€ or how does it work?

    Service Answer Center - iPhone - http://support.apple.com/kb/index?page=servicefaq&geo=US&product=iphone  <-- enter correct country in drag-down menu once on page.

  • Outbound Dialer records to cache. how does it work?????

    Im confused, on the campaign manager one of the settings for the campaigns is
    Records to cache.  The Outbound guide says that this is "the minimum number of dialing numbers
    that each dialer caches for each of your outbound option skill groups.  Default is 100"
    how often does it cache?
    how does this work?
    Lets says I have an agent campaign mode:Predictive_Blended,
    Records to cache: 1, everything else default.
    My Admin script is set to cycle every 1 minute.
    does this mean that 1 record get cached every minute?
    thanks

    Hi
    From what I have seen it is the number of records that the dialer fetches from the database at any given moment. The dialer cahches these records and dials them.  As soon as it exausts then it fetches more.
    Victor

  • What is 'mobile account' and how does it work?

    This is a hidden feature in Mac OS Leopard, that I believe require an Leopard Server on the network.
    I have not found it in the regular user interface, but it can be revealed by following the below process:
    1. Go to System Preferences > Accounts
    2. Unlock
    3. Search for mobile account, and press Enter
    4. Wait for the Mobile account options to show up
    What is this feature? How does it work?
    I have found no references to it in the normal documentation.

    Google is your friend:
    "A mobile account is a Mac OS X Server user account that has been copied to a local computer and remains synchronized with the server account so that both locations contain a matching set of data."(Mac OS X Server User Management, p. 46).
    And it has been around since 10.3, so it is not something new to Leopard.
    see: http://www.afp548.com/articles/Panther/mcx2.html

  • ORACLETEXTSEARCH - How Does it work?

    Hi experts,
    I had a many disccusions with my coleagues about ORACLETEXTSEARCH in the UCM11g. We found that we don't undestrand How does it work.
    I have a basic questions:
    1. Does ORACLETEXTSEARCH use only database engine for the indexing?
    2. Can I start fulltext indexing without Oracle UCM? Only by database.
    3. Are some differences between UCM10g and 11g?
    Thank you for the answers and the explanation.
    Martin

    1. Oracle text is a DB tool installed at the DB level, however as others say the triggers to kick it off are done by UCM not independently at the DB. I do not think it could work that way.
    2. No, but other indexing options are available like SES
    3. 10g required a component to be added to the UCM server and required an 11.1.0.7.0 or greater oracle DB. 11g requires no extra component but still has the db requirement.
    SES can be configured to index multiple different repositories (including UCM) and you can control the index rebuilds directly from SES as an option for number 2.

  • The count on "Top Kudoed Authors" seems wildly inaccurate; how does that work?

    Not a biggie, but I see on the main page, and on each sub-page, a block called "top kudoed authors".  The counts and top authors vary between pages, but it is always (seemingly) wrong.  Some "top authors" have only 1 Kudos.  Top "kudo" heavyweights appear like Cicopo, but with only a tiny fraction of their actual scores.  What does this mean/ how does this work?  
    Scott
    Canon 6D, Canon T3i, EF 70-200mm L f/2.8 IS mk2; EF 24-105 f/4 L; EF-S 17-55mm f/2.8 IS; EF 85mm f/1.8; Sigma 35mm f/1.4 "Art"; EF 1.4x extender mk. 3; 3x Phottix Mitros+ speedlites
    Why do so many people say "fer-tographer"? Do they take "fertographs"?

    Hi ScottyP, thanks for posting!   We're sorry for the confusion; we think you might be seeing the "Week" view for kudos.  If you click on the "View All" option right below the leaderboard, you can sort viewable options by several different parameters, including "All Time".  This All Time view should give you a more accurate tally of a user's overall kudos.  We hope this helps!
    Jessica in Support

Maybe you are looking for

  • Rejected password for mail account...

    Hello. How can I remedy this ongoing issue of the Mail program asking for the password multiple times per week? (quite often, I'll have to enter it 20 times in the course of 5 minutes for it to actually get accepted). I'm amazed that this hasn't been

  • Disable overscan

    I just did a clean install of Mountain Lion on my Late 2009 Mini.  I use a 55" TV as the only monitor connected to the Mini and it is overscanning pretty badly.  I do not have the option button to turn off the overscan feature.  There has to be a way

  • State Machine and producer consumer design patterns

    Hi! In my application I am using state machine(for top level VI) and producer consumer(for subVIs) design patterns throught out. If there is no activity on the front panel for 1min then the ideal state is invoked. Following are the situation of the i

  • Procurement part in Investment Project

    Dear Gurus, Our client needs to start a investment project. Pl. give the process for the procurement part in a investment project. Regards, Amol

  • Problems since last security patch with Word loosing connections

    I'm not 100% sure where the problem is, and therefore I'm not 100% sure which thread to post this to but, since the latest security update (about 5 days ago), people around the office have been getting an error in MS Word saying "Word failed reading