Using loadjava utility to load a 3rd party jar file

Hi Folks,
    I need to validate if a java class, stored into an Oracle Database, is able to connect to a SQLite database.
    In order to connect to SQLite I'm using the the jar file sqlite-jdbc-3.7.2.jar that I got from  https://bitbucket.org/xerial/sqlite-jdbc/downloads
    Then I tried to load the jar file into Oracle Database using the command:
    loadjava -resolve -user system/xpto@tm014_23 -schema novacap sqlite-jdbc-3.7.2.jar
    The result is a series of error messages with the error code ORA-29533.
    Ex: - Attempt to overwrite class or resource org/sqlite/Codes while defining or compiling SYSTEM.org/sqlite/Codes
    Can you guys help me?
Thanks,
Luis

I need to validate if a java class, stored into an Oracle Database, is able to connect to a SQLite database.
You need to explain that a little more.
How could a java class within Oracle connect to a SQLLite database if the driver it needs isn't already loaded into Oracle.
The fact that you have to load the driver jar file tells you that the class will not be able to connect to SQLLite.
The recommended way to develop with 'Java in the database' is to first write and test the code OUTSIDE the database. Then when it works load it in the databse.
So use a copy of the Java class and test it outside the database to see if it can connect.
Also since 11g you could just load that jar as a 'database resident' jar file. If you don't do that then Oracle just extracts all of the files in the jar and tries to load them one at a time. So using 'resolve' won't work because Oracle isn't going to load the classes in the proper order.
See 'database resident jars' in the Java Dev Guide
http://docs.oracle.com/cd/B28359_01/java.111/b31225/chtwo.htm#BEJCBAHI
Database Resident JARs
Starting with 11g release 1 (11.1), when you load the contents of a JAR into the database, you have the option of creating a database object representing the JAR itself. In this way, you can retain an association between this JAR object and the class, resource, and source objects loaded from the JAR. This enables you to:
  Use signed JARs and JAR namespace segregation in the same way as you use them in standard JVM.
  Manage the classes that you have derived from a JAR while loading it into the database as a single unit. This helps you to prevent individual redefinition of the classes loaded from the JAR. It also enables you to drop the whole set of classes loaded from the JAR, irrespective of the contents or the continued existence of the JAR on the external file system, at the time of dropping it.
In order to load a JAR into the database, you have the following options of the loadjava tool:
  -jarsasdbobjects
  -prependjarnames
For more information regarding the loadjava tool options, refer to "The loadjava Tool" section.

