1

I am using a java viewer (applet) to view images in my .NET application.

It was working until latest JRE update. Every client that updated java is throwing the following error (in all browsers):

enter image description here

Here are the Details:

Java Plug-in 10.21.2.11 Using JRE version 1.7.0_21-b11 Java
HotSpot(TM) Client VM User home directory = C:\Documents and
Settings\Administrator
---------------------------------------------------- c:   clear console window f:   finalize objects on finalization queue g:  
garbage collect h:   display this help message l:   dump classloader
list m:   print memory usage o:   trigger logging q:   hide console r:
reload policy configuration s:   dump system and deployment properties
t:   dump thread list v:   dump thread stack x:   clear classloader
cache 0-5: set trace level to <n>
----------------------------------------------------
                Match: beginTraversal Match: digest selected JREDesc: JREDesc[version 1.4+, heap=-1--1, args=-Xmx512m
-Dsun.security.ssl.allowUnsafeRenegotiation=true, href=http://java.sun.com/products/autodl/j2se, sel=false, null, null],
JREInfo: JREInfo for index 0:
    platform is: 1.7
    product is: 1.7.0_21
    location is: http://java.sun.com/products/autodl/j2se
    path is: C:\Program Files\Java\jre7\bin\javaw.exe
    args is: 
    native platform is: Windows, x86 [ x86, 32bit ]
    JavaFX runtime is: JavaFX 2.2.21 found at C:\Program Files\Java\jre7\
    enabled is: true
    registered is: true
    system is: true

                Match: ignoring maxHeap: -1
                Match: ignoring InitHeap: -1
                Match: digesting vmargs: -Xmx512m -Dsun.security.ssl.allowUnsafeRenegotiation=true
                Match: digested vmargs: [JVMParameters: isSecure: false, args: -Xmx512m
-Dsun.security.ssl.allowUnsafeRenegotiation=true]
                Match: selecting maxHeap(2): 536870912
                Match: JVM args after accumulation: [JVMParameters: isSecure: false, args:
-Dsun.security.ssl.allowUnsafeRenegotiation=true]
                Match: digest LaunchDesc: null
                Match: digest properties: []
                Match: JVM args: [JVMParameters: isSecure: false, args: -Dsun.security.ssl.allowUnsafeRenegotiation=true]
                Match: endTraversal ..
                Match: JVM args final: -Xmx512m -Dsun.security.ssl.allowUnsafeRenegotiation=true
                Match: Running JREInfo Version    match: 1.7.0.21 == 1.7.0.21
                Match: Running JVM args match the secure subset: have:<-Xmx512m>  satisfy want:<-Xmx512m
-Dsun.security.ssl.allowUnsafeRenegotiation=true>
                Match: beginTraversal Match: digest selected JREDesc: JREDesc[version 1.4+, heap=-1--1, args=-Xmx512m
-Dsun.security.ssl.allowUnsafeRenegotiation=true, href=http://java.sun.com/products/autodl/j2se, sel=false, null, null],
JREInfo: JREInfo for index 0:
    platform is: 1.7
    product is: 1.7.0_21
    location is: http://java.sun.com/products/autodl/j2se
    path is: C:\Program Files\Java\jre7\bin\javaw.exe
    args is: 
    native platform is: Windows, x86 [ x86, 32bit ]
    JavaFX runtime is: JavaFX 2.2.21 found at C:\Program Files\Java\jre7\
    enabled is: true
    registered is: true
    system is: true

                Match: ignoring maxHeap: -1
                Match: ignoring InitHeap: -1
                Match: digesting vmargs: -Xmx512m -Dsun.security.ssl.allowUnsafeRenegotiation=true
                Match: digested vmargs: [JVMParameters: isSecure: false, args: -Xmx512m
-Dsun.security.ssl.allowUnsafeRenegotiation=true]
                Match: selecting maxHeap(2): 536870912
                Match: JVM args after accumulation: [JVMParameters: isSecure: false, args:
-Dsun.security.ssl.allowUnsafeRenegotiation=true]
                Match: digest LaunchDesc: null
                Match: digest properties: []
                Match: JVM args: [JVMParameters: isSecure: false, args: -Dsun.security.ssl.allowUnsafeRenegotiation=true]
                Match: endTraversal ..
                Match: JVM args final: -Xmx512m -Dsun.security.ssl.allowUnsafeRenegotiation=true
                Match: Running JREInfo Version    match: 1.7.0.21 == 1.7.0.21
                Match: Running JVM args match the secure subset: have:<-Xmx512m>  satisfy want:<-Xmx512m
-Dsun.security.ssl.allowUnsafeRenegotiation=true>

As jatin suggested i checked the static blocks in the initialize folder and it looks like the problem is here:

    static { 
    // This gets rid of exception for not using native acceleration
    System.setProperty("com.sun.media.jai.disableMediaLib", "true");
    System.setProperty("sun.security.ssl.allowUnsafeRenegotiation", "true");
} 

I commented this rows and now java is not throwing erros, but the applet does not work (its not loading images as it should)...

Since i did not develop this app i would appreciate any tip on how to keep this functionality and correct the exception that is thrown after new JRE 1.7 update 21.

Please some help!!

no9
  • 6,424
  • 25
  • 76
  • 115
  • 1
    You need to provide a stacktrace. – Stephen C Apr 22 '13 at 08:57
  • My application screwed up last time i updated Java. Important Moral: Always use the last stable built. Which means, use Java 6 in production. – Jatin Apr 22 '13 at 09:01
  • the problem is that clients updated java... i usually disable automatic updates but some IT guys tend to change it.... and now im screwed. – no9 Apr 22 '13 at 09:07
  • With this information, no one can help you. Please provide logs or stack trace – Jatin Apr 22 '13 at 09:20
  • http://stackoverflow.com/questions/3375810/exception-in-initializer-error might help. It has got to do with static blocks – Jatin Apr 22 '13 at 09:22
  • As others said you must provide more details (e.g. the stacktrace). Furthermore, you must make a clear statement reg upward compatibility and rethink your deployment approach... you might want to deliver a JRE as part of your application and should not simply use the OS default JRE. – home Apr 22 '13 at 09:40
  • i tried debugging the application but no exception is thrown... – no9 Apr 22 '13 at 11:18
  • http://stackoverflow.com/questions/20066914/application-error-accesscontrolexception seems to be related to this question. – halfbit Nov 19 '13 at 09:08

3 Answers3

6

Try to sign your applet with a certificate from a trusted certificate authority. Look here for more info:

Starting with Java SE 7 Update 21 in April 2013, all Java Applets and Web Start Applications should be signed with a trusted certificate.

mavroprovato
  • 8,023
  • 5
  • 37
  • 52
0

Are any of the following true:

1) Web server using SSL (looks to be true by the output above, just wanted to confirm) 2) Web server FQDN does not match hostname in URL in address bar (i.e., using DNS alias)

If 2 is true, does it work when using the FQDN in the address bar instead of the alias?

jeff
  • 1
0

Go to the control panel, open the Java control panel, go to the security tab and lower it.

Done.

Niall C.
  • 10,878
  • 7
  • 69
  • 61