Signing jar file error

i am trying to sign the sql server jdbc driver jar file to use in my jnlp application.but but i get this error.
C:\JNLP>jarsigner -keystore myKe sqljdbc.jar jdc
Enter Passphrase for keystore: asdfre
jarsigner: unable to sign jar: java.util.zip.ZipException: invalid entry compres
sed size (expected 5311 but got 5281 bytes)

i am trying to sign the sql server jdbc driver jar
file to use in my jnlp application.but but i get this
error.
C:\JNLP>jarsigner -keystore myKe sqljdbc.jar jdc
Enter Passphrase for keystore: asdfre
jarsigner: unable to sign jar:
java.util.zip.ZipException: invalid entry compres
sed size (expected 5311 but got 5281 bytes)1. Try unjarring the jdbc driver file and rejar it again.
2. Are you sure you have the latest JDK. Previous versions had these issues.

Similar Messages

  • URLClassLoader + dynamically loading signed jar files

    I have an applet that does not know all of the jar files it will need to load at startup.
    I would like to dynamically load these signed jar files using the URLClassLoader, however it does not recognize these jar files as being signed and I get java.security.AccessControlException: access denied errors.
    Any suggestions?
    Thanks!

    Try this classloader for loading the jars, it should to the trick:
    import java.net.URL;
    import java.net.URLClassLoader;
    import java.net.URLStreamHandlerFactory;
    import java.security.AllPermission;
    import java.security.CodeSource;
    import java.security.PermissionCollection;
    import java.security.Permissions;
    public class AllPermissionsClassLoader extends URLClassLoader {
        public AllPermissionsClassLoader (URL[] urls) {
            super(urls);
        public AllPermissionsClassLoader (URL[] urls, ClassLoader parent) {
            super(urls, parent);
            System.out.println(parent);
        public AllPermissionsClassLoader (URL[] urls, ClassLoader parent, URLStreamHandlerFactory factory) {
            super(urls, parent, factory);
        protected PermissionCollection getPermissions (CodeSource codesource) {
            Permissions permissions = new Permissions();
            permissions.add(new AllPermission());
            return permissions;
    }

  • Invalid jar file error

    invalid jar file error on mobile while installing my application..i have also checked cldc version and midp version of mobile and made my jar file according tom that..still that error is coming..

    {color:red}CROSS POSTED{color} Including this --
    {color:0000ff}http://forum.java.sun.com/thread.jspa?threadID=5240695
    http://forum.java.sun.com/thread.jspa?threadID=5240696
    http://forum.java.sun.com/thread.jspa?threadID=5240699
    {color}
    Cross posting is rude.
    db

  • How can i add update signed jar file

    I am developing an applet which requires signing to run in a browser.
    I am developing supporting classes. But these class files have to be added
    to the jar. Isnt it??
    But to test the applet i need to load it in the browser each time i modify the class files. So the jar file need to be updated every time. But an
    IOError
    is being displayed when i try to update the signed jar file.
    How can i update signed jar file?? Or is there any othe way to test the signed applet during development??

    How can i update signed jar file?You can't, the signature is there to make sure the content of the jare hasn't been messed
    with.
    Either recreate the jar and re sign it or set up a policy during testing.

  • Is it possible to verify a signed jar-file from a program?

    Is it possible to verify a signed jar-file from a program
    (using some API) likewise jarsigner does?

    Is it possible to verify a signed jar-file from a
    program
    (using some API) likewise jarsigner does?Hi,
    You would have to open the jarfile, read each jar entry and for each of them do a getCertificates() and then in turn verify each certificate with the public key of the enclosed certificates in the jar file.
    An easier solution would be to use the verify flag of the JarFile or JarInputStream.
    Hope it helps..
    Cheers,
    Vijay

  • Turning off jar cache causes classnotfound with signed jar files

    Hi,
    I have a problem with applet signed jars when the java cache is turned off.
    With the cache turned off, I get a class not found for the first class it attempts to use from the signed jar file from an applet.
    If I turn the jar caching on, all works perfectly with no other changes.
    Anyone have any ideas? This is java 6u16.
    Thanks

    jkc532 wrote:
    .. Is the fact that the CachedJarFile class doesn't attempt to reload the resource when it can't retrieve it from MemoryCache a bug? From your comprehensive investigation and report, it seems so to me.
    ..I've dug as deep as I can on this and I'm at wits end, does anybody have any ideas?Just after read the summary I was tired, so I have some understanding of the effort you have already invested in this (the 'wits' you have already spent). I think you should raise a bug report and seek Oracle's response.

  • Three questions about signed jar file and applet

    I use three signed jar file. Each of them signed by different certificate. First of JARs contain applet class. When I start applet from html page I see message “This applet was signed by…… but Java cannot verify it… Do you trust…?”. All times I press “Yes I trust” and after this questions applet stop to work end exit. If I use only one certificate for signing of three JARs then applet continue to work after question. 1) What should I do to fix this bug? 2) Is it any method to check from applet that user press Trust button? Is it any method to emulate work of SecurityManager to check that Certificate object is trusted (I want do call some method check(Certificate) and if certificate is not trusted I want to see message with question: “Do you want to trust this certificate” and so on)?

    Hello Jarman,
    1. If I have a signed jar file, then as long as the
    certificate is recognised as trusted that applet can
    run as a fully trusted application on the client
    machine. So I should not have to add lines such as
    permission java.lang.RuntimePermission
    "readFileDescriptor", "read" ;
    permission java.lang.RuntimePermission
    "writeFileDescriptor", "write" ;
    to my java.policy file. true/false ?true
    2. If I am running a signed jar file in the Java
    plugin then I do not need to have a verisign or thawte
    certificate (however to allow my certificate to be
    accepted I do have to import it into the cacerts file
    on the client machine). True/false?true
    3. Following on from question 2, if I want to be able
    to run an applet on a client machine, without messing
    around with ANY files on those machines, I need a
    verisign or thawte certificate. True/false?true
    4. (And finally) Apart from a security exception
    saying that I need to add one of the lines like those
    of question 1, is there any way I can get other debug
    information as to why the signed jar file is not being
    recognised as signed?No. This could be a problem of importing your certifcate into the wrong place.
    The information on the following link is a little bit dated but it helped me to successfully install a testcertificate and sign an applet with it.
    http://www.suitable.com/Doc_CodeSigning.shtml

  • Keystore error signing jar file

    I am having trouble signing a jar file. I have deleted and recreated the keystore file. Has anyone encountered this error before:
    [signjar] jarsigner error: java.lang.RuntimeException keystore load: Not logged in

    See my update in this thread:
    error signing jar file

  • Error signing jar file

    I am using oracle Devsuite10g 10.1.2.1 on windows when I signed the webuitl.jar and jacob.jar it gives me the follwing error
    E:\dev10g\forms\webutil>sign_webutil.bat e:\dev10g\forms\java\frmwebutil.jar
    Generating a self signing certificate for key=webutil...
    keytool error: java.lang.Exception: Key pair not generated, alias <webutil> alre
    ady exists
    There were warnings or errors while generating a self signing certificate. Pleas
    e review them.
    Backing up e:\dev10g\forms\java\frmwebutil.jar as e:\dev10g\forms\java\frmwebuti l.jar.old...
    1 file(s) copied.
    Signing e:\dev10g\forms\java\frmwebutil.jar using key=webutil...
    The system cannot find the path specified.
    There were warnings or errors while signing the jar. Please review them.
    E:\dev10g\forms\webutil>sign_webutil.bat e:\dev10g\forms\java\jacob.jar
    Generating a self signing certificate for key=webutil...
    keytool error: java.lang.Exception: Key pair not generated, alias <webutil> alre
    ady exists
    There were warnings or errors while generating a self signing certificate. Please review them.
    and later check the formweb.cfg
    WebUtilArchive=frmwebutil.jar,jacob.jar
    WebUtilLogging=off
    WebUtilLoggingDetail=normal
    WebUtilErrorMode=Alert
    WebUtilDispatchMonitorInterval=5
    WebUtilTrustInternal=true
    WebUtilMaxTransferSize=16384
    baseHTMLjinitiator=webutiljini.htm
    baseHTMLjpi=webutiljpi.htm
    baseHTML=webutilbase.htm
    archive_jini=frmall_jinit.jar,frmwebutil.jar,jacob.jar
    archive=frmall.jar
    lookAndFeel=oracle
    and the webutil.cfg is as follows
    archive_jini=f90all_jinit.jar,frmwebutil.jar,jacob.jar
    WebUtilArchive=frmwebutil.jar,jacob.jar
    install.syslin.location=/webutil
    transfer.APPSRV.READ=C:\
    transfer.APPSRV.WRITE.1=C:\WORK\UPLOAD
    transfer.APPSRV.WRITE.2=C:\WORK\LOG
    transfer.appsrv.workAreaRoot=d:\temp
    transfer.appsrv.accessControl=true
    transfer.database.enabled=TRUE
    transfer.appsrv.enabled=TRUE
    plz help to come out from this error

    This occurs when you attempt to run the provided script (batch) more than once or the Key name is already in the keystore. If you are not familiar with how to sign JARs on your own, the easiest solution is likely to change the value of JAR_KEY in the script.
    The script is provided as a courtesy more than anything else. Oracle doesn't do any magic in the script. It is simply a scripted version of what is required by Sun in order to create a certificate and sign a JAR. You can get more info about how to sign a JAR file from Sun or by doing a Google search. You can also refer to an older Oracle white paper which offered step-by-step instructions for signing:
    http://www.oracle.com/technology/products/forms/pdf/SigningJint13.pdf

  • Unable to get jarsigner to sign jar file using pkcs11 smartcard

    I'm using a JDK jdk1.6.0_14 with a datakey smartcard with the below info in pkcs11.cfg file:
    name = DK330
    library = c:\windows\system32\dkck232.dll
    I have also configured the java.security file to include the security.provider.10=sun.security.pkcs11.SunPKCS11 c:/pkcs11.cfg
    I have my environment set for the below to keep it simple as possible:
    JAVA_HOME=C:\Program Files\Java\jdk1.6.0_14
    CLASSPATH=C:\Program Files\Java\jdk1.6.0_14\lib
    PATH=C:\Program Files\Java\jdk1.6.0_14\bin;c:\windows;c:\windows\system32
    1) I am able to Confirm that the secret key is present in the keystore
    keytool -v -list -keystore NONE -storetype PKCS11 -storepass xxxxxx
    Keystore type: PKCS11
    Keystore provider: SunPKCS11-DK330
    Your keystore contains 1 entry
    Alias name: CS.NOLSC.002's U.S. Government ID
    Entry type: PrivateKeyEntry
    Certificate chain length: 1
    Certificate[1]:
    Owner: CN=CS.NOLSC.002, OU=USN, OU=PKI, OU=DoD, O=U.S. Government, C=US, OU=PKI, OU=DoD, O=U.S. Government, C=US
    Issuer: CN=DOD CA-14, OU=PKI, OU=DoD, O=U.S. Government, C=US
    Serial number: 3e8e
    Valid from: Mon Feb 05 14:53:22 EST 2007 until: Thu Feb 04 14:53:22 EST 2010
    Certificate fingerprints:
    MD5: 9D:34:AF:D8:DE:18:15:78:D6:88:3D:37:83:FA:DC:E8
    SHA1: 8A:BB:39:D5:2B:45:F7:CE:A3:93:C5:71:5C:36:DC:FE:3F:B4:7D:9A
    Signature algorithm name: SHA1withRSA
    Version: 3
    Extensions:
    #1: ObjectId: 2.5.29.15 Criticality=true
    KeyUsage [
    DigitalSignature etc
    2) When I try to sign the applet using the below commands I get the same errors:
    command 1:
    jarsigner -keystore NONE -storetype PKCS11 -providerClass sun.security.pkcs11.SunPKCS11 -providerArg ${java.home}/lib/security/pkcs11.cfg sfilechooser.jar "CS.NOLSC.002's U.S. Government ID"
    I get this error::
    jarsigner error: java.security.ProviderException: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_ATTRIBUTE_TYPE_INVALID
    command 2:
    jarsigner -verbose -keystore NONE -storetype PKCS11 -storepass xxxxxx sfilechooser.jar "CS.NOLSC.002's U.S. Government ID"jarsigner error: java.security.ProviderException: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_ATTRIBUTE_TYPE_INVALID
    I can also confirm the jar file that I'm trying to sign is unsigned using the below command without problem.
    C:\Program Files\Java\jdk1.6.0_14\bin>jarsigner -verify -verbose -certs -keystore NONE -storetype PKCS11 sfilechooser.jar
    Enter Passphrase for keystore:
    0 Wed Jul 08 09:36:06 EDT 2009 META-INF/
    71 Wed Jul 08 09:36:06 EDT 2009 META-INF/MANIFEST.MF
    4227 Tue Jun 09 09:56:20 EDT 2009 DirList.class
    0 Wed Jul 08 09:29:52 EDT 2009 FileChooserPackage/
    4728 Tue Jun 09 09:56:20 EDT 2009 FileChooserPackage/DirUtil.class
    809 Fri May 29 13:05:42 EDT 2009 FileChooserPackage/FileChooserBean$AWTFileDialogThread.class
    765 Fri May 29 13:05:42 EDT 2009 FileChooserPackage/FileChooserBean$AWTSaveDialogThread.class
    819 Tue Jun 09 09:56:20 EDT 2009 FileChooserPackage/FileChooserBean$FileChooserBeanThread.class
    1015 Tue Jun 09 09:56:20 EDT 2009 FileChooserPackage/FileChooserBean$FormsDecoderException.class
    815 Tue Jun 09 09:56:20 EDT 2009 FileChooserPackage/FileChooserBean$SaveFileChooserThread.class
    17198 Tue Jun 09 09:56:20 EDT 2009 FileChooserPackage/FileChooserBean.class
    s = signature was verified
    m = entry is listed in manifest
    k = at least one certificate was found in keystore
    i = at least one certificate was found in identity scope
    jar is unsigned. (signatures missing or not parsable)
    ======================================
    What could be my problem to get my applet signed? I'm at a loss.

    I found the problem.
    I was able to use jarsigner correctly after I backed off on the GemPlus driver version from v4.7.062 file name dkck232.dll to the previous version of dkck201.dll at v4.7.062.

  • Help with signing jar files

    hi,
    Iam trying to let a applet do file acces on a client. Therefore I must sign a applet so it may access the filesystem. This works, but the code keeps screaming about security violations.
    Now ive vopied the code from a example from Oracle and I found one difference.
    next to the fileUploader class that I also have in my jar file there is a
    FileUploader$1.class with the following code:
    import oracle.ewt.thread.Task;
    import oracle.ewt.thread.TaskEvent;
    final synchronized class FileUploader$1 implements Task
        private final FileUploader this$0 = fileUploader;
        private final boolean val$nf = flag;
        private final Object val$val = object;
        public void runTask(TaskEvent taskEvent)
            FileUploader.access$0(this$0, val$val, val$nf);
        FileUploader$1(boolean flag, FileUploader fileUploader, Object object)
    }but if I try to compile this code then I get all sorts of error telling me Iam missing vars and methods.
    Can anyone tell me why this class is there and what it does and if its nessesary for the fileaccess then how can I create it

    hi,
    Iam trying to let a applet do file acces on a client.
    Therefore I must sign a applet so it may access the
    filesystem. This works, but the code keeps screaming
    about security violations.
    Now ive vopied the code from a example from Oracle and
    I found one difference.
    next to the fileUploader class that I also have in my
    jar file there is a
    FileUploader$1.class with the following code:
    import oracle.ewt.thread.Task;
    import oracle.ewt.thread.TaskEvent;
    final synchronized class FileUploader$1 implements
    Task
    private final FileUploader this$0 = fileUploader;
    private final boolean val$nf = flag;
    private final Object val$val = object;
    public void runTask(TaskEvent taskEvent)
    FileUploader.access$0(this$0, val$val,
    al$val, val$nf);
    FileUploader$1(boolean flag, FileUploader
    der fileUploader, Object object)
    }but if I try to compile this code then I get all sorts
    of error telling me Iam missing vars and methods.
    Can anyone tell me why this class is there and what it
    does and if its nessesary for the fileaccess then how
    can I create it
    a Name1$Name2.class file is generated from an inner class Name2 in a class Name1.
    in your case you want to look at and compile FileUploader.java. This will then generate any inner class FileUploader$innerclass.class files necessary

  • Signed JAR file won�t work on A Mac

    Hello I am trying to run this java script on a Mac
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import javax.swing.table.*;
    import java.io.*;
    public class Applet1 extends Applet {
    private FlowLayout flowLayout1 = new FlowLayout();
    private JFileChooser jFileChooser1 = new JFileChooser();
    public Applet1() {
    try {
    jbInit();
    catch(Exception e) {
    e.printStackTrace();
    private void jbInit() throws Exception {
    this.setLayout(flowLayout1);
    this.add(jFileChooser1, null);
    The signed jar works properly on pc and it doesn�t work on a Mac.
    I am using JDK 2.5 and swing 1.1.1

    What error are you getting?Swing: checked access to system event queue.
    An exception occurred:
    com.apple.mrj.JManager.JMAppletSecurityExc: security.checkread: /, /
         at com.apple.mrj.JManager.JMAppletSecurityOld.checkRead(JMAppletSecurityOld.java)
         at com.apple.mrj.JManager.JMAppletSecurityOld.checkRead(JMAppletSecurityOld.java)
         at java.io.File.exists(File.java)
         at javax.swing.filechooser.UnixFileSystemView.getRoots(FileSystemView.java:270)
         at javax.swing.plaf.metal.MetalFileChooserUI$DirectoryComboBoxModel.<init>(MetalFileChooserUI.java:683)
         at javax.swing.plaf.metal.MetalFileChooserUI.createDirectoryComboBoxModel(MetalFileChooserUI.java:666)
         at javax.swing.plaf.metal.MetalFileChooserUI.installComponents(MetalFileChooserUI.java:145)
         at javax.swing.plaf.basic.BasicFileChooserUI.installUI(BasicFileChooserUI.java:106)
         at javax.swing.JComponent.setUI(JComponent.java:258)
         at javax.swing.JFileChooser.updateUI(JFileChooser.java:1296)
         at javax.swing.JFileChooser.setup(JFileChooser.java:294)
         at javax.swing.JFileChooser.<init>(JFileChooser.java:270)
         at javax.swing.JFileChooser.<init>(JFileChooser.java:233)
         at Applet1.<init>(Applet1.java:13)
         at com.apple.mrj.JManager.JMAppletViewer_OLD.doLoadCode(JMAppletViewerOld.java)
         at com.apple.mrj.JManager.JMAppletViewer_OLD.setState(JMAppletViewerOld.java)
         at com.apple.mrj.JManager.JMViewerEvent.post(JMAppletViewerOld.java)
         at com.apple.mrj.JManager.AVDispatcherThread.run(JMAppletViewerOld.java)

  • Unable to access jar file error !

    hello,
    i have built my netbeans project and obtained the hequalifies.jar file . unfortunately when i'm trying to run this jar file from the prompt command I'mgetting the error: unable to access jar file
    here is the command i'm typing:
    C:\Users\User\Documents\NetBeansProjects\hEqUALIFIES\dist>java -jar " C:\Users\U
    ser\Documents\NetBeansProjects\hEqUALIFIES\dist hequalifies.jar "
    anyone has any clue?
    10x!

    ok i'm gonna make it easier on you.
    i gess i found what is the problem but have no idea how to solve it.
    when i obtained the .jar file i also obtained a README.txt file in which it is written the following phrase:
    ** If a library on the projects classpath also has a Class-Path element*
    specified in the manifest,the content of the Class-Path element has to be on the projects runtime path.
    I'M SORRY BUT I DID NOT UNDERSTAND WHAT IS MEANT BY: what is "the projects runtime path"?
    the content of my manifest is:
    Manifest-Version: 1.0
    Ant-Version: Apache Ant 1.7.1
    Created-By: 10.0-b23 (Sun Microsystems Inc.)
    Main-Class: hequalifies.ui.HeQualifies
    Class-Path: lib/PlugIn
    X-COMMENT: Main-Class will be added automatically by build
    I'm having problem with lib/plugin.

  • Problems with signed JAR files in JWS/JRE6 environment.

    Hello All,
    I'm encountering a problem running our desktop application as a Java Web Start deployment in a JRE 6 environment. There were never any problems when running the same application as a JWS deployment in JRE 1.4, or 5, environments. There are also currently no problems in a JRE 6 environment when running the application as a standard desktop application.
    The problem which I am having has nothing to do with launching the application. But for good measure, I verified the JNLP file with JaNeLA. A couple things we out of order, which I addressed to make JaNeLA happy, but my problem still persists. Here is my JNLP file (anonymized to protect the innocent):
    TS: 2010-10-18 17:04:46
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp codebase="$$codebase" href="$$name">
         <information>
              <title>Acme Desktop</title>
              <vendor>Acme Corporation</vendor>
              <homepage href="http://www.acme.com/"/>
              <description>Acme Client for Acme Server</description>
              <description kind="tooltip">Acme Client for Acme Server</description>
              <icon href="desktop.gif"/>
              <offline-allowed/>
         </information>
         <security>
              <all-permissions/>
         </security>
         <resources>
              <j2se version="1.5+"/>
              <jar href="acmedesktop.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/antlr-2.7.2.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/backport-util-concurrent.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/commons-codec-1.3.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/commons-httpclient.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/commons-logging.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/acmeapi.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/HelpJavaDT.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/HelpJavaDT_es.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/jacorb.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/Multivalent.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/slf4j-api-1.5.6.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/slf4j-jdk14-1.5.6.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/snow.jar" download="lazy" version="8.00.01.00+"/>
              <jar href="lib/AcmeTMClient.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/xercesImpl.jar" download="eager" version="8.00.01.00+"/>
              <jar href="lib/xml-apis.jar" download="eager" version="8.00.01.00+"/>
              <extension name="installer" href="desktopInstaller.jnlp" />
              <extension name="Java Help" href="help.jnlp"/>
              <property name="java.library.path" value="./lib"/>
              <property name="admin" value="false"/>
              <property name="webstart" value="true"/>          
              <!-- The following two lines are for SSO implementation only
              <property name="urladdress" value="http://localhost:8080/AcmeDesktop/servlet/AcmeServlet"/>
              <property name="cookiespec" value="RFC2109"/>
              -->          
         </resources>
         <resources os="Windows">
              <nativelib href="lib/jniWin32.jar" version="8.00.01.00+"/>
         </resources>
         <application-desc main-class="desktop"/>     
    </jnlp>-----
    When running as a JWS deployment, on JRE 6, the application will be functioning normally for a little while, and then suddenly the following exception is thrown, and the current operation fails because the class in question cannot be accessed:
    java.lang.SecurityException: class "acmeapi.communication.CDocImpl"'s signer information does not match signer information of other classes in the same package
         at java.lang.ClassLoader.checkCerts(ClassLoader.java:807)
         at java.lang.ClassLoader.preDefineClass(ClassLoader.java:488)
         at java.lang.ClassLoader.defineClassCond(ClassLoader.java:626)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
         at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
         at com.sun.jnlp.JNLPClassLoader.findClass(JNLPClassLoader.java:288)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
         at acmeapi.common.CDoc.getAnnotationsInfo(CDoc.java:493)
         at acmedesktop.communication.CCommunicationManager.privateGetAnnotations(CCommunicationManager.java:1976)
         at acmedesktop.communication.CCommunicationManager.getAnnotations(CCommunicationManager.java:1828)
         at acmedesktop.annotations.CViewAnnotations.getAnnotations(CViewAnnotations.java:826)
         at acmedesktop.annotations.CViewAnnotations.createView(CViewAnnotations.java:583)
         at acmedesktop.annotations.CViewAnnotations.setData(CViewAnnotations.java:736)
         at acmedesktop.annotations.CViewAnnotations.init(CViewAnnotations.java:205)
         at acmedesktop.hitspanel.CHitsPanel.viewAnnotations(CHitsPanel.java:281)
         at acmedesktop.hitspanel.CHitsTab$3.mousePressed(CHitsTab.java:316)
         at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:263)
         at java.awt.Component.processMouseEvent(Component.java:6260)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
         at java.awt.Component.processEvent(Component.java:6028)
         at java.awt.Container.processEvent(Container.java:2041)
         at java.awt.Component.dispatchEventImpl(Component.java:4630)
         at java.awt.Container.dispatchEventImpl(Container.java:2099)
         at java.awt.Component.dispatchEvent(Component.java:4460)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4235)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
         at java.awt.Container.dispatchEventImpl(Container.java:2085)
         at java.awt.Window.dispatchEventImpl(Window.java:2478)
         at java.awt.Component.dispatchEvent(Component.java:4460)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)-----
    The classes of our desktop product are contained within the 'acmedesktop' and 'acmeapi' packages. It requires access to the hard drive of the workstation, and therefore, all jar files included with the application are signed using the following ANT task when compiled:
    <signjar keystore="resources/codesigning/keystore.pfx" storetype="pkcs12" storepass="myPassword" alias="myAlias">
         <fileset dir="${jws_dist}/app" includes="*.jar"/>
         <fileset dir="${jws_dist}/app/lib" includes="*.jar" excludes="jhall__V${dt_version}.jar"/>
    </signjar>-----
    Therefore, all classes, within all jar files, are signed with the same certificate (with the exception of the JavaHelp libraries, which are already signed by Sun - but the class in question attempting to be loaded here is not contained within the JavaHelp jar file anyway). So, the point being, that the exception message stating that the "signer information of the acmeapi.communication.CDocImpl class doesn't match the signer information of other classes in the same package", is simply not correct. All classes within that jar file were signed using the same certificate.
    I downloaded the JRE 6 source from dev.java.net and picked through this issue with a debugger. The ClassLoader.checkCerts() method compares the certificate used to sign the current class which is attempting to be loaded, with the certificates which signed all other previously loaded classes within the same package. If they don't match, the exception above is thrown. What is causing the issue is when the checkCerts() method attempts to get the certificates which signed the currently loading class, null is returned. And obviously, comparing null, with an array of the certificates which signed the previously loaded classes, isn't going to match; therefore this exception is thrown.
    The checkCerts() method gets the certificates of the currently loading class by calling the java.security.CodeSource.getCertificates() method. Tracing deeper in the debugger, the CodeSource object ultimately gets the certificates from the 'signersRef' member variable of the com.sun.deploy.cache.CachedJarFile class. signerRef is a SoftReference object and can therefore be garbage collected at some point. If it has already been garbage collected, the CachedJarFile class will attempt to retrieve it again from the loaded cache entry by calling com.sun.deploy.cache.MemoryCache.getLoadedResource().
    The MemoryCache class maintains the cache entries to the jar files as MemoryCache.CachedResourceReference objects, which subclass WeakReference, and therefore these objects can be garbage collected as well. If the cache entries have also been garbage collected, this leaves the CachedJarFile class with no ability to repopulate the CachedJarFile.signerRef object. Therefore it is completely out of luck getting the certificates which signed the currently loading class, which ultimately causes the above exception.
    When the com.sun.deploy.cache.Cache class attempts to retrieve a cache entry using its getCacheEntry() method, it will attempt to get the entry from the MemoryCache class, if null is returned, it will recreate the cache entry and add it back to the MemoryCache. In contrast, when the CachedJarFile class attempts to get a cache entry from the MemoryCache class, if null is returned, it just gives up.
    (from com.sun.deploy.cache.CachedJarFile:244)
    private CacheEntry getCacheEntry() {
         /* if it was not created by Cache do not search for entry */
         if (resourceURL == null)
              return null;
         CacheEntry ce = (CacheEntry) MemoryCache.getLoadedResource(resourceURL);
         if (ce == null) {
              //This should not happen because CacheEntry should not get collected
              // before CachedJarFile is collected.
              Trace.println("Missing CacheEntry for " + resourceURL + "\n" + ce,
                   TraceLevel.CACHE);
         return ce;
    When debugging, code execution falls within the code block with the comment stating "This should not happen...", but it is happening in my case.
    On an interesting side note, using the jvisualvm.exe tool included with JDK 6, I was able to tell that it seems as though these objects are collected the first time that the JVM allocates more heap space, and then the issue will occur. If I set the initial heap size very large (using -Xms) this issue won't occur at all. But that is kind of a bad solution which I would rather not do, but it is interesting to note for the sake of troubleshooting this issue. The max heap size (-Xmx) is plenty big enough, so the issue is not that we are running out of memory here.
    Does anyone have any insight as to what could be causing this? I've searched, and found a couple threads with similar problems but with no clear solutions. It is not just one workstation either, it happens everywhere I deploy the app as a Java Web Start application in a JRE 6 environment. I have been using version 1.6.0_18 on XP, but it seems to happen on any update version of 1.6. Is the fact that the CachedJarFile class doesn't attempt to reload the resource when it can't retrieve it from MemoryCache a bug? I've dug as deep as I can on this and I'm at wits end, does anybody have any ideas?
    Thank you
    Jake
    Edited by: jkc532 on Nov 12, 2010 10:35 AM

    jkc532 wrote:
    .. Is the fact that the CachedJarFile class doesn't attempt to reload the resource when it can't retrieve it from MemoryCache a bug? From your comprehensive investigation and report, it seems so to me.
    ..I've dug as deep as I can on this and I'm at wits end, does anybody have any ideas?Just after read the summary I was tired, so I have some understanding of the effort you have already invested in this (the 'wits' you have already spent). I think you should raise a bug report and seek Oracle's response.

  • OIM 11g Using exportMetaData.sh to export the jar files error

    Env OIM 11g (11.1.1.5.0) with iPlanet Connector installed on Linux 32-bit.
    When running the exportMetaData.sh with the filter for configuration for the Jars files as “*”.
    The error output is:
    /home/oracle/exportData/exportPackage/Jars/JavaTasks/SJSDSProv.jar
    java.io.FileNotFoundException: /home/oracle/exportData/exportPackage/Jars/JavaTasks/SJSDSProv.jar (No such file or directory)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
    at oracle.iam.OIMMigration.util.OIMMigrationUtility.main(OIMMigrationUtility.java:206)
    java.util.zip.ZipException: ZIP file must have at least one entry
    at java.util.zip.ZipOutputStream.finish(ZipOutputStream.java:304)
    at java.util.zip.DeflaterOutputStream.close(DeflaterOutputStream.java:146)
    at java.util.zip.ZipOutputStream.close(ZipOutputStream.java:321)
    at oracle.iam.OIMMigration.util.OIMMigrationUtility.createZipFile(OIMMigrationUtility.java:429)
    at oracle.iam.OIMMigration.util.OIMMigrationUtility.main(OIMMigrationUtility.java:242)
    Export Package created : /home/oracle/exportData/exportPackage_2012:03:26::11:22:04.zip
    Exiting...
    The config.xml file used is (as provided in the document)
    <?xml version="1.0" encoding="utf-8"?>
    <MigrationDetails operation="Export">
    <entityDetails>
    <EntityType>Jars</EntityType>
    <FilteringCriteria>
    <Attribute>
    <Name>Jar_Type</Name>
    <Filter>*</Filter>
    </Attribute>
    </FilteringCriteria>
    </entityDetails>
    <entityDetails>
    <EntityType>Plugins</EntityType>
    <FilteringCriteria>
    <Attribute>
    <Name>Plugin_Name</Name>
    <Filter>*</Filter>
    </Attribute>
    </FilteringCriteria>
    </entityDetails>
    <entityDetails>
    <EntityType>CustomResourceBundles</EntityType>
    <FilteringCriteria>
    <Attribute>
    <Name>Resource_Type</Name>
    <Filter>*</Filter>
    </Attribute>
    </FilteringCriteria>
    </entityDetails>
    </MigrationDetails>
    The exportMetaData.sh is correctly configured and those directories exist on the system.
    CONTEXT_FACTORY="weblogic.jndi.WLInitialContextFactory"
    PACKAGE_LOCATION=/home/oracle/exportData
    TEMP_LOCATION_TO_EXTRACT=/home/oracle/exportTemp
    CONFIGURATION_FILE=/odrive/oracle/oim11g_MWH/Oracle_IDM1/server/bin/config.xml
    MODE="export"
    Any help to resolve this issue would be much appreciated.
    Regards,
    Shane

    Hi Shane,
    The problem appears to be an issue where the directory created is called "JavaTask" but the jars are trying to be placed into "JavaTasks".
    Note the "s" appended at the end.
    If you manually create the JavaTasks directory then run the tool, it should work.

Maybe you are looking for

  • Is there a way to create a field with total pages viewed?

    Is there a way to create a field for a contact that stores the total # of pages he has ever viewed? We'd like to use this as a bases for lead scoring.

  • [Solved] Can't find what messes up my locales

    Hi, First of all, I'd like to say that I did follow the beginner's guide and the locale wiki entry before posting here. I spents many hours trying to correct the issue myself but I can't think of anything but ugly fixes now... Please note that I've d

  • Accessing properties file value in event handler in OIM11gR2

    Hi, Can i store the bolded values in below code in a propery file and call them. I am implementing this code in Post event handler.      logger.debug("Function::Client Initiate: Initializing OIM client");      String ctxFactory = "weblogic.jndi.WLIni

  • Setting Default Printer via GPP

    We have several PC Labs for our Students, and normally we have 2 printers per lab.  We would like to have half of the lab printing to one printer and the other half of the lab printing to the other printer.  I have been successful in deploying the co

  • Removed toolbar from Navigator in Design Editor and want it back

    Hi, this is more funny than actually serious stuff that it is usually discussed here. I accidentally dragged toolbar from Navigator in Design Editor so it was floating palette. I clicked close window button on palette and have never seen toolbar agai