Similar Messages

  • How to make the ear file including the 3rd party jar files without menttion in the System Classpath.

    Hai Sir,
    I am facing one problme in weblogic8.1 while depolying the .EAR FILE.
    Please help me sir.
    Case1)     1) I am using the struts and log4j frameworks and 3rd party jar files with
    weblogic8.1.
         2) I make the ejbs,webapplications and 3rdparty jar files, ear file the following
    dir structure .And i mentioned the Class-path including all jar files in the MANIFEST
    OF EAR FILE.
         While deploying the ear file it is giving following error.If log4j.jar does not
    mention in the Weblogic script file
         java.lang.NoClassDefFoundError: org/apache/log4j/Priority
    at java.lang.Class.getDeclaredFields0(Native Method)
    at java.lang.Class.privateGetDeclaredFields(Class.java:1494)
    at java.lang.Class.getDeclaredFields(Class.java:1073)
    at weblogic.ejb20.deployer.EJBModule.disableImplClassLoader(EJBModule.java:1082)
    at weblogic.ejb20.deployer.EJBModule.setupEJBToImplClassDependencies(EJBModule.jav
    a:982)
    at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:419)
    at weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContainer.j
    ava:2792)
    at weblogic.j2ee.J2EEApplicationContainer.prepareModules(J2EEApplicationContainer.
    java:1478)
    at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:11
    36)
    at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:97
    5)
    at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.prepareCon
    tainer(SlaveDeployer.java:2571)
    at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(Sla
    veDeployer.java:2523)
    at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeploy
    er.java:2453)
    at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer
    .java:820)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:
    536)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java
    :494)
    at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:
    25)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:178)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:151)
    Please provide the soluation without mentioning classpath in the weblogic script
    .How to make the EAR file incliding ejbjar,webapplication and 3rd party jar files.
    Thanks & Regards,
    ASHOK SAMRAT
    [email protected]

    Refer to the section
    Handling Utility classes
    http://dev2dev.bea.com/products/wlserver/articles/musser.jsp
    thanks,
    Deepak
    "Ashok Samrat" <[email protected]> wrote:
    >
    Hai Sir,
    I am facing one problme in weblogic8.1 while depolying the .EAR FILE.
    Please help me sir.
    Case1)     1) I am using the struts and log4j frameworks and 3rd party jar
    files with
    weblogic8.1.
         2) I make the ejbs,webapplications and 3rdparty jar files, ear file
    the following
    dir structure .And i mentioned the Class-path including all jar files
    in the MANIFEST
    OF EAR FILE.
         While deploying the ear file it is giving following error.If log4j.jar
    does not
    mention in the Weblogic script file
         java.lang.NoClassDefFoundError: org/apache/log4j/Priority
    at java.lang.Class.getDeclaredFields0(Native Method)
    at java.lang.Class.privateGetDeclaredFields(Class.java:1494)
    at java.lang.Class.getDeclaredFields(Class.java:1073)
    at weblogic.ejb20.deployer.EJBModule.disableImplClassLoader(EJBModule.java:1082)
    at weblogic.ejb20.deployer.EJBModule.setupEJBToImplClassDependencies(EJBModule.jav
    a:982)
    at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:419)
    at weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContainer.j
    ava:2792)
    at weblogic.j2ee.J2EEApplicationContainer.prepareModules(J2EEApplicationContainer.
    java:1478)
    at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:11
    36)
    at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:97
    5)
    at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.prepareCon
    tainer(SlaveDeployer.java:2571)
    at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(Sla
    veDeployer.java:2523)
    at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeploy
    er.java:2453)
    at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer
    .java:820)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:
    536)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java
    :494)
    at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:
    25)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:178)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:151)
    Please provide the soluation without mentioning classpath in the weblogic
    script
    How to make the EAR file incliding ejbjar,webapplication and 3rd party
    jar files.
    Thanks & Regards,
    ASHOK SAMRAT
    [email protected]

  • Classpath and 3rd party jar files

    We have been searching for a long time and have not been able to find an answer to our question. Do you think that you could help us out?
    We need to include 3rd party jar files in our application. Where in the deployment classpath directory structure can we place these. This does not seem to happen when we publish.
    We also need to give our clients the ability to modify our configuration. Currently we do this with an xml file, which we place under server/config in our JBoss directory. We also need to find a home for out log4J configuration file.
    Where does this type of thing exist in the SAP world?

    We have had problems with 3rd party jar files also. We ended up including them in the WEB-INF/lib directory of our WAR file and packaging/deploying them everytime.
    If you are looking for your project on your server, it is deployed to a directory similar to this:
    /usr/sap/J01/JC00/j2ee/cluster/server0/apps
    Hope this helps.
    Chris

  • How can I include 3rd party jar files with my custom extention?

    I'm writing an extension that is dependent upon some 3rd party jars. How can I include/package these with my extension?
    we're using the 11g tech preview
    thanks,
    Dylan

    Do you mean that you need these files to appear in JDeveloper as a library available for the developers who build a project and use your extension?
    You can create a library in JDeveloper with JAR files by simply adding the following to your extension.xml file:
    <jdeveloper-hook xmlns="http://xmlns.oracle.com/jdeveloper/1013/extension">
    - <libraries xmlns="http://xmlns.oracle.com/jdeveloper/1013/jdev-libraries">
    <library name="My Extension Library">
    <classpath> ${ide.extension.install.home}/lib/some.jar</classpath>
    </library>
    </jdeveloper-hook>

  • How to use 3rd party jar files for xml transform

    Hi all,
    Am using OAS9.0.4 and I deployed my .ear successfully.
    In my application am using 4 jar files for xml transformation. (xerces.jar, xalan.jar, xml-apis.jar,xercesImpl.jar)
    OAS has its own xmlparserv2.jar file. Its using this jar file for transforming xml data and not even looking for above mentioned 4 jar files.
    In opmn.xml, I provided these 4 jar files in to class path. Then also it didn't effect my output.
    I also tried as put these 4 jar files into j2ee\home\applib directory, but o result.
    Can anybody tell me where should I keep these 4 jar files in OAS and OAS should use these 4 jar files instead of its own xmlparserv2.jar for transforming data.
    Thanks in Anticipation,
    Regards,
    RK

    Add the Xbootclasspath variable in the java-options field. It will somewhat look like the following in your opmn.xml file
    <process-type id="<OC4J Instance Name>" module-id="OC4J">
    <module-data>
    <category id="start-parameters">
    <data id="java-options value="........... -Xbootclasspath^/a:<location of your jar files>" />
    Ensure to use th ^/a (append) signature
    Regards,
    Chirag

  • Using 3rd party jar file in WCEM3.0

    Hi,
    I want to get data from an external database into WCEM. Is it possible to use MySQL connector jar for achieving this?
    I used the MySQL connector jar but my guess is, it does not get deployed to the server. It is just visible in my local development.
    When I try to connect to the database I get an error saying "could not find a suitable JDBC driver".
    I need some guidance.
    Regards,

    Hi Steffen,
    As per your suggestion I was able to ping the database manually, but when I try to access it from my code which runs on the server I am getting the exception that I have stated below.
    But if I want to connect to the database dynamically, what then? I am using the MySQL connector jar file for this purpose but on deploying the code to the server I get the error as "Could not find a suitable driver".
    I think the jar file is not getting deployed to the server. Are there any steps that I would have to follow to deploy it?

  • Applets and 3rd party jars

    Hi,
    I'm trying to use a 3rd party jar with an applet. I can access the functions just fine when using an applet viewer, but when I try deploying the applet from a web page I get classNotFound exceptions. How do I go about getting the applet to recognize the jar file?
    Thanks

    Eva, yes, if that class in one of the 3rd party jars wants to access your class directly, then it is necessary that your class is loaded by the same classloader that loads that 3rd party jar or even higher up the classloader hierarchy.
    Why do you consider putting your class library into applib "a bit rude"? As long as your classes are named distinctively so that they will not clash with other classes, it is not a problem.
    On the other hand, it seems that the design of that 3rd party class is not classloader friendly. Had it used something like the following to load a class that is undefined at the compile time, you might not have this problem.
       Class userClass = Thread.currentThread().getContextClassLoader().loadClass(nameOfUserDevelopedClass);
       Object plugin = userClass.newInstance();

  • Pc is not recognising PDF file ( icon ) in emails and to open these it is loading a 3rd party program on the web. I have installed Adobe several times. To open my files I need to drag them to my Adobe program. any ideas??

    Pc is not recognize PDF file ( icon ) in emails and to open these it is loading a 3rd party program on the web. I have installed Adobe several times. To open my files I need to drag them to my Adobe program. any ideas??

    Hi aadeshs
    This problem is on my laptop  running Vista ( Business) on Adobe 10.0  ,   for many years I did NOT have a problem with this . No forum Pages on this. 
    Also i would like to know how screen readers can better interact with PDF as my wife has difficultys on some email attachments on her laptop , again there seems no easy avenue for someone in her situation surfing websites and forums  for Hours maybe ok ok for sighted people, but not if you are blind & use a screenreader.  No Support Help from Adobe is available.
    thanks
    oliver654837

  • Can I use a USB camera with the 3rd party USB camera software and share screens?

    I want to do more than just use a USB camera w/iChat (or ichatusb).  I also need to be able to initiate screen sharing between two computers.  Specifically, I will use iChat with an insight built in camera on my end, and the other person will be using an iMac G5 PPC using a USB camera and the 3rd party USB software for USB ichat support.
    My question then is am I able to request screen sharing (taking over their screen) from my ichat/fw combo to their ichatusb/usb combo?
    thanks
    dc

    Hi,
    The Cameras don't come into this at all.  (But iChat and OS versions do)
    Each end needs iChat 4 or higher.
    Go to the Video menu and Enable Screen Sharing (Selecting toggles a tick On and Off (Tick Present is ON) )
    Highlight Buddy in list and use the Screen Sharing icon at the bottom of the list (interlinked rectangles).
    The G5 could be on Leopard (iChat 4) and be using a  USB 1.1 camera that would need iUSBCam (formerly iChatUSBCam) as well as the Camera manufacturers Software.
    iChat 3 (In Tiger OS 10.4.x) on the G5 with a USB 1.1 camera, Software and iUSBCam may well offer a Screen Sharing option (Or rather Desktop as Video Feed) in the iChat > Video Menu  and that will not work
    However if the G5 has USB 2.0 ports (not the Keyboard additional ports) then if it is up to OS 10.4.9 it can use a UVC Camera for Video Chats  (UVC = USB Video Class No need for Additional Drivers) but Screen Sharing will still be an issue due to the iChat version.
    IF the G5 is still on OS 10.4.x then you will have to use a third Party VNC app at both ends (And run a iChat Audio Chat along side)
    9:33 PM      Friday; September 2, 2011
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb( 10.6.8)
     Mac OS X (10.6.8),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • How to include  3rd Party swc files in my Application

    Hi ,
    I have downloaded , a calendar component namely "kccalendarflex1.4.0beta-4.1.swc" . 
    I want to include this 3rd party swc file in my Application , please suggest me what are the
    steps i need to follow to use it in My Application . 
    Thanks

    1) You have to just copy your swc file into your project libs folder.
    2) Right click on your project and choose properties->Flex Build path->Library Path then click on Add SWC button and choose your swc file and finally hit ok button

  • Problem deploying new version of 3rd party jar

    I have a third party jar file that was recently updated with to a new version. I deleted the old jar file and replaced it with the new version. Modified classpath accordingly. The strange thing is that the only way I could get the classes that use this jar file to work was to recompile them. What am I missing?

    When replacing a jar file it is alway a good idea to recompile against it... this ensures backward compatibity and also prevents Incompatible Class Change Errors. Your new 3rd party jar may not be completely backwards compatible, although it is always a good idea to recompile when implementing a new jar that your application depends on.

  • Signing of 3rd Party jars

    I have developed an app which uses Java Web Start. I created a self signed certificate for now an that works fine.
    What I was wondering about was 3rd party jars. Are they responsible for their own signing if they do system or disk I/O? Do I need to contact the vendor to get a signed version? I don't think I should be signing someone elses archive files.
    I need to run with all permissons set.

    My understanding is that if you sign one jar, you need
    to sign them all (and with the same certificate).This is only true within the the same jnlp file - not within the whole app.
    You can factor out sets of jar files into component extenions (a seperate jnlp file referenced by the original jnlp file.)
    Each component extension can have or not have the all-permissions tag, and if it does, the set of jar files in it can be signed by the same or a diferent certificate chain than the original.
    /Dietz

  • Plz suggest me How to use Third party jar files in ODI

    Hi all,
    I need to know how to use the third party jar files or our own customised jar file in ODI.
    regards
    palash

    Hi all,
    I am unable to implement..................
    I have one question, if I add any type 4 coneection supported jar file in my ODI_CLASSPATH can I use them in writing procedure to connect Databases
    I am trying to connect Oracle database by putting Ojdbc14.jar in the class path of ODI_CLASSPATH so that in my procedure I can use it .............but failed I dont know how to solve this problem.
    another thing Open Tools are delivered as a Java package (.zip or .jar) containing several files:
    A compiled Java .class file
    Other resources, such as icon files is it so ..............Then I can use full java apllication by preparing required bunch of classes and by set them appropriately in open tool
    need ur suggestion....
    regards
    palash

  • Common 3rd Party Jars in an EAR

    Hi
    I have some common 3rd party jars and zips that are accessed by my WARs and EJB
    JARs. Where in my EAR structure do i place them so that these common jars like
    classes12, formulaone etc can be accessed from within my WARs and EJB jars?
    Regards
    Sudhindra

    Just place them at the root level of the .ear and mention them in the
    Class-Path entry of the .war manifest.
    In article <3e701ee8$[email protected]>, [email protected]
    says...
    >
    Hi
    I have some common 3rd party jars and zips that are accessed by my WARs and EJB
    JARs. Where in my EAR structure do i place them so that these common jars like
    classes12, formulaone etc can be accessed from within my WARs and EJB jars?
    Regards
    Sudhindra

  • Question about using third party jar files in Java Web Start Environment

    Hi everybody, I got a very strange problem and still can't figer out how to solve it. Can anyone help to overcome this problem?? Thanks in advance.
    Question: I wrote a simple java swing application to connect to Oracle database. I packed whole my classes and a third party jar file(classes12.jar) to a new jar file named "IRMASSvrMgntGUI.jar" and then use command 'jarsigner' to signed IRMASSvrMgntGUI.jar. There is no problem when I execute 'java -jar IRMASSvrMgntGUI.jar' in the command line. But when I execute this application via Web Start Environment, an "java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver
    " error occured with the following detail log shown in Jave Web Start Console:
    =============================================================
    java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver
         at DBConnection.getNewConnection(DBConnection.java:25)
         at IRMASSvrMgntGUI.actionPerformed(IRMASSvrMgntGUI.java:524)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.AbstractButton.doClick(Unknown Source)
         at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
         at javax.swing.plaf.basic.BasicMenuItemUI$MouseInputHandler.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    ==========================================================================
    contents of the manifest file I used to create this jar file are as follows
    ===================================
    Manifest-Version: 1.0
    Main-Class: IRMASSvrMgntGUI
    Class-Path: classes12.jar
    Created-By: 0.9a (itoh)
    ===================================
    and file structures in "IRMASSvrMgntGUI.jar" is
    ====================================
    META-INF/
    classes12.jar
    DBAuthenticateDialog.class
    DBConnection.class
    IRMASSvrMgntGUI.class
    ====================================

    If you directly include classes12.jar in IRMASSvrMgntGUI.jar, the classloader won't be able to find the classes inside classes12.jar. You should sign classes12.jar separately and include that in jnlp along with your application specific jar. When you're launching your app using "java -jar somefile.jar" then the classpath settings in manifest file are used, but that's not the case when you start using JWS since in this case the classpath is based only on the " <jar href=..." entries in jnlp.

