JRE exceptions

Hi..
I have recently posted following message to the Java Runtime Environment (JRE) list. Unfrotunately i got no aswers. Maybe someone here can help me.
thanks!
Konrad Zagorowicz
Hi.
I am working on a win32 project that use java (via jre) as an extension to the c++ code. There are specific events in the c++ code that calls methods from java classes (via JNIEnv::CallVoidMethod and similar). Additionally java classes may have native methods defined. And here a problem shows up. When a native code has a bug that causes an exception (eg. access violation) the application closes immediately: no dialogbox and worse no debug stop. The only information about the bug and its location is the hs_err_pid*.log file. When a similar bug happens in none native code normal exception handling occurs. By normal I mean the debuger stops at a location where bug occured (usualy acces violation) or an appropriate messagebox is displayed. I tried to setup my own exception handlers by using win32 api calls:
setse_translator
setse_translator_function
SetUnhandledExceptionFilter
but it didnt work. JRE still handles exceptions in the native code. So here is my question: Can I some how turn off JRE excepition handling in the native code. Or maybe I can some how provide a callback to get informed about the exception. I tried to look for a solution in the jdk and in the archives but I found nothing.
thanks in advance
Konrad

Hi,
Recently I've had the same problem as yours and it took me a while to debug properly the issue. In the end, it was all documented in the setse_translator documentation page:
+" To specify a custom translation function, call _set_se_translator with the name of your translation function as its argument. The translator function that you write is called once for each function invocation on the stack that has try blocks. There is no default translator function.+
+Your translator function should do no more than throw a C++ typed exception. If it does anything in addition to throwing (such as writing to a log file, for example) your program might not behave as expected, because the number of times the translator function is invoked is platform-dependent. "+
JVM only creates the dumps and terminates when you end up with an unhandled exception. To prevent that you can use the __try/__except blocks (as the first answer suggested) or you can try the C++ approach:
void Java_...._myfunc(JNIEnv *e, jobject mythis) {
  try {
    _set_se_translator(my_se_translator_func);
   // do whatever you need
  } catch(const MySEMappedException & e) {
  }Regards,
Paulo.
Edited by: Paulo_P on Jun 6, 2009 8:37 PM

Similar Messages

  • Jre exception

    hi
    when I compile a program of capture device,I get the following exception from the JRE:
    # An unexpected error has been detected by Java Runtime Environment:
    # SIGSEGV (0xb) at pc=0xb80a95e7, pid=4781, tid=3085798288
    # Java VM: Java HotSpot(TM) Client VM (11.0-b15 mixed mode, sharing linux-x86)
    # Problematic frame:
    # C [ld-linux.so.2+0x155e7]
    # If you would like to submit a bug report, please visit:
    # http://java.sun.com/webapps/bugreport/crash.jsp
    # The crash happened outside the Java Virtual Machine in native code.
    # See problematic frame for where to report the bug.
    --------------- T H R E A D ---------------
    Current thread (0x087b5800): JavaThread "main" [_thread_in_native, id=4784, stack(0xb7e88000,0xb7ed9000)]
    siginfo:si_signo=SIGSEGV: si_errno=0, si_code=1 (SEGV_MAPERR), si_addr=0x00001771
    Registers:
    EAX=0x00001771, EBX=0xb80afff4, ECX=0x00002424, EDX=0x24242424
    ESP=0xb7ed6a68, EBP=0xb7ed6bb8, ESI=0x00001771, EDI=0xb53bd4e8
    EIP=0xb80a95e7, CR2=0x00001771, EFLAGS=0x00210202
    Top of Stack: (sp=0xb7ed6a68)
    0xb7ed6a68: b53bd4e8 b809fef2 00001771 00000024
    0xb7ed6a78: b7ed6c54 b80afff4 00000000 b806b578
    0xb7ed6a88: 00000000 b80a0da0 b7ed6b88 b7ed6c54
    0xb7ed6a98: b80afff4 b7ed6b88 00000001 b553a888
    0xb7ed6aa8: b7ed6a80 b7ed6b88 0000003a 00000041
    0xb7ed6ab8: 00000000 00000019 00000001 b5549c78
    0xb7ed6ac8: b7ed6aa0 00000033 0000002b 00000000
    0xb7ed6ad8: 0000001f 0000003e b80abe54 b80abecc
    Instructions: (pc=0xb80a95e7)
    0xb80a95d7: 24 0c 88 d6 89 d1 c1 e2 10 66 89 ca a8 03 74 4c
    0xb80a95e7: 8a 08 38 ca 0f 84 44 01 00 00 84 c9 0f 84 11 01
    Stack: [0xb7e88000,0xb7ed9000], sp=0xb7ed6a68, free space=314k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    C [ld-linux.so.2+0x155e7]
    C [ld-linux.so.2+0x11947]
    C [ld-linux.so.2+0xd716]
    C [ld-linux.so.2+0x112ee]
    C [libdl.so.2+0xbec]
    C [ld-linux.so.2+0xd716]
    C [libdl.so.2+0x101c]
    C [libdl.so.2+0xb21] dlopen+0x41
    V [libjvm.so+0x30ccca]
    V [libjvm.so+0x283bca]
    C [libjava.so+0xbcac] Java_java_lang_ClassLoader_00024NativeLibrary_load+0x6c
    j java.lang.ClassLoader$NativeLibrary.load(Ljava/lang/String;)V+0
    j java.lang.ClassLoader.loadLibrary0(Ljava/lang/Class;Ljava/io/File;)Z+300
    j java.lang.ClassLoader.loadLibrary(Ljava/lang/Class;Ljava/lang/String;Z)V+296
    j java.lang.Runtime.loadLibrary0(Ljava/lang/Class;Ljava/lang/String;)V+54
    j java.lang.System.loadLibrary(Ljava/lang/String;)V+7
    j com.sun.media.JMFSecurityManager.loadLibrary(Ljava/lang/String;)V+19
    j com.sun.media.protocol.v4l.V4LCapture.<clinit>()V+2
    v ~StubRoutines::call_stub
    V [libjvm.so+0x21b03d]
    V [libjvm.so+0x30f778]
    V [libjvm.so+0x21aed0]
    V [libjvm.so+0x1fe2b6]
    V [libjvm.so+0x1fd040]
    V [libjvm.so+0x1fc388]
    V [libjvm.so+0x2127e8]
    j com.sun.media.protocol.v4l.V4LDeviceQuery.getV4lCaptureForDefice(I)Lcom/sun/media/protocol/v4l/V4LCapture;+23
    j com.sun.media.protocol.v4l.V4LDeviceQuery.sendQuery(I)V+12
    j capture_devicce.V4LAuto.autoDetect(I)Ljavax/media/CaptureDeviceInfo;+15
    j capture_devicce.V4LAuto.autoDetectDevices()I+74
    j capture_devicce.JmfDeviceDetector.detectCaptureDevices()V+183
    j capture_devicce.JmfDeviceDetector.initialize()V+92
    j capture_devicce.JmfDeviceDetector.setupJMF()V+242
    j capture_devicce.JmfDeviceDetector.detectAndConfigureCaptureDevices()V+0
    j capture_devicce.JmfDeviceDetector.main([Ljava/lang/String;)V+0
    v ~StubRoutines::call_stub
    V [libjvm.so+0x21b03d]
    V [libjvm.so+0x30f778]
    V [libjvm.so+0x21aed0]
    V [libjvm.so+0x244686]
    V [libjvm.so+0x235e88]
    C [java+0x1b98] JavaMain+0x2c8
    C [libpthread.so.0+0x650f]
    Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
    j java.lang.ClassLoader$NativeLibrary.load(Ljava/lang/String;)V+0
    j java.lang.ClassLoader.loadLibrary0(Ljava/lang/Class;Ljava/io/File;)Z+300
    j java.lang.ClassLoader.loadLibrary(Ljava/lang/Class;Ljava/lang/String;Z)V+296
    j java.lang.Runtime.loadLibrary0(Ljava/lang/Class;Ljava/lang/String;)V+54
    j java.lang.System.loadLibrary(Ljava/lang/String;)V+7
    j com.sun.media.JMFSecurityManager.loadLibrary(Ljava/lang/String;)V+19
    j com.sun.media.protocol.v4l.V4LCapture.<clinit>()V+2
    v ~StubRoutines::call_stub
    j com.sun.media.protocol.v4l.V4LDeviceQuery.getV4lCaptureForDefice(I)Lcom/sun/media/protocol/v4l/V4LCapture;+23
    j com.sun.media.protocol.v4l.V4LDeviceQuery.sendQuery(I)V+12
    j capture_devicce.V4LAuto.autoDetect(I)Ljavax/media/CaptureDeviceInfo;+15
    j capture_devicce.V4LAuto.autoDetectDevices()I+74
    j capture_devicce.JmfDeviceDetector.detectCaptureDevices()V+183
    j capture_devicce.JmfDeviceDetector.initialize()V+92
    j capture_devicce.JmfDeviceDetector.setupJMF()V+242
    j capture_devicce.JmfDeviceDetector.detectAndConfigureCaptureDevices()V+0
    j capture_devicce.JmfDeviceDetector.main([Ljava/lang/String;)V+0
    v ~StubRoutines::call_stub
    PLZ I need a help
    best regards

    Let me get that straight:
    Your JVM crashes after you tried to [manually copy the .so files of JMF into your JRE directory in order to avoid having to install it|http://forums.sun.com/thread.jspa?threadID=536983].
    I'd bet quite some money that you incorrectly transfered the .so (probably some byte[]->String conversions in there) and therefore your .so file is funked up.
    Let this teach you: don't try to be smarter than the library you try to use. Install it normally, as the installation instructions tell you and it will work.

  • BI4.1 SP2 JRE error

    Hi,
    Attached is the client JVM trace containing an error that occurs when i try to modify some of my documents in java mode.
    The error is triggered exactly when i try to show the header and/or the footer in page mode on a report.
    As a result the report freezes and is not usable anymore.
    I tried with different JRE on my client, from 1.6u26 to 1.7u51, with same result
    Any idea?
    thanks
    Xavier

    Hi,
    1. "i just noticed that the hied/show header button in page setup has no influence on any report.  The header/footer is visible anyway."
    I concur the same thing on my BI4.1 SP03 Launch Pad and Webi rich client.  The header and footer will hide and show only if you are in "Structure Only" Design mode.
    2. I notice that your JRE exception occurs at
    "http://XXXXX:8080/BOE/portal/1405211101/AnalyticalReporting/webiApplet/lib/cvom_chart_lib.jar, version : null]
    basic: Plugin2ClassLoader.getPermissions CeilingPolicy allPerms
    Exception in thread "AWT-EventQueue-2" java.lang.NullPointerException
          at com.sap.webi.ui.viewer.ui.BorderPainter.paintComplex(BorderPainter.java:123)..."
    Can you check if you have -Djava.awt.headless=true defined in your Java web server Java setting?
    Hope this helps,
    Jin-Chong

  • Help reqd..Not able to Starting and Testing a Message Broker

    I am new to Sun Java System Message Queue. I have downloaded a trial version of Message Queue 3 2005Q4 (3.6 SP3) Platform Edition from Sun website. I have installed this on RedHat 4.0, Itanium 64 bit server, jrockit-jdk1.5.0_06 j2se. I am referring to Sun Java� System Message Queue 3 Developer�s Guide for Java Clients document, as per this I have setup Message Queue Directory Variables. After environment variables setup, trying to Starting and Testing a Message Broker. Once Run the broker startup command
    "imqbrokerd -tty"
    Getting following errors in terminal:
    Exception in thread "Reference Handler" java.lang.StackOverflowError
    at java.lang.Class.forName(Ljava.lang.String;ZLjava.lang.ClassLoader;)Ljava.lang.Class;(Unknown Source)
    at java.lang.Class.forName(Ljava.lang.String;J)Ljava.lang.Class;(Unknown Source)
    at java.lang.ref.Reference$ReferenceHandler.run()V(Unknown Source)
    Exception in thread "Finalizer" java.lang.StackOverflowError
    at java.lang.Thread.run()V(Unknown Source)
    [23/Feb/2007:06:43:16 PST]
    ================================================================================Sun Java(tm) System Message Queue 3 2005Q4
    Sun Microsystems, Inc.
    Version: 3.6 SP3 (Build 02-A)
    Compile: Wed Jun 22 15:30:03 PDT 2005
    Copyright �� 2005 Sun Microsystems, Inc. All rights reserved.
    Use is subject to license terms.
    This product includes code licensed from RSA Data Security.
    ================================================================================Java Runtime: 1.5.0_06 BEA Systems, Inc. /PES-Software/jrockit-jdk1.5.0_06/jre
    Exception in thread "JMQTimerThread" java.lang.StackOverflowError
    at com.sun.messaging.jmq.util.timer.TimerThread.run(JMQTimer.java:410)
    [23/Feb/2007:06:43:16 PST] License: Sun Java(tm) System Message Queue 3.6 Platform Edition
    [23/Feb/2007:06:43:16 PST] IMQ_HOME=/opt/sun/mq
    [23/Feb/2007:06:43:16 PST] IMQ_VARHOME=/var/opt/sun/mq
    [23/Feb/2007:06:43:16 PST] Linux 2.6.9-42.EL ia64 rhel4 (8 cpu) root
    [23/Feb/2007:06:43:16 PST] Java Heap Size: max=196608k, current=32768k
    [23/Feb/2007:06:43:16 PST] Arguments: -tty
    [23/Feb/2007:06:43:16 PST] [B1004]: Starting the portmapper service using tcp [ 7676, 50, * ] with min threads 1 and max threads of 1
    java.lang.StackOverflowError
    at java.lang.Thread.run()V(Unknown Source)
    [23/Feb/2007:06:43:16 PST] WARNING [B3100]: Unexpected Broker Internal Error : [Uncaught Exception in thread Thread[JMQPortMapper,5,default]] :
    java.lang.StackOverflowError
    at java.lang.Thread.run()V(Unknown Source)
    [23/Feb/2007:06:43:16 PST] [B1060]: Loading persistent data...
    [23/Feb/2007:06:43:16 PST] Using built-in file-based persistent store: /var/opt/sun/mq/instances/imqbroker/
    [23/Feb/2007:06:43:17 PST] [B1136]: Processing stored transactions
    [23/Feb/2007:06:43:17 PST] [B1013]: Auto Creation of Queues is Enabled
    [23/Feb/2007:06:43:17 PST] [B1151]: Loading destination mq.sys.dmq [Queue] with 0 messages
    [23/Feb/2007:06:43:17 PST] [B1152]: Loading of destination mq.sys.dmq [Queue] complete
    [23/Feb/2007:06:43:17 PST] [B1004]: Starting the admin service using tcp(host = *, port=0, mode=dedicated) with min threads 4 and max threads of 10
    java.lang.StackOverflowError
    at java.lang.Thread.run()V(Unknown Source)
    [23/Feb/2007:06:43:17 PST] WARNING [B3100]: Unexpected Broker Internal Error : [Uncaught Exception in thread Thread[admin_ACCEPT,5,default]] :
    java.lang.StackOverflowError
    at java.lang.Thread.run()V(Unknown Source)
    [23/Feb/2007:06:43:17 PST] [B1004]: Starting the jms service using tcp(host = *, port=0, mode=dedicated) with min threads 10 and max threads of 1000
    java.lang.StackOverflowError
    at java.lang.Thread.run()V(Unknown Source)
    [23/Feb/2007:06:43:17 PST] WARNING [B3100]: Unexpected Broker Internal Error : [Uncaught Exception in thread Thread[jms_ACCEPT,5,default]] :
    java.lang.StackOverflowError
    at java.lang.Thread.run()V(Unknown Source)
    [23/Feb/2007:06:43:17 PST] [B1039]: Broker "imqbroker@rhel4:7676" ready.
    Exception in thread "Thread-1" java.lang.StackOverflowError
    at com.sun.messaging.jmq.util.log.Logger.format(Logger.java:580)
    at com.sun.messaging.jmq.util.log.Logger.logToAll(Logger.java:994)
    at com.sun.messaging.jmq.jmsserver.brokerShutdownHook.run(Broker.java:1878)
    Please suggest me how to resolve this issue..
    Thanks,
    Sajjan

    How do you run the program?
    I need to copy the compiled BasicPlugin.api under Acrobat\plug_ins folder. I can create a subfolder of plug_ins and copy the .api file there. Just one level deep: if I create a subfolder under a subfolder of plug_ins, the .api file will not be found by Acrobat.
    Then I need to restart Acrobat and I find the plugin running. In particular, BasicPlugin add a new Acrobat SDK menu and a menu item under it.
    If I close Acrobat and go back to Visual Studio, I can push the Debug button which will open Acrobat for me and stop the program execution at any breakpoints I have set in the code.

  • How to tell what java version classes where compiled?

    Is it possible to get the version of the Java SDK the classes were compiled with from within a Java application? I think about something like:
    System.out.println("Application classes compiled/compatible with "+getClassCompilationVersion());

    For the minimum check, the point is that i get the following exception when i try to run a application that was compiled with/for 1.4 is tried to be started with a 1.3 JRE:
    Exception in thread "main" java.lang.UnsupportedClassVersionError: de/icomps/pro
    totypes/Test (Unsupported major.minor version 48.0)
            at java.lang.ClassLoader.defineClass0(Native Method)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:488)
            at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:10
    6)
            at java.net.URLClassLoader.defineClass(URLClassLoader.java:243)
            at java.net.URLClassLoader.access$100(URLClassLoader.java:51)
            at java.net.URLClassLoader$1.run(URLClassLoader.java:190)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:183)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:294)
            at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:281)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
            at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:310)I hoped to somehow catch this and print a clean error message. But it seems, that the new classes can't be used ... even though the main() method doesn't use any 1.4 specific API. The JVM rejects the classes just because of the newer class file format versions.

  • What is the jrew.exe process???

    In my oracle server\Task Manager are some jrew.exe process and these processes consume CPU.
    What is the jrew.exe process???
    Thanks!

    The jre command executes Java class files. The jrew command is identical to jre, except that with jrew there is no associated console window

  • Speed of java programme in different JVM

    There is a java programme.(It is a big programme.)
    In MS-JVM(microsoft java vm) ,it seems to be running faster then running in Sun-JVM.
    For example, it spends 6 seconds opening a frame in MS-JVM, and it spends 25 seconds opening the same frame in Sun- JVM.
    Now,is there any methods to speed the programme running in Sun-jre except optimize the source ?
    Sorry , my English is poor ,can u understand me?
    thanks a lot in advance!

    It really depends on the underlying hardware (CPU, memory, graphic card, ...).
    Are they comparable?
    -Alexis

  • Troubles developing EPU Module in HFM.

    Hi,
    I need to implement or develop the EPU Module, to calculate the investment of the holding company, so I compare compare the calculation with the amount recorded for the holding and corresponding adjustment. For that we create the rule that is above, in which A21MP is the created account to paste the adjustment in equity investments, and CC1 is the capital account that should be multiplied by the% loaded in the module table.
    Sub EquityPickUp ()
      Owner=Hs.Entity.Owner
      Owned=Hs.Entity.Owned
      OwnerDefCurrency = Hs.Entity.DefCurrency ("")
      'variable: trae la tenencia accionaria de la holding en la subsidiaria.
      lPown = Hs.GetCell ("E#"&Owned&".I#"&Owner&".V#[None].A#[Shares%Owned].C1#[None].C2#[None].C3#[None].C4#[None]")
    ' Factor = lPown / 100
       Hs.Clear "A#A21MP.C1#00000000.C2#EPU.C3#0.C4#[None].I#"&Owned
       CapSub = Hs.GetCell ("E#"&Owned&".V#"&OwnerDefCurrency&".A#CC1.I#[ICP Top].C1#CECOS.C2#CONSOLCONBESTEL.C3#TIPOPERACION.C4[None]")
       Hs.Exp "A#A21MP.C1#00000000.C2#EPU.C3#0.C4#[None].I#"&Owned&" = "&CapSub * lPown
    End Sub
    With this rule, we do not see anything, if I run the calculation module does nothing, if you modify a% abort the calculation, as if I apply force vanishes rule EPU. The strange thing is that disabling the entire rule and go partially enabling it runs and I aborted but does not calculate anything.
    Who can guide me as to properties that must be considered as well if the rule is correct?

    So I finally have some news for this topic:
    I use eclipse as development tool. Actually I face this problem only when starting my applet in eclipse.
    After I had uninstalled all public JREs except the one I wanted to use with my applet, it worked fine outside eclipse in the distribution environment.
    I cannont figure out what the actual problem is but it seems to be a problem inside the JVM.

  • Exception trying to start the JRE Control Panel

    I've run into some persistent problem with seemingly any version of the JRE on my WinXP system. Whenever I try to start the control panel, either from the Windows Control Panel UI, or from the Java system tray icon, I get an exception error:
    java.lang.ArrayIndexOutOfBoundsException: 365
         at com.sun.deploy.panel.UpdatePanel.setText(Unknown Source)
         at com.sun.deploy.panel.UpdatePanel.actionPerformed(Unknown Source)
         at javax.swing.JComboBox.fireActionEvent(Unknown Source)
         at javax.swing.JComboBox.setSelectedItem(Unknown Source)
         at javax.swing.JComboBox.setSelectedIndex(Unknown Source)
         at com.sun.deploy.panel.UpdatePanel.reset(Unknown Source)
         at com.sun.deploy.panel.UpdatePanel.<init>(Unknown Source)
         at com.sun.deploy.panel.ControlPanel.initComponents(Unknown Source)
         at com.sun.deploy.panel.ControlPanel.<init>(Unknown Source)
         at com.sun.deploy.panel.ControlPanel.main(Unknown Source)
    This is what happens on the first attempt after the OS has booted, and subsequent attempts just result in nothing obvious happening (no control panel, no error, nothing).
    I currently have JRE 1.6.0_07-b06 installed, but this seems to be happening with any JRE version I try. I had remnants of older JRE's under C:\Program Files\java, and I went through ensuring that each was removed (if I could get rid of it via Add/Remove Applications, I used that) until I was down to zero other than the MS JVM that is inherently part of Windows. I then installed the current Sun JRE and still have the problem. :-\ So not sure what it is the JRE control panel is trying to do here, nor how to fix it other than reinstalling the OS (and I'm not that desperate, but it really is annoying).
    I figure it's probably something still hanging around in the Registry (<shudder!>) and poking around under HKLM\SOFTWARE\JavaSoft, I see keys for various old versions under the \Java Plug-in, \Java Runtime Environment, and \Java Web Start keys, most of which look like references to directories or files which no longer exist on the system. Any thoughts as to whether I can just safely delete these keys as a sanity check (jeez I wish Sun had steered clear of the Registry)? What I'm wondering is since the JRE control panel (when it works :-) shows you a list of installed JREs it found, I'm wondering if these bogus versions listed in the Registry are causing the ArrayIndexOutOfBoundsException.
    Any ideas are greatly appreciated. Thanks in advance!

    start JRE control panel

  • JRE 7u67 Exception Error

    Hello Folks,
    I'm new here and have an issues regarding the installation of JRE 7u67 on a Windows 7 tablet PC.
    I have installed Java runtime on a tablet PC, based on Intel Atom N2600. Once installed, I can verify java by going straight to the verification page. If I try to configure java, open the java control panel or launch a page that requires java, I get an Exception error 0xc0000005. Windows reports that javaw.exe has crashed and puts the following entry in Event Viewer Application logs:
    Faulting application name: javaw.exe, version: 7.0.670.1, time stamp: 0x53d28730
    Faulting module name: jvm.dll, version: 24.65.0.4, time stamp: 0x53d2a5c9
    Exception code: 0xc0000005
    I have reproduced this error in Windows 7 Pro SP1 and also with Windows Embedded Standard 7 (WES7P). Both were completely clean installations, with JRE installed using the offline installer and "Run as administrator".
    I have uninstalled and reinstalled and have also tried installing version 6u45 instead, with the same results. The same installation on other PC's (laptop and desktop) with Windows 7 runs without a problem.
    Does anyone have any ideas?
    Thanks,
    Steve.

    Hello Folks,
    I'm new here and have an issues regarding the installation of JRE 7u67 on a Windows 7 tablet PC.
    I have installed Java runtime on a tablet PC, based on Intel Atom N2600. Once installed, I can verify java by going straight to the verification page. If I try to configure java, open the java control panel or launch a page that requires java, I get an Exception error 0xc0000005. Windows reports that javaw.exe has crashed and puts the following entry in Event Viewer Application logs:
    Faulting application name: javaw.exe, version: 7.0.670.1, time stamp: 0x53d28730
    Faulting module name: jvm.dll, version: 24.65.0.4, time stamp: 0x53d2a5c9
    Exception code: 0xc0000005
    I have reproduced this error in Windows 7 Pro SP1 and also with Windows Embedded Standard 7 (WES7P). Both were completely clean installations, with JRE installed using the offline installer and "Run as administrator".
    I have uninstalled and reinstalled and have also tried installing version 6u45 instead, with the same results. The same installation on other PC's (laptop and desktop) with Windows 7 runs without a problem.
    Does anyone have any ideas?
    Thanks,
    Steve.

  • Jre 1.6 vs 1.4, giving exception

    See http://www.molo.se/games.php
    The game "mines" is working, none of the other 4.
    In jre 1.4 all was working, in jre 1.6 only this one (but all are compiling).
    Two complete sources provided on
    http://www.molo.se/java_1.4_vs_1.6.zip
    I have no idea of why one is working and the other one is not...
    Does someone here know why the game "colotris" is giving an exception in start(), and why the other one runs without problems?
    /Ronnie

    Problem solved.
    I don't really know why the exception went away, but i added "update(g);" to the empty "void paint(Graphics g)" method. obviously the update method was called automatically in previous versions of the jre.

  • NullPointer Exception ,web start Static class loading in sun JRE with JNLP

    I have a netbenas based application and using with jre 1.6.0_22.
    i am getting NPE as
    java.lang.NullPointerException
    at com.sun.deploy.security.CPCallbackHandler.isAuthenticated(Unknown Source)
    at com.sun.deploy.security.CPCallbackHandler.access$1300(Unknown Source)
    at com.sun.deploy.security.CPCallbackHandler$ChildElement.checkResource(Unknown Source)
    at com.sun.deploy.security.DeployURLClassPath$JarLoader.checkResource(Unknown Source)
    at com.sun.deploy.security.DeployURLClassPath$JarLoader.getResource(Unknown Source)
    at com.sun.deploy.security.DeployURLClassPath.getResource(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at com.osi.solutions.platform.classbuilder.view.ClassExplorerTopComponent.<init>(ClassExplorerTopComponent.java:89)
    at com.osi.solutions.platform.classbuilder.view.ClassExplorerTopComponent.getDefault(ClassExplorerTopComponent.java:143)
    at com.osi.solutions.platform.classbuilder.view.ClassExplorerTopComponent$ResolvableHelper.readResolve(ClassExplorerTopComponent.java:198)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at java.io.ObjectStreamClass.invokeReadResolve(Unknown Source)
    at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
    at java.io.ObjectInputStream.readObject0(Unknown Source)
    at java.io.ObjectInputStream.readObject(Unknown Source)
    at org.netbeans.modules.settings.convertors.XMLSettingsSupport$SettingsRecognizer.readSerial(XMLSettingsSupport.java:544)
    at org.netbeans.modules.settings.convertors.XMLSettingsSupport$SettingsRecognizer.instanceCreate(XMLSettingsSupport.java:576)
    at org.netbeans.modules.settings.convertors.SerialDataConvertor$SettingsInstance.instanceCreate(SerialDataConvertor.java:420)
    at org.netbeans.core.windows.persistence.PersistenceManager.getTopComponentPersistentForID(PersistenceManager.java:531)
    at org.netbeans.core.windows.persistence.PersistenceManager.getTopComponentForID(PersistenceManager.java:641)
    at org.netbeans.core.windows.PersistenceHandler.getTopComponentForID(PersistenceHandler.java:422)
    at org.netbeans.core.windows.PersistenceHandler.load(PersistenceHandler.java:147)
    at org.netbeans.core.windows.WindowSystemImpl.load(WindowSystemImpl.java:69)
    [catch] at org.netbeans.core.NonGui$2.run(NonGui.java:178)
    at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:104)
    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)
    This issue comes very occassionaly .
    Does someone have any idea what is wrong. Is this related to any jre bug.
    Thanks,
    totaram

    Hi I'm the one who posted those findings... though further investigation found that increasing your heap size can help, but at best it only reduces the occurances of the problem.
    The real cause of the issue is that the Signer's info for a CachedJarFile is held onto by softreferences and is not "rebuilt" if it has been garbage collected. the Reason that increasing your initial heap size works, is that it helps to delay the conditions on which these softreferences are garbage collected. (SoftReferences become eligible for garbage collection when the heap needs to be expanded)
    I've put together a hack that traverses all of the jars in a webstart application, finds their corresponding CachedJarFile instance and sticks all of the relevant SoftReferences into a static list, so that they become "hard references" and are never garbage collected.
    Below is my JarSignersHardLinker.java hack To use it, just call JarSignersHardLinker.go() it will then
    * Check that you are running on webstart and you are on java 1.6 update 19 or higher.
    * If the above is true then it will spawn a new thread and create hard links to all the jarsigners for each jar on the classpath.
    If you need more info email me on my gmail account. My user name is squaat. I've also posted this code at Re: Error with Java WebStart Signed Jars on 1.6.0_19's new Mixed  Code
    If you find this helpful and it solves your problems, please leave a positive comment and/or vote for the bug at:
    http://bugs.sun.com/view_bug.do?bug_id=6967414
    If any oracle/sun webstart engineers are reading this, please contact me... we'd really like this bug fixed.
    import java.io.IOException;
    import java.lang.ref.SoftReference;
    import java.lang.reflect.Field;
    import java.lang.reflect.InvocationTargetException;
    import java.lang.reflect.Method;
    import java.net.JarURLConnection;
    import java.net.URL;
    import java.net.URLConnection;
    import java.util.ArrayList;
    import java.util.Enumeration;
    import java.util.LinkedHashSet;
    import java.util.List;
    import java.util.Set;
    import java.util.jar.JarFile;
    * A utility class for working around the java webstart jar signing/security bug
    * see http://bugs.sun.com/view_bug.do?bug_id=6967414 and http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6805618
    * @author Scott Chan
    public class JarSignersHardLinker {
        private static final String JRE_1_6_0 = "1.6.0_";
         * the 1.6.0 update where this problem first occurred
        private static final int PROBLEM_JRE_UPDATE = 19;
        public static final List sm_hardRefs = new ArrayList();
        protected static void makeHardSignersRef(JarFile jar) throws java.io.IOException {
            System.out.println("Making hard refs for: " + jar );
            if(jar != null && jar.getClass().getName().equals("com.sun.deploy.cache.CachedJarFile")) {
                 //lets attempt to get at the each of the soft links.
                 //first neet to call the relevant no-arg method to ensure that the soft ref is populated
                 //then we access the private member, resolve the softlink and throw it in a static list.
                callNoArgMethod("getSigners", jar);
                makeHardLink("signersRef", jar);
                callNoArgMethod("getSignerMap", jar);
                makeHardLink("signerMapRef", jar);
    //            callNoArgMethod("getCodeSources", jar);
    //            makeHardLink("codeSourcesRef", jar);
                callNoArgMethod("getCodeSourceCache", jar);
                makeHardLink("codeSourceCacheRef", jar);
         * if the specified field for the given instance is a Softreference
         * That soft reference is resolved and the returned ref is stored in a static list,
         * making it a hard link that should never be garbage collected
         * @param fieldName
         * @param instance
        private static void makeHardLink(String fieldName, Object instance) {
            System.out.println("attempting hard ref to " + instance.getClass().getName() + "." + fieldName);
            try {
                Field signersRef = instance.getClass().getDeclaredField(fieldName);
                signersRef.setAccessible(true);
                Object o = signersRef.get(instance);
                if(o instanceof SoftReference) {
                    SoftReference r = (SoftReference) o;
                    Object o2 = r.get();
                    sm_hardRefs.add(o2);
                } else {
                    System.out.println("noooo!");
            } catch (NoSuchFieldException e) {
                e.printStackTrace();
                return;
            } catch (IllegalAccessException e) {
                e.printStackTrace();
         * Call the given no-arg method on the given instance
         * @param methodName
         * @param instance
        private static void callNoArgMethod(String methodName, Object instance) {
            System.out.println("calling noarg method hard ref to " + instance.getClass().getName() + "." + methodName + "()");
            try {
                Method m = instance.getClass().getDeclaredMethod(methodName);
                m.setAccessible(true);
                m.invoke(instance);
            } catch (SecurityException e1) {
                e1.printStackTrace();
            } catch (NoSuchMethodException e1) {
                e1.printStackTrace();
            } catch (IllegalArgumentException e) {
                e.printStackTrace();
            } catch (IllegalAccessException e) {
                e.printStackTrace();
            } catch (InvocationTargetException e) {
                e.printStackTrace();
         * is the preloader enabled. ie: will the preloader run in the current environment
         * @return
        public static boolean isHardLinkerEnabled() {
             boolean isHardLinkerDisabled = false;  //change this to use whatever mechanism you use to enable or disable the preloader
            return !isHardLinkerDisabled && isRunningOnJre1_6_0_19OrHigher() && isRunningOnWebstart();
         * is the application currently running on webstart
         * detect the presence of a JNLPclassloader
         * @return
        public static boolean isRunningOnWebstart() {
            ClassLoader cl = Thread.currentThread().getContextClassLoader();
            while(cl != null) {
                if(cl.getClass().getName().equals("com.sun.jnlp.JNLPClassLoader")) {
                    return true;
                cl = cl.getParent();
            return false;
         * Is the JRE 1.6.0_19 or higher?
         * @return
        public static boolean isRunningOnJre1_6_0_19OrHigher() {
            String javaVersion = System.getProperty("java.version");
            if(javaVersion.startsWith(JRE_1_6_0)) {
                //then lets figure out what update we are on
                String updateStr = javaVersion.substring(JRE_1_6_0.length());
                try {
                    return Integer.parseInt(updateStr) >= PROBLEM_JRE_UPDATE;
                } catch (NumberFormatException e) {
                    //then unable to determine updatedate level
                    return false;
            //all other cases
            return false;
          * get all the JarFile objects for all of the jars in the classpath
          * @return
         public static Set<JarFile> getAllJarsFilesInClassPath() {
              Set<JarFile> jars = new LinkedHashSet<JarFile> ();
             for (URL url : getAllJarUrls()) {
                 try {
                     jars.add(getJarFile(url));
                 } catch(IOException e) {
                      System.out.println("unable to retrieve jar at URL: " + url);
             return jars;
         * Returns set of URLS for the jars in the classpath.
         * URLS will have the protocol of jar eg: jar:http://HOST/PATH/JARNAME.jar!/META-INF/MANIFEST.MF
        static Set<URL> getAllJarUrls() {
            try {
                Set<URL> urls = new LinkedHashSet<URL>();
                Enumeration<URL> mfUrls = Thread.currentThread().getContextClassLoader().getResources("META-INF/MANIFEST.MF");
                while(mfUrls.hasMoreElements()) {
                    URL jarUrl = mfUrls.nextElement();
    //                System.out.println(jarUrl);
                    if(!jarUrl.getProtocol().equals("jar")) continue;
                    urls.add(jarUrl);
                return urls;
            } catch(IOException e) {
                throw new RuntimeException(e);
         * get the jarFile object for the given url
         * @param jarUrl
         * @return
         * @throws IOException
        public static JarFile getJarFile(URL jarUrl) throws IOException {
            URLConnection urlConnnection = jarUrl.openConnection();
            if(urlConnnection instanceof JarURLConnection) {
                // Using a JarURLConnection will load the JAR from the cache when using Webstart 1.6
                // In Webstart 1.5, the URL will point to the cached JAR on the local filesystem
                JarURLConnection jcon = (JarURLConnection) urlConnnection;
                return jcon.getJarFile();
            } else {
                throw new AssertionError("Expected JarURLConnection");
         * Spawn a new thread to run through each jar in the classpath and create a hardlink
         * to the jars softly referenced signers infomation.
        public static void go() {
            if(!isHardLinkerEnabled()) {
                return;
            System.out.println("Starting Resource Preloader Hardlinker");
            Thread t = new Thread(new Runnable() {
                public void run() {
                    try {
                        Set<JarFile> jars = getAllJarsFilesInClassPath();
                        for (JarFile jar : jars) {
                            makeHardSignersRef(jar);
                    } catch (Exception e) {
                        System.out.println("Problem preloading resources");
                        e.printStackTrace();
                    } catch (Error e) {
                         System.out.println("Error preloading resources");
                         e.printStackTrace();
            t.start();
    }Edited by: 855200 on 04-Jul-2011 17:31

  • IBM JRE 1.5: Uncaught exception in compiler

    I installed trial version of Flex Builder 2 Eclipse plug-in.
    If I run eclipse with the shortcut created by Flex Builder
    installation, everything works fine (it uses the Sun JRE 1.4.2
    included with the installation). If I modify the shortcut to run
    eclipse with the IBM JRE 1.5 (according to Flex 2.0.1 system
    requirements, such configuration is supported) and create new Flex
    project, the following error appears during the first build:
    Error
    Mon May 28 13:53:00 IDT 2007
    Uncaught exception in compiler
    java.lang.IllegalAccessError:
    org.apache.xerces.util.XMLAttributesImpl$Attribute
    at java.lang.ClassLoader.defineClassImpl(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:222)
    at
    org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.j ava:160)
    at
    org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:49 8)
    at
    org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java: 468)
    at
    org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager. java:427)
    at
    org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java :410)
    at
    org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoade r.java:188)
    at
    org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:33 9)
    at
    org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:391)
    at
    org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:352)
    at
    org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.jav a:83)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:561)
    at java.lang.J9VMInternals.verifyImpl(Native Method)
    at java.lang.J9VMInternals.verify(J9VMInternals.java:59)
    at java.lang.J9VMInternals.initialize(J9VMInternals.java:120)
    at
    org.apache.xerces.impl.XMLDocumentFragmentScannerMMImpl.<init>(XMLDocumentFragmentScanner MMImpl.java:105)
    at
    org.apache.xerces.impl.XMLDocumentScannerMMImpl.<init>(XMLDocumentScannerMMImpl.java:258)
    at
    org.apache.xerces.impl.XMLNSDocumentScannerMMImpl.<init>(XMLNSDocumentScannerMMImpl.java: 120)
    at
    org.apache.xerces.parsers.IntegratedParserConfigurationMMImpl.createDocumentScanner(Integ ratedParserConfigurationMMImpl.java:282)
    at
    org.apache.xerces.parsers.DTDConfiguration.<init>(Unknown
    Source)
    at
    org.apache.xerces.parsers.StandardParserConfiguration.<init>(Unknown
    Source)
    at
    org.apache.xerces.parsers.IntegratedParserConfigurationMMImpl.<init>(IntegratedParserConf igurationMMImpl.java:193)
    at
    org.apache.xerces.parsers.XML11ConfigurationMMImpl.<init>(XML11ConfigurationMMImpl.java:1 82)
    at
    org.apache.xerces.parsers.XML11ConfigurationMMImpl.<init>(XML11ConfigurationMMImpl.java:1 39)
    at java.lang.Class.newInstanceImpl(Native Method)
    at java.lang.Class.newInstance(Class.java:1263)
    at org.apache.xerces.util.ObjectFactory.newInstance(Unknown
    Source)
    at
    org.apache.xerces.util.ObjectFactory.findJarServiceProvider(Unknown
    Source)
    at org.apache.xerces.util.ObjectFactory.createObject(Unknown
    Source)
    at org.apache.xerces.util.ObjectFactory.createObject(Unknown
    Source)
    at
    org.apache.xerces.parsers.SAXParserMMImpl.<init>(SAXParserMMImpl.java:155)
    at
    org.apache.xerces.parsers.SAXParserMMImpl.<init>(SAXParserMMImpl.java:138)
    at
    org.apache.xerces.jaxp.SAXParserMMImpl.<init>(SAXParserMMImpl.java:109)
    at
    org.apache.xerces.jaxp.SAXParserFactoryMMImpl.newSAXParser(SAXParserFactoryMMImpl.java:10 2)
    at
    flex2.compiler.config.FileConfigurator.load(FileConfigurator.java:60)
    at
    flex2.tools.Compiler.processConfiguration(Compiler.java:465)
    at
    flex2.tools.oem.internal.OEMUtil.getApplicationConfiguration(OEMUtil.java:208)
    at
    flex2.tools.oem.internal.OEMUtil.getApplicationConfiguration(OEMUtil.java:180)
    at
    flex2.tools.oem.Application.recompile(Application.java:662)
    at flex2.tools.oem.Application.compile(Application.java:530)
    at
    flex2.tools.flexbuilder.BuilderApplication.compile(BuilderApplication.java:224)
    at
    com.adobe.flexbuilder.project.compiler.internal.ASApplicationBuilder$MyBuilder.mybuild(Un known
    Source)
    at
    com.adobe.flexbuilder.project.compiler.internal.ASApplicationBuilder.build(Unknown
    Source)
    at
    com.adobe.flexbuilder.project.compiler.internal.ASBuilder.build(Unknown
    Source)
    at
    com.adobe.flexbuilder.project.compiler.internal.FlexIncrementalBuilder.buildApplication(U nknown
    Source)
    at
    com.adobe.flexbuilder.project.compiler.internal.FlexIncrementalBuilder.build(Unknown
    Source)
    at
    org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:603)
    at
    org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
    at
    org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:167)
    at
    org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201)
    at
    org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:230)
    at
    org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
    at
    org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:233)
    at
    org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:252)
    at
    org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:285)
    at
    org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:145)
    at
    org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:208)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)

    I found the problem! Seems to be due to the fact that I'm using a package called "data", which caused a conflict while trying to access "this.data" in an item renderer.
    Explicitely casting "this.data" solved the problem!
    If someone would like to try to reproduce this error, old code:
    <?xml version="1.0" encoding="utf-8"?>
    <s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark"
    xmlns:mx="library://ns.adobe.com/flex/mx"
    autoDrawBackground="false" xmlns:components="visual.components.*">
    <components:ContactElement ContactID="{this.data.ContactID}"
    Sender="{this.data.Sender}"
    Target="{this.data.Target}"
    Accepted="{this.data.Accepted}"
    Player="{this.data.Player}"/>
    </s:ItemRenderer>
    New code:
    <?xml version="1.0" encoding="utf-8"?>
    <s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark"
    xmlns:mx="library://ns.adobe.com/flex/mx"
    autoDrawBackground="false" xmlns:components="visual.components.*">
    <fx:Script>
    <![CDATA[
    import data.ContactItem;
    ]]>
    </fx:Script>
    <components:ContactElement ContactID="{ContactItem(this.data).ContactID}"
    Sender="{ContactItem(this.data).Sender}"
    Target="{ContactItem(this.data).Target}"
    Accepted="{ContactItem(this.data).Accepted}"
    Player="{ContactItem(this.data).Player}"/>
    </s:ItemRenderer>
    Thanks again for the help. I panicked quite a lot when I discovered that ugly error!

  • Unhandled Exception Installing JRE 1.4.1

    When I try installing the JRE I get the following unhandled exception:
    Error Number: 0x80070725
    Description: Incompatible version of the RPC stub
    Any ideas how I can fix this? Or can anyone point me in the right direction to figure it out?
    Thanks!

    It seems to be a known issue: http://java.sun.com/j2se/1.4/install-windows.html#troubleshooting
    Read the links provided in the above document.

  • Jre.exe priviliged exception erros

    When I attempt to install the J2EE SDK version 1.3.1 on Windows NT 4 I keep getting a jre.exe priviliged exception error.
    �The exception Privileged instruction (0xc0000096) occurred in the application at location 0x00010106�
    Does anyone know what this problem is ?
    I also get this when installing on the CAS-COM bridge.

    There are a not properly execution with JIT Compiler Library (symcjit.dll) and Pentium 4 processor systems.
    For more information search "symcjit.dll" in Java Foruns or Microsoft Suppor or access directly http://www.intel.com/support/processors/pentium4/issues.htm
    Good luck.
    Cali - Brasil

Maybe you are looking for