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.

Similar Messages

  • 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

  • Using Third-Party jar file in database; Where to put license file?

    Hi!
    I have a third-party product that has a .jar file that references some .so files. I have successfully loaded the .jar file and the .so files are being called successfully, but when the program gets to the part where it reads the third-party license file, it is failing (ORA-3113 and an hs_err_pid<12345>.log and udump file are created. I know the issue is the location of the license file because I am getting the same exact error when I run it outside of the database. (I have been able to run it successfully outside of the database.)
    The instructions for the third-party product say to put the license file in the application's runtime directory.
    What I can't figure out is this: What is the application's runtime directory when I am running the code in the database?
    I thought it would be user.dir which is set to $ORACLE_HOME, but putting the license file there didn't work. I have tried lots of other places under $ORACLE_HOME.
    Any ideas?
    Thanks,
    Laurel

    Hi Laurel:
    Whether or not you can read the license file, sure you will have problem then when trying to load your .so file.
    Java JNI call are not allowed inside OJVM for security reasons, see Kuassi's answer to a similar question:
    Access Berkeley DB from Java Stored Procedure
    Best regards, Marcelo.

  • OSGI bundle creation using third party jar files

    Hi,
    I have a requirement to integrate our CQ5.5 based application with a third party. As part of this, I have to use some jar files. After lot of digging, I realised that the way to use external jar files is to create an OSGI bundle wrapping these jar files.
    So, I tried to do the same, but when I see the service details in system/console, I see errors. Can someone please suggest what could have gone wrong?
    I have to use 3 jar files. So, I placed them in lib folder as shown in the screenshot below.
    Ibuilt the bundle using .bnd file. It generated a jar file in install folder and I am able to to see its details in system/console/bundles. When I try to view details of the OSGI bundle that is installed, I see errors as follows:

    Here is my bnd file with all directives:
    Export-Package: *
    Import-Package: *
    Private-Package: *
    # Include-Resource:
    Bundle-Name: External Jar OSGI
    Bundle-Description: This OSGI bundle contains external jar file
    Bundle-SymbolicName: com.self.learning.externaljarosgi
    Bundle-Version: 1.0.0-SNAPSHOT
    Bundle-Activator: com.self.learning.osgi.oauth.Activator
    And here is what is shown in systems/console/bundle:
    Imported Packagesjavax.crypto from org.apache.felix.framework (0)
    javax.crypto.spec from org.apache.felix.framework (0)
    javax.servlet from cqse-httpservice (21)
    javax.servlet.http from cqse-httpservice (21)
    net.oauth -- Cannot be resolved
    net.oauth.client -- Cannot be resolved
    net.oauth.client.httpclient3 -- Cannot be resolved
    net.oauth.client.httpclient4 -- Cannot be resolved
    net.oauth.server -- Cannot be resolved
    net.oauth.signature -- Cannot be resolved
    org.apache.commons.codec.binary from org.apache.commons.codec (46)
    org.apache.commons.httpclient from com.day.commons.osgi.wrapper.commons-httpclient (77)
    org.apache.commons.httpclient.methods from com.day.commons.osgi.wrapper.commons-httpclient (77)
    org.apache.http -- Cannot be resolved
    org.apache.http.client -- Cannot be resolved
    org.apache.http.client.methods -- Cannot be resolved
    org.apache.http.entity -- Cannot be resolved
    org.apache.http.impl.client -- Cannot be resolved
    org.apache.http.params -- Cannot be resolved
    org.apache.http.util -- Cannot be resolved
    org.osgi.framework from org.apache.felix.framework (0)
    org.slf4j from slf4j.api (11)
    Regarding Export-Package, I know the function, class and its package I need to use. Would it be fine if I just export that package instead of using '*'? In such case, if this has dependency on some function in one of the 4 jar files I need to use, how does it get resolved? Do I need to Export those packages as well?

  • Problems with the ActiveX bridge for Java beans when using third-party .jar

    I encountered the following problem when using the ActiveX bridge for a java bean:
    I am using JDK 1.4.2_09 and MS Visual Basic 6.0 (SP6). I wrote a java bean called ProcessViewer (my class ProcessViewer inherits from JComponent and implements the interfaces Serializable and AdjustmentListener) which I would like to use within a VB 6.0 application. I used the ActiveX bridge (packager.exe) to generate a DLL (ProcessViewer.dll) and registered it successfully. The java bean GUI-control works fine within my VB 6.0 application unless my java bean (ProcessViewer.jar) uses any third-party .jar files.
    But when I tried to add a reference to some third-party class (com.sap.xxx.xxx....) I got some problems. I could solve the problem with packager.exe by setting the correct CLASSPATH. But at runtime my VB 6.0 application does not work. It crashes or it reports an error like this: "The control ... could not be loaded from axbridge.dll" (although I deployed my .jar file correctly to the directory C:\Programme\Java\j2re1.4.2_09\axbridge\bin and lib). Setting the CLASSPATH environment variable before calling my VB 6.0 application (exe) did not solve the problem.
    How can I teach my VB 6.0 application (containing the Java bean ActiveX control) where to find the third-party .jar file? Copying the third-party .jar file to the JRE lib-folder or to the axbridge\lib folder did not solve the problem either.
    I studied the documentation about the ActiveX bridge given at:
    http://java.sun.com/j2se/1.4.2/docs/guide/beans/axbridge/developerguide/index.html
    but I am missing informations on how the third-party .jar files can be found during runtime of the ActiveX container (e. g. a VB 6.0 application).

    See how to solve your problem with JNI:
    http://codeproject.com/cpp/OOJNIUse.asp
    More examples (for SWING) in tools setup:
    http://www.simtel.net/product.php[id]95126[SiteID]simtel.net
    http://www.simtel.net/product.php[id]94368[SiteID]simtel.net
    http://www.simtel.net/product.php[id]93174[SiteID]simtel.net

  • Unable to access classes in third party jar files packaged with my ejb.jar

    I have packaged some third party jar files in my xxx_ejb.jar file.  The third party jar file contains classes that are accessed by some custom classes which are in turn accessed by my bean classes.  I get the following error when my custom classes attempt to use any of the classes in one of the third party jar files:
    java.lang.NoClassDefFoundError: com/Ostermiller/util/CSVParser
    Shouldn't I be able to access classes in jar files that are packaged with my xxx_ejb.jar file?  I see the xxx_ejb.jar file as a resource of the application classloader that contains it but I don't see the third party jar files.

    As per the Java EE specification, additional JAR files should be packaged on the EAR level. Only WAR files' WEB-INF/lib folder is scanned for JAR files to be added to the classloader.

  • How to include third party .jar files into my jar file

    Hi,
    how do i include a open source third party jar file into an executable jar?
    i have a class called BlogBox.java and it uses org.apache.commons.net.ftp.FTPClient, i want to create an executable file, where do i put the .jar file containing FTPClient aka Apache Commons Net?
    currently i'm getting the following error from when executing my BlogBox.jar
    C:\MyJava\BlogBox>java -jar BlogBox.jar
    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/net/ftp/FTPClient
    at blogbox.BlogBox.<init>(BlogBox.java:27)
    at blogbox.BlogBox.main(BlogBox.java:103)
    Any suggestions? i have searched google and this forum but could not find the solution to my problem, thanks
    [edited msg] do i need to add the classpath at execution or something of the apache commons net library?
    Message was edited by:
    gekkokid

    When you use an executable jar the normal class path
    is ignored, but you can put a classpath inside the
    jar. The usual trick is to place the library jar
    files in a directory inside the application directory
    and direct the manifest file to it. The manifest file
    live in the jar inside the META-INF directory and
    it's called manifest.mf
    The two heavilly used entries are Main-class: and
    Class-path: lines. Class-path just has a
    comma-separated list of library paths.
    The jar utility has a special option to load it up.Thanks :) I created a "/lib" directory, placed in the packages in there and redirected the Class-Path: lib/commons-net-1.4.1.jar
    and it works,
    thank you everyone :)

  • Using third party jars with Oracle Business Rules

    Hi
    I am working on Oracle AS 10g release 2.
    We are using Oracle Business Rules in integration with Oracle BPEL.
    While using third party jars however, Oracle Business Rules end is facing errors.
    Error during unmarshallingProvider com.sun.xml.bind.ContextFactory_1_0_1 not found
    oracle.classloader.util.AnnotatedClassNotFoundException:
    Missing class: com.sun.xml.bind.ContextFactory_1_0_1
    Dependent class: javax.xml.bind.ContextFinder
    Loader: oracle.xml:10.1.0_2
    Code-Source: /D:/oracleasr3/lib/xml.jar
    Configuration: <code-source> (ignore manifest Class-Path) in META-INF/boot.xml in D:\oracleasr3\j2ee\home\oc4j.jar
    Can anybody help in figuring out where Jaxb jars(3rd party jars) are to be kept so that OAS access it?
    We tried using the applib folder to load the jars but we are getting class loading errors.
    When new instances are created, class loading is not happening.
    Pls help.
    Thanks
    Kavya

    Are you using Application Server Release 3 or Release 2? There are different versions listed in your mail.
    I think you probably want to add this as a shared library via EM and then import the shared library to your application with the application's xml config files.

  • Where should the third party JAR files be placed ?

    Hi,
    We have a requirement to perform encryption / decryption of supplier bids. In this case we require to use third party provider JAR files with OA framework code. Where should the JAR files generally be placed in such a scenario ?
    Thanks and Regards,
    Sandhya

    Checkout this post.
    How to inclue a third party .jar file in OA fwk classpath Class not found

  • I can't open or save file with Java Web Start

    Hi,
    i can't open or save file with Java Web Start:
    import java.io.*;
    import java.util.*;
    public class MetaDataFileCreator {
    public String fileNameSpace = null;
    public String fileName = null;
    protected Properties file = null;
    public MetaDataFileCreator(String fileNameSpace, String fileName) {
    this.fileNameSpace = fileNameSpace;
    this.fileName = fileName;
    public void createMetaDataFile() {
    try {
    System.out.println("file METADATA");
    ClassLoader cl = this.getClass().getClassLoader();
    String nameFileMetaData = fileNameSpace + fileName + ".txt";
    FileOutputStream fileOS = new FileOutputStream(cl.getResource(nameFileMetaData).getFile());
    file = new Properties();
    file.setProperty("aaaaa", "aaaa");
    file.store(fileOS, "");
    fileOS.close();
    } catch (Exception e) {
    System.out.println("Error writing metadata-file: " + e);
    System.exit(1);
    e.printStackTrace();
    I have try also to open a file like this:
    ClassLoader cl = this.getClass().getClassLoader();
    file.load(cl.getResourceAsStream(nameFile));
    also like this:
    try {
    fos = (FileOpenService)ServiceManager.lookup("javax.jnlp.FileOpenService");
    fss = (FileSaveService)ServiceManager.lookup("javax.jnlp.FileSaveService");
    } catch (UnavailableServiceException e) {
    fss = null;
    fos = null;
    System.out.println("Error with JNLP");
    System.exit(1);
    if (fss != null && fos != null) {
    try {
    // get a FileContents object to work with from the
    // FileOpenService
    FileContents fc = fos.openFileDialog(null, null);
    //FileContents newfc2 = fss.saveAsFileDialog(null, null, fc);
    // get the OutputStream and write the file back out
    if (fc.canWrite()) {
    // don't append
    os = fc.getOutputStream(false);
    } catch (Exception e) {
    e.printStackTrace();
    also like this:
    File f = new File((System.getProperty("user.home")+"x.txt").toString());
    FileOutputStream fileX = new FileOutputStream(f);
    OutputX = new PrintWriter(new BufferedWriter(new OutputStreamWriter(fileX, "UTF8")));
    OutputX.println(....
    but it doesn't work with Java Web Start.
    Can someone help me?
    How can I open or save file?
    thank you.
    Sebastiano

    Did you specify <all-permissions/> in your JNLP file? Did you sign your code? What error are you getting?

  • 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

  • Running a plain java class in command prompt which uses third party jars

    i have to run a simple java class. its actually a process which is running in the background. Now to run this java file i have created a batch file. my problem is that this java file uses around 100 jar files. when i try to run this java file (actually .class file) it gives me no class defination found error for this java(class) file. What can be the problem. My java home is set....how to solve this problem

    i have to run a simple java class
    my problem is that this java file uses around 100 jar filesThese two statements are contradictory.
    it gives me no class defination found error for this java(class) file. What can be the problemThe class is not on the classpath.
    how to solve this problemEnsure all classes are on the classpath.
    I bet if your searched this forum (or even read the java tutorial) you'd find something .

  • How import policy file with Java Web Start

    hi everybody,
    I wrote an application launched by Java Web Start.
    This application encrypt data on the client side and POST them to the server.
    To encrypt I use JCE packages including sunjce_provider.jar, jce1_2_1.jar and
    local_policy.jar and US_export_policy.jar.
    local_policy.jar and US_export_policy.jar are not packages, each of them contains
    a policy file.
    When I test encryption on local no problem, but when I test with Java Web Start
    I've got this exception :
    java.lang.ExceptionInInitializerError:
    java.lang.SecurityException: Cannot set up certs for trusted CAs
    It's because the application launched by Java Web Start doesn't find local_policy.jar
    and US_export_policy.jar.
    There's a problem in my JNLP file :
    <jnlp spec="1.0+" href="http://myserver/sources/test.jnlp" codebase="http://myserver/sources">
         <information>
              <title>Java Web Start TEST</title>
              <vendor>NLE Intech</vendor>
              <description>cryptage then upload</description>
         </information>
         <security>
              <all-permissions/>
         </security>
         <resources>
              <j2se version="1.3" />
              <jar href="sunjce_provider.jar" />
              <jar href="jce1_2_1.jar" />
              <jar href="local_policy.jar" />
              <jar href="US_export_policy.jar" />
         </resources>
         <application-desc main-class="HelloWorldSwing" >
              <argument>c:\myfiletoencrypt</argument>
         </application-desc>
    </jnlp>
    thank you for your answer

    Hi Nicolas,
    If you migrate to JDK1.4 and use the signed Bouncy JAR, you could resolve the problem,
    if you don't want to use unlimited cryptography.
    See my posting on your other question.
    Agnes
    PS. There is a mistake in my other reply, the "local_policy.jar" and the other files must have
    to go into JRE/LIB/SECURITY directory

  • A QUICK QUESTION ABOUT ANYCONNECT THIRD PARTY CA WITH OCSP RESPONDER.

    Hi guys,
    i have successfully implemented anyconnect with a third party ca server (EBJCA) and CRL for revocation checking.
    Now i want to implement OCSP instead of CRL.
    I followed this document:
    http://www.cisco.com/en/US/products/hw/vpndevc/ps2030/products_configuration_example09186a00809a3fa5.shtml
    In this document it is mentioned that :
    Configure OCSP
    Configure OCSP Responder Certificate
    The OCSP configuration can vary dependent upon the OCSP responder       vendor. Read the manual of the vendor for more information.
    Obtain a self-generated certificate from the OCSP             responder ?
    Follow the procedures mentioned previously and install a             certificate for the OSCP server.
    Note: Make sure that revocation-check is set to none.                 OCSP checks do not need to happen on the actual OCSP server.
    1- My question is how to generate a self signed certificate from OCSP ?
    2- If we are not able to get a self signed certificate from OCSP Responder, is there any other work arround ?
    3- last why we use certificate mapping rule for OCSP certificate mentioned in the DoD's document.
    feel free to share your views.

    > does the client (e.g. clients using CAPI/CAPI2) also check the "Third-Party Root Certification Authorities" X509 store or do the Certs in this logical store also reside (get copied to) the "Third-Party Root Certification Authorities"
    X509 store
    yes. Trusted Root CAs container is an aggregated container for all trusted root CAs (for natively trusted CAs and for Root Certification Program members).
    Vadims Podāns, aka PowerShell CryptoGuy
    My weblog: en-us.sysadmins.lv
    PowerShell PKI Module: pspki.codeplex.com
    PowerShell Cmdlet Help Editor pscmdlethelpeditor.codeplex.com
    Check out new: SSL Certificate Verifier
    Check out new:
    PowerShell File Checksum Integrity Verifier tool.

  • A question about the "Third-Party Root Certification Authorities" X509 store

    Hello All
    Can someone please help me with the following question.
    Reading some MS documentation I see MS have a program called 'Microsoft Root Certification Program" where by if a third party ACME for example create a Root CA and it passes this program then MS will add the CA Cert to Windows Update for downloading
    to the clients "Third-Party Root Certification Authorities" X509 store, correct so far?
    if so when a client is building a certificate chain for a cert I understand it first checks its local store for relevant certificates (e.g. Trusted Root Certification Authorities etc..) then if not their checks the AIA extension so locate the cert.
    Question does the client (e.g. clients using CAPI/CAPI2) also check the "Third-Party Root Certification Authorities" X509 store or do the Certs in this logical store also reside (get copied to) the "Third-Party Root Certification
    Authorities" X509 store. In other words are these store names in the GUI just logical partitions for human viewing  but actually reside in the same location in the registry and therefore checked by the client
    Thanks All
    AAnotherUser__
    AAnotherUser__

    > does the client (e.g. clients using CAPI/CAPI2) also check the "Third-Party Root Certification Authorities" X509 store or do the Certs in this logical store also reside (get copied to) the "Third-Party Root Certification Authorities"
    X509 store
    yes. Trusted Root CAs container is an aggregated container for all trusted root CAs (for natively trusted CAs and for Root Certification Program members).
    Vadims Podāns, aka PowerShell CryptoGuy
    My weblog: en-us.sysadmins.lv
    PowerShell PKI Module: pspki.codeplex.com
    PowerShell Cmdlet Help Editor pscmdlethelpeditor.codeplex.com
    Check out new: SSL Certificate Verifier
    Check out new:
    PowerShell File Checksum Integrity Verifier tool.

Maybe you are looking for

  • Problem adding a component into a JFrame

    public DVD_VIDEO_CLUB() { mainFrame = new JFrame("DVD-VIDEO CLUB"); mainFrame.setExtendedState(Frame.MAXIMIZED_BOTH); aDesktopPane = new JDesktopPane(); aDesktopPane.setBackground(Color.LIGHT_GRAY); aDesktopPane.setDragMode(JDesktopPane.OUTLINE_DRAG_

  • Not sure if an update broke pacman and resolv.conf

    Hey guys           Sorry about these noobish questions but I have googled and i just cant seem to find a solution. Couple of things. First, I did a "pacman -Syu" and update the system earlier today. Then, I tried installing a package and i saw pacman

  • Print to printer problems

    I upgraded to Acrobat Pro 9 and now I can't print to my inkjet. After hitting 'print' the printer queue opens for a second in the task bar, the inkjet printer makes some noise, then the queue disappears, and of course nothing prints. No error codes a

  • JavaFX hangs when called from Java

    Hello I am developing a java application with a JavaFX gui, the communication from Java works with an java interface. The communication works,but after a few updates the javaFX code hangs and subsequently the Java code also hangs. Is this a common pr

  • Handling iteration in SQL

    Hi I have a requirement where, given a contract (site) and part number I need to find the preferred supplier. I had asked previously on this forum and thought I had be3en given a working solution with connect by prior and use of nocycle. However, my