Maybe you are looking for

  • Sales orders due for delivery beyond credit horizon date credit blocked

    Hi           I have given credit horizon date as 1 month . When I create a sales order which has a single item and schedule line with delivery date after 45 days i.e clearly after the horizon date , document is blocked with credit limit block . I am

  • What is the minimum spec for a Macbook Pro to run FCPX?

    I have FCP X installed on my 2009 iMac which has 8Gb of RAM. It works okay, more or less, but I need the portability of a laptop. As cash matters, what is the cheapest Macbook Pro option?  I would boost the RAM to 8gb but what else woud I need? I wou

  • Material product types doesn't show in line item detail

    Good morning, We have a problem with product popup of service order in line items. When we make a click in product ID on the service order search, a popup shows and it displays all products. But if we go to Detail Position Id and do the same, the pop

  • Variant Configuration Issue

    Hi I want to pass one characteristic value description into other characteristic text value, which i am controlling with procedure dependency. Currentely i can able to pass Chars value into other text chars with same value. For examples Char X    01

  • Different cursor issue in CS4 and Window7 x64 Ultimate....

    My first post, as I am frustrated and looking for help. I am seeing  three ghostly cursors (pointing hands or fists), when I mouse-over some choices  in PS4 (11.01, the latest version); like the selections at the bottom of channels or when "transform