Showing posts with label applet. Show all posts

Your security settings have blocked an application signed with an expired or not-yet-valid certificate from running

We are using applet in our project and Its signed by code signing certificate. It was working fine before expiry date of code signing certificate. We renewed our code signing certificate and signed and executed applet again and but we got the following exception...
com.sun.deploy.security.BlockedException: Your security settings have blocked an application signed with an expired or not-yet-valid certificate from running
    at com.sun.deploy.security.SandboxSecurity.showBlockedDialog(Unknown Source)
    at com.sun.deploy.security.TrustDecider.askUser(Unknown Source)
    at com.sun.deploy.security.TrustDecider.validateChain(Unknown Source)
    at com.sun.deploy.security.TrustDecider.isAllPermissionGranted(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.isTrustedByTrustDecider(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.getTrustedCodeSources(Unknown Source)
    at com.sun.deploy.security.CPCallbackHandler$ParentCallback.strategy(Unknown Source)
    at com.sun.deploy.security.CPCallbackHandler$ParentCallback.openClassPathElement(Unknown Source)
    at com.sun.deploy.security.DeployURLClassPath$JarLoader.getJarFile(Unknown Source)
    at com.sun.deploy.security.DeployURLClassPath$JarLoader.access$1000(Unknown Source)
    at com.sun.deploy.security.DeployURLClassPath$JarLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.deploy.security.DeployURLClassPath$JarLoader.ensureOpen(Unknown Source)
    at com.sun.deploy.security.DeployURLClassPath$JarLoader.(Unknown Source)
    at com.sun.deploy.security.DeployURLClassPath$3.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
    at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
    at com.sun.deploy.security.DeployURLClassPath.getResource(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown Source)
    at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager.initAppletAdapter(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

Root Cause
After all possible solution from Internet like exception site list and few other I started looking for all tiny bit of applet and found that we are using bouncy castle jar in our applet. I decompiled jar using jd-gui and found that bouncy castle jar is also signed. So I pulled out certificate details of bouncy castle by using following command.
$>"C:\Program Files\Java\jdk1.6.0_25\bin\jarsigner.exe" -verify -verbose -certs bouncy-castle.jar
The developer integrate this jar in our applet left the job and used same code signing certificate for bouncy castle.

Solution
I signed my applet and bouncy castle jar with renewed code signing certificate and Its working like as always. It may possible this solution doesn't help you but this is for those who uses other jar in their applet and face the same issue.

Conclusion
You have to sign all jar that you are using in your applet.

Sign Applet using code signing certificate and verify jar


Applet
An applet is Java program designed to be delivered over Internet/Network. The Java program executed automatically by Java compatible browser.

Code Signing Certificate
Like in real world we sign document, Code Signing Certificate does the same with code. Code signing certificate is used to preserve authenticity of code. You can buy code signing certificate through different vendor like verisign, Thawte, etc...

Note: I am using .jks (Java KeyStore) file to sign my applet. I haven't tried with other certificate as its not available for free. You can also contact your vendor for the same.


Step 1: Start command prompt.

Step 2: Execute below command by changing instructed values.
Note: I placed certificate and applet in same folder and pointing jarsigner.exe.
/**
 * Change jarsigner.exe path 
 * Change certificate name and path
 * Change jar file name and path
 */
cmd> "C:\Program Files\Java\jdk1.6.0_25\bin\jarsigner.exe" -keystore javaQueryThawte.jks applet.jar server

Step 3: Verifying jar you just signed.
/**
 * Change jarsigner.exe path 
 * Change jar file name and path
 */
cmd> "C:\Program Files\Java\jdk1.6.0_25\bin\jarsigner.exe" -verify -verbose -certs applet.jar

Lets say you required to sign same applet again and again, we'll act smart. Create executable batch file for windows system.
/**
 * Open notepad
 * Change jarsigner.exe location
 * Change certificate name
 * Change jar file name
 * Save below code with file extension .bat i.e: signApplet.bat
 */
@echo off
echo Applet Code Signing Console
"C:\Program Files\Java\jdk1.6.0_25\bin\jarsigner.exe" -keystore NextendersIndiaPvtLtd.jks POCDemo.jar server
"C:\Program Files\Java\jdk1.6.0_25\bin\jarsigner.exe" -verify -verbose -certs POCDemo.jar
pause

Place signApplet.bat, certificate and jar file in same folder. Now execute signApplet.bat and provide password of certificate. You are done with it.

java.lang.NoClassDefFoundError: org/bouncycastle/asn1/ASN1ObjectIdentifier

For those who don't know, Bouncycastle is lightweight cryptography API.

Scenario:
We created applet that uses bouncycastle classes to generate digital certificate. My colleague worked on bouncy castle and it was working fine so far. I created new method in applet and signed it with code signing certificate in my machine. I uploaded applet on test server and it thrown error given below.  

Java Release note: Only digitally signed (Code signing) Applet will work 2014 onward
basic: exception: java.lang.NoClassDefFoundError: org/bouncycastle/asn1/ASN1ObjectIdentifier.
java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/bouncycastle/asn1/ASN1ObjectIdentifier
 at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter.instantiateApplet(Unknown Source)
 at sun.plugin2.applet.Plugin2Manager.initAppletAdapter(Unknown Source)
 at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
 at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: org/bouncycastle/asn1/ASN1ObjectIdentifier
 at java.lang.Class.getDeclaredConstructors0(Native Method)
 at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
 at java.lang.Class.getConstructor0(Unknown Source)
 at java.lang.Class.newInstance(Unknown Source)
 at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter$1.run(Unknown Source)
 at java.awt.event.InvocationEvent.dispatch(Unknown Source)
 at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
 at java.awt.EventQueue.access$200(Unknown Source)
 at java.awt.EventQueue$3.run(Unknown Source)
 at java.awt.EventQueue$3.run(Unknown Source)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
 at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
 at java.awt.EventQueue$4.run(Unknown Source)
 at java.awt.EventQueue$4.run(Unknown Source)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
 at java.awt.EventQueue.dispatchEvent(Unknown Source)
 at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
 at java.awt.EventDispatchThread.pumpEventsForFilter(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)
Caused by: java.lang.ClassNotFoundException: org.bouncycastle.asn1.ASN1ObjectIdentifier
 at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
 at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
 at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
 at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
 at java.lang.ClassLoader.loadClass(Unknown Source)
 ... 24 more
Solution:
After trying all options from internet at last we were clueless. I told him to sign applet in your system. He did it and worked fine. Reason is as follow...

We both having 64 bit system. In my system I installed 32 bit java and he has 64 bit java in his system. Thats the problem may be bouncy castle created using 64 bit Java. If you are getting same issue. Try to sign your applet using 64 bit java from
C:\Program Files (x86)\Java\jdk1.6.0_25\bin\jarsigner.exe

java.lang.SecurityException: JVM Shared, not allowed to set security manager

Java, Applet
I created custom security manager for Applet to get all permission. In below code I'm allowing applet to exit and its not good practice but situation driving me that way for while. I'm also searching for better option. If you guys have solution please comment it.
class customSecurityManager extends SecurityManager{
    SecurityManager original;

    customSecurityManager(SecurityManager original) {
      this.original = original;
    }

    /** Deny permission to exit the VM(uncomment line).*/
    public void checkExit(int status) {
      //throw(new SecurityException("Not allowed"));
    }

    /* Allow this security manager to be replaced,in fact allow pretty much everything. */
    public void checkPermission(Permission perm) {
    }

    public SecurityManager getOriginalSecurityManager() {
       return original;
    }
}
It works pretty well in many systems but one system was throwing an exception as follow...
java.lang.SecurityException: JVM Shared, not allowed to set security manager
 at sun.plugin2.applet.SecurityManagerHelper.checkPermissionHelper(Unknown Source)
 at sun.plugin2.applet.AWTAppletSecurityManager.checkPermission(Unknown Source)
 at java.lang.System.setSecurityManager0(Unknown Source)
 at java.lang.System.setSecurityManager(Unknown Source)
 at SecurityApplet.init(SecurityApplet.java:103)
 at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter.init(Unknown Source)
 at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
 at j ava.lang.Thread.run(Unknown Source)
After doing lots of search over internet and trying different options finally found solution for applet. Loading applet in separate JVM did the job.
<applet>
...
<param name="separate_jvm" value="true">
...
</applet>

How to attach MANIFEST.MF file in jar in/using Netbeans?


Step 1: Open build.xml file in notepad or other editor and paste below code within <project>...</project>
<target name="-pre-init">
        <property name="project.name" value="Name of your llibrary"/>
        <property name="version.num" value="1.4.1"/>
        <tstamp>
            <format pattern="yyyy-MM-dd HH:mm:ss z" property="NOW"></format>
        </tstamp>

    <!--
    <exec outputproperty="svna.version" executable="svnversion">
     <arg value="-c" />
     <redirector>
      <outputfilterchain>
       <tokenfilter>
        <replaceregex pattern="^[0-9]*:?" replace="" flags="g"/>
        <replaceregex pattern="M" replace="" flags="g"/>
       </tokenfilter>
      </outputfilterchain>
     </redirector>
    </exec>
    -->
        <manifest file="MANIFEST.MF">
            <attribute name="Codebase" value="*"/>           
            <attribute name="Permission" value="all-permissions"/>
            <attribute name="Application-Library-Allowable-Codebase" value="javaquery.com"/>
            <attribute name="Caller-Allowable-Codebase" value="www.javaquery.com javaquery.com"/>
            <attribute name="Application-Name" value="javaQuery"/>
            <attribute name="Bundle-Name" value="${project.name}"/>           
            <attribute name="Bundle-Version" value="${version.num}"/>
            <attribute name="Bundle-Date" value="${NOW}"/>
            <attribute name="Implementation-Title" value="${project.name}"/>
            <attribute name="Implementation-Version" value="${version.num}"/>
            <attribute name="Implementation-URL" value="http://www.javaquery.com"/>
            <!--<attribute name="Bundle-Revision" value="${svna.version}" />-->
        </manifest>
 </target>

Step 2: Edit your required details in attributes. Uncomment the SVN version code if you want to put SVN version details in MANIFEST.MF file

Step 3: Save build.xml file

Step 4: Set your project as main project in netbeans. Now Go to RUN > Clean and build main project

Step 5: Find your output jar file in dist folder of project.

Other Resources:
How to attach MANIFEST.MF file in jar in/using eclipse?
How to create .jar file in netbeans?

How to attach MANIFEST.MF file in jar in/using eclipse?

Every jar file you create using editor it explicitly attach MANIFEST.MF file in it. That contains basic information of that jar file. I was also generating jar file using editor regardless its MANIFEST.MF file. After major security changes in Java 1.7.0_45 its mandatory to specify some attribute in MANIFEST.MF in Applet jar. But its good practice to add this MANIFEST.MF file with proper information in it, whether its applet or simple jar file.

Step 1: Open up simple notepad or other text editor. Add your required attribute in it and save as "MANIFEST.MF" . Here is all attribute information of MANIFEST.MF file. This is my sample MANIFEST.MF file.
Manifest-Version: 1.0
Codebase: *
Permissions: all-permissions
Application-Library-Allowable-Codebase: *
Caller-Allowable-Codebase: *
Application-Name: Digital Certificate
Ant-Version: Apache Ant 1.8.3
Created-By: 1.6.0_25-b06 (Sun Microsystems Inc.)

Step 2: Copy MANIFEST.MF file in your project's folder.

jar, applet, manifest, eclipse

Step 3: Right click on project / file and click on Export.

jar, applet, manifest, eclipse

Step 4: Select JAR file in dialog box and click Next.

jar, applet, manifest, eclipse

Step 5: Select your output file and its location. And click Next.

jar, applet, manifest, eclipse

Step 6: Click Next in JAR Packaging option.
Step 7: Select "Use existing manifest from workspace" and browse your MANIFEST.MF file and click on finish. 

jar, applet, manifest, eclipse

Other Resources:
How to attach MANIFEST.MF file in jar in/using Netbeans?

This application will be blocked in a future Java security update because the JAR file manifest does not contain the Permissions attribute. Please contact the Publisher for more information.

Applet security


The new Java update "1.7.0_45" shows permission warning in applet. If you want to get rid of that warning you must have MANIFEST.MF file in your applet/jar with attribute called Permissions.

Sample MANIFEST.MF file
Manifest-Version: 1.0
Codebase: *
Permissions: all-permissions
Application-Library-Allowable-Codebase: *
Caller-Allowable-Codebase: *
Application-Name: Digital Certificate
Ant-Version: Apache Ant 1.8.3
Created-By: 1.6.0_25-b06 (Sun Microsystems Inc.)

Other Resources:
How to attach MANIFEST.MF file in jar in/using eclipse?
How to attach MANIFEST.MF file in jar in/using Netbeans?
For more details on MANIFEST attribute: http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/manifest.html

Solved: Applet crashes unexpectedly...

I came to across strange issue of applet. One of our client facing issue of applet not loading properly in any browsers. Sometime it loads and sometime don't. I manage to figure out the problem. Lets discuss it very briefly...

java applet

Problem / Issue : When browser request for an applet it start communication with local system's Java Virtual Machine. The communication last for 10 sec to respond. If browsers's virtual machine and local system's java virtual machine can't communicate with in 10 sec for that thread. Local machine's JVM kills that thread and that leads to crash/close of applet or console.

You may get the following error log in your console before it crashes...
cache: Initialize resource manager: com.sun.deploy.cache.ResourceProviderImpl@1d6399b
security: property package.access value sun.,com.sun.xml.internal.,com.sun.imageio.,com.sun.istack.internal.,com.sun.jmx.,com.sun.proxy.,com.sun.org.apache.bcel.internal.,com.sun.org.apache.regexp.internal.,com.sun.org.apache.xerces.internal.,com.sun.org.apache.xpath.internal.,com.sun.org.apache.xalan.internal.extensions.,com.sun.org.apache.xalan.internal.lib.,com.sun.org.apache.xalan.internal.res.,com.sun.org.apache.xalan.internal.templates.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.apache.xalan.internal.xslt.,com.sun.org.apache.xalan.internal.xsltc.cmdline.,com.sun.org.apache.xalan.internal.xsltc.compiler.,com.sun.org.apache.xalan.internal.xsltc.trax.,com.sun.org.apache.xalan.internal.xsltc.util.,com.sun.org.apache.xml.internal.res.,com.sun.org.apache.xml.internal.serializer.utils.,com.sun.org.apache.xml.internal.utils.,com.sun.org.apache.xml.internal.security.,com.sun.org.glassfish.,org.jcp.xml.dsig.internal.,com.sun.java.accessibility.
security: property package.access new value sun.,com.sun.xml.internal.,com.sun.imageio.,com.sun.istack.internal.,com.sun.jmx.,com.sun.proxy.,com.sun.org.apache.bcel.internal.,com.sun.org.apache.regexp.internal.,com.sun.org.apache.xerces.internal.,com.sun.org.apache.xpath.internal.,com.sun.org.apache.xalan.internal.extensions.,com.sun.org.apache.xalan.internal.lib.,com.sun.org.apache.xalan.internal.res.,com.sun.org.apache.xalan.internal.templates.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.apache.xalan.internal.xslt.,com.sun.org.apache.xalan.internal.xsltc.cmdline.,com.sun.org.apache.xalan.internal.xsltc.compiler.,com.sun.org.apache.xalan.internal.xsltc.trax.,com.sun.org.apache.xalan.internal.xsltc.util.,com.sun.org.apache.xml.internal.res.,com.sun.org.apache.xml.internal.serializer.utils.,com.sun.org.apache.xml.internal.utils.,com.sun.org.apache.xml.internal.security.,com.sun.org.glassfish.,org.jcp.xml.dsig.internal.,com.sun.java.accessibility.,com.sun.javaws,com.sun.deploy,com.sun.jnlp
security: property package.definition value sun.,com.sun.xml.internal.,com.sun.imageio.,com.sun.istack.internal.,com.sun.jmx.,com.sun.proxy.,com.sun.org.apache.bcel.internal.,com.sun.org.apache.regexp.internal.,com.sun.org.apache.xerces.internal.,com.sun.org.apache.xpath.internal.,com.sun.org.apache.xalan.internal.extensions.,com.sun.org.apache.xalan.internal.lib.,com.sun.org.apache.xalan.internal.res.,com.sun.org.apache.xalan.internal.templates.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.apache.xalan.internal.xslt.,com.sun.org.apache.xalan.internal.xsltc.cmdline.,com.sun.org.apache.xalan.internal.xsltc.compiler.,com.sun.org.apache.xalan.internal.xsltc.trax.,com.sun.org.apache.xalan.internal.xsltc.util.,com.sun.org.apache.xml.internal.res.,com.sun.org.apache.xml.internal.serializer.utils.,com.sun.org.apache.xml.internal.utils.,com.sun.org.apache.xml.internal.security.,com.sun.org.glassfish.,org.jcp.xml.dsig.internal.,com.sun.java.accessibility.
security: property package.definition new value sun.,com.sun.xml.internal.,com.sun.imageio.,com.sun.istack.internal.,com.sun.jmx.,com.sun.proxy.,com.sun.org.apache.bcel.internal.,com.sun.org.apache.regexp.internal.,com.sun.org.apache.xerces.internal.,com.sun.org.apache.xpath.internal.,com.sun.org.apache.xalan.internal.extensions.,com.sun.org.apache.xalan.internal.lib.,com.sun.org.apache.xalan.internal.res.,com.sun.org.apache.xalan.internal.templates.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.apache.xalan.internal.xslt.,com.sun.org.apache.xalan.internal.xsltc.cmdline.,com.sun.org.apache.xalan.internal.xsltc.compiler.,com.sun.org.apache.xalan.internal.xsltc.trax.,com.sun.org.apache.xalan.internal.xsltc.util.,com.sun.org.apache.xml.internal.res.,com.sun.org.apache.xml.internal.serializer.utils.,com.sun.org.apache.xml.internal.utils.,com.sun.org.apache.xml.internal.security.,com.sun.org.glassfish.,org.jcp.xml.dsig.internal.,com.sun.java.accessibility.,com.sun.javaws,com.sun.deploy,com.sun.jnlp
security: property package.access value sun.,com.sun.xml.internal.,com.sun.imageio.,com.sun.istack.internal.,com.sun.jmx.,com.sun.proxy.,com.sun.org.apache.bcel.internal.,com.sun.org.apache.regexp.internal.,com.sun.org.apache.xerces.internal.,com.sun.org.apache.xpath.internal.,com.sun.org.apache.xalan.internal.extensions.,com.sun.org.apache.xalan.internal.lib.,com.sun.org.apache.xalan.internal.res.,com.sun.org.apache.xalan.internal.templates.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.apache.xalan.internal.xslt.,com.sun.org.apache.xalan.internal.xsltc.cmdline.,com.sun.org.apache.xalan.internal.xsltc.compiler.,com.sun.org.apache.xalan.internal.xsltc.trax.,com.sun.org.apache.xalan.internal.xsltc.util.,com.sun.org.apache.xml.internal.res.,com.sun.org.apache.xml.internal.serializer.utils.,com.sun.org.apache.xml.internal.utils.,com.sun.org.apache.xml.internal.security.,com.sun.org.glassfish.,org.jcp.xml.dsig.internal.,com.sun.java.accessibility.,com.sun.javaws,com.sun.deploy,com.sun.jnlp
security: property package.access new value sun.,com.sun.xml.internal.,com.sun.imageio.,com.sun.istack.internal.,com.sun.jmx.,com.sun.proxy.,com.sun.org.apache.bcel.internal.,com.sun.org.apache.regexp.internal.,com.sun.org.apache.xerces.internal.,com.sun.org.apache.xpath.internal.,com.sun.org.apache.xalan.internal.extensions.,com.sun.org.apache.xalan.internal.lib.,com.sun.org.apache.xalan.internal.res.,com.sun.org.apache.xalan.internal.templates.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.apache.xalan.internal.xslt.,com.sun.org.apache.xalan.internal.xsltc.cmdline.,com.sun.org.apache.xalan.internal.xsltc.compiler.,com.sun.org.apache.xalan.internal.xsltc.trax.,com.sun.org.apache.xalan.internal.xsltc.util.,com.sun.org.apache.xml.internal.res.,com.sun.org.apache.xml.internal.serializer.utils.,com.sun.org.apache.xml.internal.utils.,com.sun.org.apache.xml.internal.security.,com.sun.org.glassfish.,org.jcp.xml.dsig.internal.,com.sun.java.accessibility.,com.sun.javaws,com.sun.deploy,com.sun.jnlp,org.mozilla.jss
security: property package.definition value sun.,com.sun.xml.internal.,com.sun.imageio.,com.sun.istack.internal.,com.sun.jmx.,com.sun.proxy.,com.sun.org.apache.bcel.internal.,com.sun.org.apache.regexp.internal.,com.sun.org.apache.xerces.internal.,com.sun.org.apache.xpath.internal.,com.sun.org.apache.xalan.internal.extensions.,com.sun.org.apache.xalan.internal.lib.,com.sun.org.apache.xalan.internal.res.,com.sun.org.apache.xalan.internal.templates.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.apache.xalan.internal.xslt.,com.sun.org.apache.xalan.internal.xsltc.cmdline.,com.sun.org.apache.xalan.internal.xsltc.compiler.,com.sun.org.apache.xalan.internal.xsltc.trax.,com.sun.org.apache.xalan.internal.xsltc.util.,com.sun.org.apache.xml.internal.res.,com.sun.org.apache.xml.internal.serializer.utils.,com.sun.org.apache.xml.internal.utils.,com.sun.org.apache.xml.internal.security.,com.sun.org.glassfish.,org.jcp.xml.dsig.internal.,com.sun.java.accessibility.,com.sun.javaws,com.sun.deploy,com.sun.jnlp
security: property package.definition new value sun.,com.sun.xml.internal.,com.sun.imageio.,com.sun.istack.internal.,com.sun.jmx.,com.sun.proxy.,com.sun.org.apache.bcel.internal.,com.sun.org.apache.regexp.internal.,com.sun.org.apache.xerces.internal.,com.sun.org.apache.xpath.internal.,com.sun.org.apache.xalan.internal.extensions.,com.sun.org.apache.xalan.internal.lib.,com.sun.org.apache.xalan.internal.res.,com.sun.org.apache.xalan.internal.templates.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.apache.xalan.internal.xslt.,com.sun.org.apache.xalan.internal.xsltc.cmdline.,com.sun.org.apache.xalan.internal.xsltc.compiler.,com.sun.org.apache.xalan.internal.xsltc.trax.,com.sun.org.apache.xalan.internal.xsltc.util.,com.sun.org.apache.xml.internal.res.,com.sun.org.apache.xml.internal.serializer.utils.,com.sun.org.apache.xml.internal.utils.,com.sun.org.apache.xml.internal.security.,com.sun.org.glassfish.,org.jcp.xml.dsig.internal.,com.sun.java.accessibility.,com.sun.javaws,com.sun.deploy,com.sun.jnlp,org.mozilla.jss
security: property package.access value sun.,com.sun.xml.internal.,com.sun.imageio.,com.sun.istack.internal.,com.sun.jmx.,com.sun.proxy.,com.sun.org.apache.bcel.internal.,com.sun.org.apache.regexp.internal.,com.sun.org.apache.xerces.internal.,com.sun.org.apache.xpath.internal.,com.sun.org.apache.xalan.internal.extensions.,com.sun.org.apache.xalan.internal.lib.,com.sun.org.apache.xalan.internal.res.,com.sun.org.apache.xalan.internal.templates.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.apache.xalan.internal.xslt.,com.sun.org.apache.xalan.internal.xsltc.cmdline.,com.sun.org.apache.xalan.internal.xsltc.compiler.,com.sun.org.apache.xalan.internal.xsltc.trax.,com.sun.org.apache.xalan.internal.xsltc.util.,com.sun.org.apache.xml.internal.res.,com.sun.org.apache.xml.internal.serializer.utils.,com.sun.org.apache.xml.internal.utils.,com.sun.org.apache.xml.internal.security.,com.sun.org.glassfish.,org.jcp.xml.dsig.internal.,com.sun.java.accessibility.,com.sun.javaws,com.sun.deploy,com.sun.jnlp,org.mozilla.jss
security: property package.access new value sun.,com.sun.xml.internal.,com.sun.imageio.,com.sun.istack.internal.,com.sun.jmx.,com.sun.proxy.,com.sun.org.apache.bcel.internal.,com.sun.org.apache.regexp.internal.,com.sun.org.apache.xerces.internal.,com.sun.org.apache.xpath.internal.,com.sun.org.apache.xalan.internal.extensions.,com.sun.org.apache.xalan.internal.lib.,com.sun.org.apache.xalan.internal.res.,com.sun.org.apache.xalan.internal.templates.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.apache.xalan.internal.xslt.,com.sun.org.apache.xalan.internal.xsltc.cmdline.,com.sun.org.apache.xalan.internal.xsltc.compiler.,com.sun.org.apache.xalan.internal.xsltc.trax.,com.sun.org.apache.xalan.internal.xsltc.util.,com.sun.org.apache.xml.internal.res.,com.sun.org.apache.xml.internal.serializer.utils.,com.sun.org.apache.xml.internal.utils.,com.sun.org.apache.xml.internal.security.,com.sun.org.glassfish.,org.jcp.xml.dsig.internal.,com.sun.java.accessibility.,com.sun.javaws,com.sun.deploy,com.sun.jnlp,org.mozilla.jss,com.sun.browser,com.sun.glass,com.sun.javafx,com.sun.media.jfxmedia,com.sun.media.jfxmediaimpl,com.sun.openpisces,com.sun.prism,com.sun.scenario,com.sun.t2k,com.sun.webpane,com.sun.pisces,com.sun.webkit
security: property package.definition value sun.,com.sun.xml.internal.,com.sun.imageio.,com.sun.istack.internal.,com.sun.jmx.,com.sun.proxy.,com.sun.org.apache.bcel.internal.,com.sun.org.apache.regexp.internal.,com.sun.org.apache.xerces.internal.,com.sun.org.apache.xpath.internal.,com.sun.org.apache.xalan.internal.extensions.,com.sun.org.apache.xalan.internal.lib.,com.sun.org.apache.xalan.internal.res.,com.sun.org.apache.xalan.internal.templates.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.apache.xalan.internal.xslt.,com.sun.org.apache.xalan.internal.xsltc.cmdline.,com.sun.org.apache.xalan.internal.xsltc.compiler.,com.sun.org.apache.xalan.internal.xsltc.trax.,com.sun.org.apache.xalan.internal.xsltc.util.,com.sun.org.apache.xml.internal.res.,com.sun.org.apache.xml.internal.serializer.utils.,com.sun.org.apache.xml.internal.utils.,com.sun.org.apache.xml.internal.security.,com.sun.org.glassfish.,org.jcp.xml.dsig.internal.,com.sun.java.accessibility.,com.sun.javaws,com.sun.deploy,com.sun.jnlp,org.mozilla.jss
security: property package.definition new value sun.,com.sun.xml.internal.,com.sun.imageio.,com.sun.istack.internal.,com.sun.jmx.,com.sun.proxy.,com.sun.org.apache.bcel.internal.,com.sun.org.apache.regexp.internal.,com.sun.org.apache.xerces.internal.,com.sun.org.apache.xpath.internal.,com.sun.org.apache.xalan.internal.extensions.,com.sun.org.apache.xalan.internal.lib.,com.sun.org.apache.xalan.internal.res.,com.sun.org.apache.xalan.internal.templates.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.apache.xalan.internal.xslt.,com.sun.org.apache.xalan.internal.xsltc.cmdline.,com.sun.org.apache.xalan.internal.xsltc.compiler.,com.sun.org.apache.xalan.internal.xsltc.trax.,com.sun.org.apache.xalan.internal.xsltc.util.,com.sun.org.apache.xml.internal.res.,com.sun.org.apache.xml.internal.serializer.utils.,com.sun.org.apache.xml.internal.utils.,com.sun.org.apache.xml.internal.security.,com.sun.org.glassfish.,org.jcp.xml.dsig.internal.,com.sun.java.accessibility.,com.sun.javaws,com.sun.deploy,com.sun.jnlp,org.mozilla.jss,com.sun.browser,com.sun.glass,com.sun.javafx,com.sun.media.jfxmedia,com.sun.media.jfxmediaimpl,com.sun.openpisces,com.sun.prism,com.sun.scenario,com.sun.t2k,com.sun.webpane,com.sun.pisces,com.sun.webkit
security:  --- parseCommandLine converted : -Djava.net.preferIPv4Stack=true
into:
[-Djava.net.preferIPv4Stack=true]
basic: Added progress listener: sun.plugin.util.ProgressMonitorAdapter@f56959
basic: Plugin2ClassLoader.addURL parent called for http://demo.digi-corp.com:82/vishal/vicky_test/encryptionApplet80.jar
basic: Plugin2ClassLoader.addURL parent called for http://demo.digi-corp.com:82/vishal/vicky_test/json-rpc-1.0.jar
security: Blacklist revocation check is enabled
security: blacklist: created: NEED_LOAD, lastModified: 1376464928710
security: blacklist: hasBeenModifiedSince 1378286011099 (we have 1376464928710)
security: Trusted libraries list check is enabled
network: Cache entry found [url: http://demo.digi-corp.com:82/vishal/vicky_test/encryptionApplet80.jar, version: null] prevalidated=false/0
cache: Adding MemoryCache entry: http://demo.digi-corp.com:82/vishal/vicky_test/encryptionApplet80.jar
cache: Resource http://demo.digi-corp.com:82/vishal/vicky_test/encryptionApplet80.jar has expired.
network: Connecting http://demo.digi-corp.com:82/vishal/vicky_test/encryptionApplet80.jar with proxy=HTTP @ ISA-SERVER2006/10.192.192.4:8080
java.io.IOException: Error 0 writing to WindowsNamedPipe: server: false; readPipe: jpi2_pid3096_pipe2, readBufferSz: 4096; writePipe: jpi2_pid3096_pipe3, writeBufferSz: 4096: numWritten 0, WriteFile ts: 10732770661, now ts: 10732770769, dT 108
 at sun.plugin2.ipc.windows.WindowsNamedPipe.write(Unknown Source)
 at sun.plugin2.message.transport.NamedPipeTransport$SerializerImpl.flush(Unknown Source)
 at sun.plugin2.message.transport.NamedPipeTransport.signalDataWritten(Unknown Source)
 at sun.plugin2.message.transport.SerializingTransport.write(Unknown Source)
 at sun.plugin2.message.Pipe.send(Unknown Source)
 at sun.plugin2.main.client.MessagePassingExecutionContext.doCookieOp(Unknown Source)
 at sun.plugin2.main.client.MessagePassingExecutionContext.getCookie(Unknown Source)
 at sun.plugin2.main.client.PluginCookieSelector.getCookieFromBrowser(Unknown Source)
 at com.sun.deploy.net.cookie.DeployCookieSelector.getCookieInfo(Unknown Source)
 at com.sun.deploy.net.cookie.DeployCookieSelector.get(Unknown Source)
 at sun.net.www.protocol.http.HttpURLConnection.setCookieHeader(Unknown Source)
 at sun.net.www.protocol.http.HttpURLConnection.writeRequests(Unknown Source)
 at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
 at com.sun.deploy.net.HttpUtils.followRedirects(Unknown Source)
 at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
 at com.sun.deploy.net.BasicHttpRequest.doGetRequestEX(Unknown Source)
 at com.sun.deploy.cache.ResourceProviderImpl.checkUpdateAvailable(Unknown Source)
 at com.sun.deploy.cache.ResourceProviderImpl.isUpdateAvailable(Unknown Source)
 at com.sun.deploy.cache.DeployCacheHandler.get(Unknown Source)
 at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
 at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
 at sun.plugin.PluginURLJarFileCallBack.connect(Unknown Source)
 at sun.plugin.PluginURLJarFileCallBack.retrieve(Unknown Source)
 at sun.net.www.protocol.jar.URLJarFile.retrieve(Unknown Source)
 at sun.net.www.protocol.jar.URLJarFile.getJarFile(Unknown Source)
 at sun.net.www.protocol.jar.JarFileFactory.get(Unknown Source)
 at sun.net.www.protocol.jar.JarURLConnection.connect(Unknown Source)
 at sun.plugin.net.protocol.jar.CachedJarURLConnection.connect(Unknown Source)
 at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFileInternal(Unknown Source)
 at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFile(Unknown Source)
 at com.sun.deploy.security.DeployURLClassPath$JarLoader.getJarFile(Unknown Source)
 at com.sun.deploy.security.DeployURLClassPath$JarLoader.access$1000(Unknown Source)
 at com.sun.deploy.security.DeployURLClassPath$JarLoader$1.run(Unknown Source)
 at java.security.AccessController.doPrivileged(Native Method)
 at com.sun.deploy.security.DeployURLClassPath$JarLoader.ensureOpen(Unknown Source)
 at com.sun.deploy.security.DeployURLClassPath$JarLoader.(Unknown Source)
 at com.sun.deploy.security.DeployURLClassPath$3.run(Unknown Source)
 at java.security.AccessController.doPrivileged(Native Method)
 at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
 at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
 at com.sun.deploy.security.DeployURLClassPath.getResource(Unknown Source)
 at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
 at java.security.AccessController.doPrivileged(Native Method)
 at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown Source)
 at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
 at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
 at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
 at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
 at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
 at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
 at java.lang.ClassLoader.loadClass(Unknown Source)
 at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
 at sun.plugin2.applet.Plugin2Manager.initAppletAdapter(Unknown Source)
 at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
 at java.lang.Thread.run(Unknown Source)
network: Cookie service is not available - use cache to determine "Cookie"

[ ... ]
JVMInstance (1.6.0.10) processing HeartbeatMessage, recv ts: 434920815362, send ts: 434920815390, dT: 28
[ ... ]
JVMInstance (1.6.0.10) processing HeartbeatMessage, recv ts: 434930816346, send ts: 434930816358, dT: 12
[ ... ]
JVMInstance for 1.6.0.10 killing sub-process because of no heartbeat reply
JVM instance for 1.6.0.10 exited
JVMInstance.unregisterApplet for applet ID 1
  LiveConnectSupport.shutdown(1)
  LiveConnectSupport: released [BrowserSideObject 0x2710ae8] for applet 1
  LiveConnectSupport: released [BrowserSideObject 0x2745200] for applet 1
java.io.IOException: Error closing named pipes
        at sun.plugin2.ipc.windows.WindowsNamedPipe.close(Unknown Source)
        at sun.plugin2.message.transport.NamedPipeTransport.shutdown(Unknown Source)
        at sun.plugin2.message.transport.NamedPipeTransportFactory.dispose(Unknown Source)
        at sun.plugin2.main.server.JVMInstance.disposePipe(Unknown Source)
        at sun.plugin2.main.server.JVMInstance.dispose(Unknown Source)
        at sun.plugin2.main.server.JVMInstance.access$2600(Unknown Source)
        at sun.plugin2.main.server.JVMInstance$Listener.jvmExited(Unknown Source)
        at sun.plugin2.jvm.JVMLauncher.fireJVMExited(Unknown Source)
        at sun.plugin2.jvm.JVMLauncher.access$300(Unknown Source)
        at sun.plugin2.jvm.JVMLauncher$JVMWatcher.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
Terminating Java Plug-In Pipe Worker Thread (Server-Side) due to exception:
java.io.IOException: Error 0 reading from named pipe, numRead 0, ReadFile ts: 43
4962650222, now ts: 434962680979, dT 30757
        at sun.plugin2.ipc.windows.WindowsNamedPipe.read(Unknown Source)
        at sun.plugin2.message.transport.NamedPipeTransport$SerializerImpl.read(Unknown Source)
        at sun.plugin2.message.transport.NamedPipeTransport$SerializerImpl.readByte(Unknown Source)
        at sun.plugin2.message.AbstractSerializer.readInt(Unknown Source)
        at sun.plugin2.message.transport.SerializingTransport.read(Unknown Source)
        at sun.plugin2.message.Pipe$WorkerThread.run(Unknown Source)
IExplorerPlugin.OnFrameWindowActivate(cAxControl = 0x3561278, true)
IExplorerPlugin.OnFrameWindowActivate(cAxControl = 0x3561278, false)
IExplorerPlugin.SetObjectRects(cAxControl = 0x3561278, left = 2, right = 1272, top = 2, bottom = 995)
IExplorerPlugin.SetObjectRects(cAxControl = 0x3561278, left = 2, right = 1272, top = 2, bottom = 995)
IExplorerPlugin.OnFrameWindowActivate(cAxControl = 0x3561278, true)
IExplorerPlugin.OnSetFocus(cAxControl = 0x3561278)
IExplorerPlugin.OnFrameWindowActivate(cAxControl = 0x3561278, true)
IExplorerPlugin.OnFrameWindowActivate(cAxControl = 0x3561278, false)
[ ... ]

Solution is quite simple but you have to o it manually or create an executable file for that. You need to set environment variable in your system so it makes browsers's VM and local machine's JVM independent.

Set JPI_PLUGIN2_NO_HEARTBEAT = 1 system environment variable. (windows system only)

Referrals:
- https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/Tivoli+Network+Manager/page/Browser+JRE
- http://prsync.com/oracle/script-to-set-noheartbeat-flag-490392/
- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6953754
- http://stackoverflow.com/questions/18525908/certificate-loading-issue/18682680#18682680