DLL crashes / gives no response via JNI

I hope anyone can help me with this...
We have a java test client which calls DLL A via JNI (testpath 1).
We also have a native test client that calls DLL A directly (testpath 2).
DLL A calls DLL B, and DLL B calls DLL C.
Now, according to the debugging, the method call and input parameters ultimately received by DLL C are
the same (and correct) in both test paths. Now the following occurs: with testpath 2, the reply
from DLL C is correct, but with testpath 1, DLL C gives no reply whatsoever!
Could this have something to do with jvm regional settings? Obviously, something in testpath 1
differs from testpath 2, but I have no idea what this could be...
Some comments: DLL C uses a lot of global variables and global initializers. Maybe the problem
is in that area?

We solved it. Turns out DLL A reserved too much space on the stack. Putting a testclient before
DLL A left just not enough room on the stack for DLL C to work with.

Similar Messages

  • Debugging JVM crash via JNI Invocation

    Our software is causing a JVM crash with an EXCEPTION_FLT_STACK_CHECK error using the latest
    Sun 1.4.2 and 5.0 JVMs on Windows XP. No such error appears with 1.4 on Macintosh OS X.
    We start the JVM via JNI Invocation - our software is a plug-in for a standard Windows GUI program that
    requires a C++ interface. How can we get a crash dump or otherwise see what is going on when we
    crash? We don't have a chance to catch a Java exception. It seems to be crashing within a very generic
    call to the Xerces 2.6.2 XML parser.
    When we use the "-XX:+ShowMessageBoxOnError" option invoking the JVM, we do see a message box
    on the JVM error. Using the "-Xcheck:jni" option shows no problems. I tried viewing the JVM in jconsole,
    which worked nicely, but adding the "-Dcom.sun.management.jmxremote" option makes the crash
    go away.
    I feel like I've likely missed something obvious in my web and reference searches, but on the other hand
    JNI invocation information can be in short supply. This bug is 100% reproducible with a certain software
    and data setup.
    Thanks for any pointers and advice you can offer!
    Michael

    Thanks. Off list someone also pointed me to the Java troubleshooting guide at:
    http://java.sun.com/j2se/1.5/pdf/jdk50_ts_guide.pdf
    This is very helpful for giving instructions for creating a crash dump. Sun might be able to use it but I can't
    seem to get any response to my JVM bug report, so I'm looking for something that might help me figure
    out what the heck is going on. Is there a way to get a normal Java fatal error log via either
    -XX:+ShowMessageBoxOnError or -XX:OnError?
    Thanks again,
    Michael

  • How can i pass string from C++ DLL to Java via JNI?

    Hi everybody. I made a DLL with Borland C++. I must pass a string from this dll to Java via JNI.Namely i define a string variable in C++ DLL and i send this variable's value to Java via JNI.
    I can pass integers but i couldnt Strings. . How can i do this? is there any sample?

    Hi,
    So your function should be private static native String get_text();
    (It's often a good idea to make native methods private since when you change signatures you generally have to change java wrapper methods only).
    I know nothing about C++ strings but I'm pretty sure that you can convert it to char*, so
    do :
    char* szMyString = myString.toChar*();
    Then return from native with JNU_NewStringPlatform(env, szMyString)
    (see my 1st answer for JNU_NewStringPlatform() description).
    --Marc (http://jnative.sf.net)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Native library NOT thread safe - how to use it via JNI?

    Hello,
    has anybody ever tried to use a native library from JNI, when the library is not thread safe?
    The library (Windows DLL) was up to now used in an MFC App and thus was only used by one user - that meant one thread - at a time.
    Now we would like to use the library like a "server": many Java clients connect the same time to the library via JNI. That would mean each client makes its calls to the library in its own thread. Because the library is not thread safe, this would cause problems.
    Now we discussed to load the library several times - separately for each client (for each thread).
    Is this possible at all? How can we do that?
    And do you think we can solve the problem in this way?
    Are there other ways to use the library, though it is not thread safe?
    Any ideas welcome.
    Thanks for any contributions to the discussion, Ina

    (1)
    has anybody ever tried to use a native library from
    JNI, when the library (Windows DLL) is not thread safe?
    Now we want many Java clients.
    That would mean each client makes its calls
    to the library in its own thread. Because the library
    is not thread safe, this would cause problems.Right. And therefore you have to encapsulate the DLL behind a properly synchronized interface class.
    Now the details of how you have to do that depends: (a) does the DLL contain state information other than TLS? (b) do you know which methods are not thread-safe?
    Depending on (a), (b) two extremes are both possible:
    One extreme would be to get an instance of the interface to the DLL from a factory method you'll have to write, where the factory method will block until it can give you "the DLL". Every client thread would obtain "the DLL", then use it, then release it. That would make the whole thing a "client-driven" "dedicated" server. If a client forgets to release the DLL, everybody else is going to be locked out. :-(
    The other extreme would be just to mirror the DLL methods, and mark the relevant ones as synchronized. That should be doable if (a) is false, and (b) is true.
    (2)
    Now we discussed to load the library several times -
    separately for each client (for each thread).
    Is this possible at all? How can we do that?
    And do you think we can solve the problem in this
    way?The DLL is going to be mapped into the process address space on first usage. More Java threads just means adding more references to the same DLL instance.
    That would not result in thread-safe behavior.

  • CoreFoundation.dll crash followed by iTunes Stops Working on Win7 x64

    Hello
    I had a Sony Vaio laptop (64 Bit Win 7 Pro and Office etc) for almost 2 years. After running latest windows updates (I think) iTunes started stopping at launch.
    After searching thru support forums and testing various suggestions, I thought my Win 7 installation got old and corrupted and I was already thinking of upgrading my laptop to i5 or i7, I asked my company to renew my laptop. I started installing my new Sony Vaio.
    Same problem reappeared
    Safari Quicktime all works. Only iTunes crashes.
    Win 7 64 bit Pro
    iTunes 10.4.1.10
    On event viewer, on iTunes launch, corefoundation.dll crashes, few secs later, I receive
    iTunes.exe
    10.4.1.10
    4e4e1904
    CoreFoundation.dll
    1.630.14.0
    4e0373f7
    c0000005
    0004bd33
    278c
    01cc87c8fafbb85e
    C:\Program Files (x86)\iTunes.exe
    C:\Program Files (x86)\Common Files\Apple\Apple Application Support\CoreFoundation.dll
    3c09b303-f3bc-11e0-8034-c0f8daf75f5d
    Version=1
    EventType=APPCRASH
    EventTime=129627786618304736
    ReportType=2
    Consent=1
    UploadTime=129627786624065066
    ReportIdentifier=3c09b304-f3bc-11e0-8034-c0f8daf75f5d
    IntegratorReportIdentifier=3c09b303-f3bc-11e0-8034-c0f8daf75f5d
    WOW64=1
    Response.BucketId=2575568783
    Response.BucketTable=1
    Response.type=4
    Sig[0].Name=Application Name
    Sig[0].Value=iTunes.exe
    Sig[1].Name=Application Version
    Sig[1].Value=10.4.1.10
    Sig[2].Name=Application Timestamp
    Sig[2].Value=4e4e1904
    Sig[3].Name=Fault Module Name
    Sig[3].Value=CoreFoundation.dll
    Sig[4].Name=Fault Module Version
    Sig[4].Value=1.630.14.0
    Sig[5].Name=Fault Module Timestamp
    Sig[5].Value=4e0373f7
    Sig[6].Name=Exception Code
    Sig[6].Value=c0000005
    Sig[7].Name=Exception Offset
    Sig[7].Value=0004bd33
    DynamicSig[1].Name=OS Version
    DynamicSig[1].Value=6.1.7601.2.1.0.256.48
    DynamicSig[2].Name=Locale ID
    DynamicSig[2].Value=1055
    DynamicSig[22].Name=Additional Information 1
    DynamicSig[22].Value=9e27
    DynamicSig[23].Name=Additional Information 2
    DynamicSig[23].Value=9e2778096e7e1e2a2e0302fe58f3eea8
    DynamicSig[24].Name=Additional Information 3
    DynamicSig[24].Value=9e27
    DynamicSig[25].Name=Additional Information 4
    DynamicSig[25].Value=9e2778096e7e1e2a2e0302fe58f3eea8
    UI[2]=C:\Program Files (x86)\iTunes.exe
    UI[3]=iTunes has stopped working
    UI[4]=Windows can check online for a solution to the problem.
    UI[5]=Check online for a solution and close the program
    UI[6]=Check online for a so

    Hello
    I had a Sony Vaio laptop (64 Bit Win 7 Pro and Office etc) for almost 2 years. After running latest windows updates (I think) iTunes started stopping at launch.
    After searching thru support forums and testing various suggestions, I thought my Win 7 installation got old and corrupted and I was already thinking of upgrading my laptop to i5 or i7, I asked my company to renew my laptop. I started installing my new Sony Vaio.
    Same problem reappeared
    Safari Quicktime all works. Only iTunes crashes.
    Win 7 64 bit Pro
    iTunes 10.4.1.10
    On event viewer, on iTunes launch, corefoundation.dll crashes, few secs later, I receive
    iTunes.exe
    10.4.1.10
    4e4e1904
    CoreFoundation.dll
    1.630.14.0
    4e0373f7
    c0000005
    0004bd33
    278c
    01cc87c8fafbb85e
    C:\Program Files (x86)\iTunes.exe
    C:\Program Files (x86)\Common Files\Apple\Apple Application Support\CoreFoundation.dll
    3c09b303-f3bc-11e0-8034-c0f8daf75f5d
    Version=1
    EventType=APPCRASH
    EventTime=129627786618304736
    ReportType=2
    Consent=1
    UploadTime=129627786624065066
    ReportIdentifier=3c09b304-f3bc-11e0-8034-c0f8daf75f5d
    IntegratorReportIdentifier=3c09b303-f3bc-11e0-8034-c0f8daf75f5d
    WOW64=1
    Response.BucketId=2575568783
    Response.BucketTable=1
    Response.type=4
    Sig[0].Name=Application Name
    Sig[0].Value=iTunes.exe
    Sig[1].Name=Application Version
    Sig[1].Value=10.4.1.10
    Sig[2].Name=Application Timestamp
    Sig[2].Value=4e4e1904
    Sig[3].Name=Fault Module Name
    Sig[3].Value=CoreFoundation.dll
    Sig[4].Name=Fault Module Version
    Sig[4].Value=1.630.14.0
    Sig[5].Name=Fault Module Timestamp
    Sig[5].Value=4e0373f7
    Sig[6].Name=Exception Code
    Sig[6].Value=c0000005
    Sig[7].Name=Exception Offset
    Sig[7].Value=0004bd33
    DynamicSig[1].Name=OS Version
    DynamicSig[1].Value=6.1.7601.2.1.0.256.48
    DynamicSig[2].Name=Locale ID
    DynamicSig[2].Value=1055
    DynamicSig[22].Name=Additional Information 1
    DynamicSig[22].Value=9e27
    DynamicSig[23].Name=Additional Information 2
    DynamicSig[23].Value=9e2778096e7e1e2a2e0302fe58f3eea8
    DynamicSig[24].Name=Additional Information 3
    DynamicSig[24].Value=9e27
    DynamicSig[25].Name=Additional Information 4
    DynamicSig[25].Value=9e2778096e7e1e2a2e0302fe58f3eea8
    UI[2]=C:\Program Files (x86)\iTunes.exe
    UI[3]=iTunes has stopped working
    UI[4]=Windows can check online for a solution to the problem.
    UI[5]=Check online for a solution and close the program
    UI[6]=Check online for a so

  • Compilation error in creating shared library via JNI

    Hi ALL,
    I amin serious trouble with a problem. I am developing a Simulator, a function of which is to decode MPEG-2 Video files in real time and play it as well.I have got a MPEG-2 Decoder implemented in C from an open source and need to integrate with my Simulator which is writtebn in Java. The integration part I am doing via JNI(Java Native Interface). Now I have a bunch of C files in MPEG-2 decoder which are to be compiled during the Execution of the Java Simulator.Can anybody give some idea about how to call multiple C files from the Java Source through JNI at one go? Another problem I am facing is in calling a single C code from the traditional "HelloWorld" Java Code itself. The problem comes when I am trying to compile the shared library between the C native code and Java Code in my Linux Machine...I am getting the following message:
    /usr/lib/gcc-lib/i386-redhat-linux/2.96/.../../../crt1.0 : In function '_start' :
    /usr/lib/gcc-lib/i386-redhat-linux/2.96/.../../../crt1.0(.text+0x18): undefined reference to 'main'
    collect2: ld retrurned 1 exit status
    What does the above errot mean? How to rectify it.It will be of great help if you anybody can give me clues.

    It means that your compiler options are wrong.
    You need to create a shared library.
    Instead you are creating an executable, which is not the same as a shared library.
    If you search this forum you will find posts with command line options that work.

  • Transfer a Jpeg From Delphi to Java via JNI?

    Hi Guys,
    I am currently working on a project in which I have Windows DLL code that takes a screen capture (I'm using Delphi to write this). The result of this capture is stored as a TJpegImage. I have my Delphi code hooked to Java code (which the main program is written in) via JNI. I am trynig to transfer the Jpeg in a format in which Java can easily take it and make a BufferedImage out of it. How can I go about this? I have a few ideas, but I want to do it in the most efficient way possible. If someone knows how to do this, can they please share the solution with me?
    Thanks,
    -Tony

    whome0,
    Yes, thanks, that's exactly what I've been using. Basically, I'm at the point now where I know how to transfer the bytes, but for some reason, when I do this on the Java end:
    ByteArrayInputStream input = new ByteArrayInputStream( byteArr );
    JPEGImageDecoder decoder = JPEGCodec.createJPEGDecoder( input );
    BufferedImage bi = decoder.decodeAsBufferedImage();
    I get this error:
    com.sun.image.codec.jpeg.ImageFormatException: Not a JPEG file: starts with 0x60 0x23
    at sun.awt.image.codec.JPEGImageDecoderImpl.readJPEGStream(Native Method)
    at sun.awt.image.codec.JPEGImageDecoderImpl.decodeAsBufferedImage(Unknown Source)
    at com.sun.media.protocol.screen.LiveStream.read(LiveStream.java:166)
    at com.sun.media.parser.RawBufferParser$FrameTrack.transferData(RawBufferParser.java:725)
    at com.sun.media.protocol.screen.LiveStream.run(LiveStream.java:235)
    at java.lang.Thread.run(Unknown Source)
    I am baffled at this point, because I do a byte count before I send from my Delphi code, and a byte count on the Java receiving end, and they are identical. Looking at other JPGs I have on my hard drive, they begin in the same manner that this file does. So I'm not sure what's going on here.
    -Tony

  • JVM.dll crash in 1.4.2_07

    hi,
    Platform : windows 2000 server
    JVM: 1.4.2_07
    Once in a while my program is crashing. The code is a C++ program that invokes Java methods via JNI. However, at the time of the crash, it is not making any JNI calls.
    The crash dump shows the following stack for the thread in question:
    Exception number: c0000005 (access violation)
    0x113fc07
    jvm!JVM_RegisterUnsafeMethods+0x6fc2
    jvm!JVM_RegisterUnsafeMethods+0x716a
    jvm!JVM_RegisterUnsafeMethods+0x6ed3
    msvcrt+0x2b530
    kernel32!BaseThreadStart+0x34
    I guess my question is - when is JVM_RegisterUnsafeMethods called by the JVM? And what would cause it to crash.
    Thanks.
    Ash

    You need to actually write your own FocusTraversalPolicy class.
    It's actually pretty easy - just subclass FocusTraversalPolicy and override all the methods. You need to have your own algorithm for determining the next/first/last/etc components and after a short look at your code my guess would be to hold a reference to each component on your form in an array in the order you want the focus to move in and then you can easily return the "next" or "previous" component by looking up the array.
    Some of the methods can call others - e.g. getDefaultComponent, getFirstComponent, and getInitialComponent usually all return the same value.
    Regards,
    Tim

  • Is there way to put single text line in each response via WL configuration.

              Hello,
              Our partners are using SunOne server and
              they can easy include P3P policy file to each response via server configuration.
              Can we do it with WL?
              We have more than 3000 JSPs to modify.
              I think filter will slow down our site.
              We already put P3P policy in well known place but browser can't find it
              Is there way to put single text line in each response via WL configuration.
              Thanks,
              Oleg.
              

    SunnyKSood
    The quickest approach that comes to mind is
    a. create 3 separate titles in the Titler (Text Menu/New Text/Default Text)....
    food, goes on Video 4
    routes, goes on Video 3
    hostels, goes on Video 2
    Arrange them so that when viewed they are viewed as
    hostels
    routes
    food
    b. Move hostels (Video 2) to where you want it to start in relation to
    "Today I am going to talk about travelling in the North of Scotland and give advice on how to get by. I will talk about the best value hostels " - the word 'hostels' appears first at the top right of the screen
    Move routes (Video 3) to where you want it to start in relation to
    "I will describe the best routes to take" - the word 'routes' now appears under the the word 'hostels'
    Move food (4) to where you want it to start in relation to
    "And finally, I will describe the best places to eat traditional Scottish cuisine" - the word 'food' now appears under 'routes'.
    c. When all that is done to this stage, it might look like this...
    Now to arrange and drag out track content so that we see
    hostels
    then hostels + routes
    then hostel + routes + food
    when they are supposed to appear in conjunction with the video's dialog.
    The final workspace should look like
    Please give this a try. And, do not hesitate to let me know if you need clarification on anything described.
    We will be watching for your results.
    Thank you.
    ATR

  • Remote-Conrol a COM-Application via JNI Error: RPC_E_WRONG_THREAD

    hi,
    we have written a DLL which launches and remotecontrols an application via Microsoft COM. This DLL is called by a Swing-GUI-Application via JNI. It works fine over years. Now we have rewritten our application as an rcp-plugin. The COM-Appplication still launches fine, but when I call a COM-function of the remote-controlled application i get back an error:
    RPC_E_WRONG_THREAD
    ...which means that the wrong threading model is used. Does anyone know about differnt threading models of a swing application and an rcp-plugin?
    thanks for your help
    robert

    Kapila_Shantha wrote:
    But they are saying that they can use and do program using it but they are using RHEL 4 . They are wrong.
    A well done JNI library, regardless of how it is used, should not cause system exceptions.
    That would be true whether you created the library or whether someone else creates it.
    Although if they don't wish to certify it for specific configurations then that could be the cause. If that and only that is the cause then you are out of luck.
    If the real problem is that you are using it incorrectly (which should still not cause that problem) then you need to figure out how to use it correctly.

  • Accessing Unix-commands via JNI

    Hello everyone,
    I'm currently developing for an Solaris - SPARC - environment a java application, which is processing a huge amount of files without out GUI.
    As there are some limitations the Java-File - Object gives me in respect of the desired platform-independency of java, I'm right now looking for a way of using Unix - commands like "ln" or "ls" via JNI. I have no problem with accessing this commands vie the Runtime.exec(command) - construct. But the overhead which it leads to, because every time a new Unix-Process ist forked to execute the command, is not acceptable for me.
    I see a slight chance of using JNI, but I can't figure out, how to acces the Unix-Calls, I'd like to execute. Could anyone give me a hint.
    Thank You a lot.
    Thomas

    I have no problem with accessing this
    commands vie the Runtime.exec(command) - construct.
    But the overhead which it leads to, because every time
    a new Unix-Process ist forked to execute the command,
    is not acceptable for me.Just create a background shell process that you feed commands when you need to.
    This example should get you started.import java.io.*;
    class PipeSh {
        private Process sh;
        private OutputStream shIn;
        private BufferedReader shOut;
        private BufferedReader shErr;
        PipeSh() {
            try {
                sh = Runtime.getRuntime().exec("sh");
                shIn = sh.getOutputStream();
                shOut = new BufferedReader(new InputStreamReader(sh.getInputStream()));
                shErr = new BufferedReader(new InputStreamReader(sh.getErrorStream()));
            } catch (IOException ex) { ex.printStackTrace(); }
        void execute(String cmd) {
            try {
                shIn.write(cmd.getBytes());
                shIn.flush();
                while (shOut.ready()) System.out.println(shOut.readLine());
                while (shErr.ready()) System.out.println(shErr.readLine());
            } catch (IOException ex) { ex.printStackTrace(); }
        private static String[] cmd = { "mkdir foo\n", "cd foo\n", "touch bar\n" };
        public static void main(String[] arg) {
            PipeSh ps = new PipeSh();
            for (int i=0;i<cmd.length;++i) ps.execute(cmd);

  • PLEASE APPLE, GIVE US SYNCING VIA ITUNES BACK!!!!!! Why take away one of the most valuable features of iTunes???? Why take away our choice of syncing via the Cloud or locally with iTunes????

    DO NOT UPGRADE TO MAVERICK UNLESS YOU WANT TO BE DEPENDED ON APPLE’S CLOUD. It removes the ability to sync Calendar, Notepad, and Contacts between your apple devices. You then can only sync them via Apple’s Cloud. For those of you like me, that do not want to be depended on an external data base accessible via the Internet or Cel Phone (with data charges).
    Why do I not want to use the Cloud to sync and backup?
    1. I found I only have one device with me at a time or am sitting at a computer when I add to my calendar, make a note, or add/change a Contact. Syncing with iTunes while upgrading apps and doing a back up to two external hard drives worked great and met my needs.
    2. I use WiFi and pay for the minimum data plan with my Cel provider (AT&T). I do not want to pay higher monthly data fees.
    3. I do not like a central data base (that will be hacked someday) having the personal info I have in my Notes, Schedule, and Contacts.
    4. I like the security of my most important data being on my own hard drives and written off to Data DVD’s, not subject to even rare central system outages/failures.
    5. I do not like the prospect of becoming dependent on a Cloud in which the provider could decide at any time to either start selling information or charging monthly fees to recover the costs of providing the cloud.
    I am reluctant to go to the trouble to go back to 10.8 because Apple will eventual stop providing updates to 10.8 and 10.8 compatible applications.
    PLEASE APPLE, GIVE US SYNCING VIA ITUNES BACK!!!!!! Why take away one of the most valuable features of iTunes???? Why take away our choice of syncing via the Cloud or locally with iTunes????

    You will need to contact Apple through their feedfack channel. These are user to user forums, sorry.
    FEEDBACK    http://www.apple.com/feedback/macosx.html
    Pete

  • Bib.dll crashing PS 5.1

    Hey everyone,
    I've come across what I strongly suspect is a weird font issue that's preventing me from working. Until today, PS has never acted up before. I'm running 64-bit Photoshop, v12.1. My work .psd was based on a toolkit .psd off the web - I was missing a font, and I substituted it with my own (one version of Helvetica Neue for another). But the moment I tried to edit the text, PS crashed on me. I reopened, worked on it for a couple more hours, when it crashed again doing the same action. After that I could not open either my own working file, nor the toolkit file.
    The crash log says this:
    Problem signature:
      Problem Event Name:    APPCRASH
      Application Name:    Photoshop.exe
      Application Version:    12.1.0.0
      Application Timestamp:    4d90d339
      Fault Module Name:    BIB.dll
      Fault Module Version:    1.2.2.12130
      Fault Module Timestamp:    4d077745
      Exception Code:    c0000005
      Exception Offset:    00000000000154dd
      OS Version:    6.1.7601.2.1.0.256.48
      Locale ID:    1033
      Additional Information 1:    13eb
      Additional Information 2:    13eb96961af4137840a8c77088b2606e
      Additional Information 3:    18b1
      Additional Information 4:    18b189364cc7acc5c20656c1fe72cd84
    Read our privacy statement online:
      http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409
    If the online privacy statement is not available, please read our privacy statement offline:
      C:\Windows\system32\en-US\erofflps.txt
    When I came across similar font issues like this one in AE I'd just deinstall the suspect fonts and things are good to go again. However even with my Helvetica removed the .psd files fail to open. I've had a coworker open the psd files on his computer with no issues (same machine and sofware specs), and I've also tried to have him change all the type to a default font and saving it as another file name, but even then I cannot open the file. I then began to suspect something was wrong with my PS, so I did a reset of my preferences and blew away my user settings. When that didn't work, I also had PS reinstalled -- still no luck.
    Any suggestions how to move forward with this? I don't care so much about losing my current work file, but if I'm unable to even open up my toolkit .psd then I can't do anything. Are there other file formats I can save these files as (does that even change anything)?

    I just ran the script through, none of the fonts are corrupted. It seems like the issue began as a font problem, but now it's gone beyond that.
    As for corrupt install, I had also tried reinstalling Photoshop. I trashed all my settings and tried opening up a new redownload of the toolkit .psd -- it appeared to be opening it but had the same bib.dll crash when it hit around 40%. I would ideally want this issue resolved without formatting my entire computer...

  • BOXI 4 SP2 Patch 11 - Constant awt.dll crashes in the Event Log

    Hi All,
    Since implementing BOXI 4 SP2 Patch 11 I have noticed very frequent awt.dll crash error messages triggered by SAP JVM throughout the event log.
    Does anyone know what is causing this and how to resolve?
    =================================================================
    Faulting application name: java.exe, version: 6.0.170.4, time stamp: 0x4c3bb897
    Faulting module name: awt.dll, version: 6.0.170.4, time stamp: 0x4c3bfa5f
    Exception code: 0xc0000005
    Fault offset: 0x00000000000d2210
    Faulting process id: 0x1c80
    Faulting application start time: 0x01ccefaba2a15b7a
    Faulting application path: C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\win64_x64\sapjvm\bin\java.exe
    Faulting module path: C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\win64_x64\sapjvm\jre\bin\awt.dll
    Report Id: a6ef5e00-5ba2-11e1-a8c2-da6052897efd
    ====================================================================
    Also notice this error immediately afterwards reporting Transaction Deadlocks in our repository and auditing databases on SQL Server :-
    =====================================================================
    Database access error. Reason [Microsoft][SQL Server Native Client 10.0][SQL Server]Transaction (Process ID 63) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction..
    =====================================================================
    SQL Server version is 2008 Release 2.
    Have deployed BOXI 4 using Tomcat 6/Java platform.
    O/S in Windows Server 2008 Release 2.
    This should be a supported configuration so need ideas on why this is happening?
    Cheers,
    Gary

    Hi All,
    SAP Support finally came through for us on this.
    The issue is due to the version of the SAP JVM that comes bundled with BOXI 4 SP2 Patches 11 and 12.
    If you download the latest version of the SAP JVM from the SAP support portal and install this instead then the problems are resolved.
    Thanks,
    Gary

  • Calling Java from Delphi via JNI

    Hi all. I've got a J2EE application, and I'm trying to write a Delphi client for the server. More specifics:
    Server and test client running in Win2000 SP4.
    Server running in JBoss (JUnit test cases have successfully connected to the server)
    JDK 1.4
    I'm using some Delphi files from JEDI which allow me to load/access a JVM via JNI. So far, I've been able to:
    1) Create a Properties object.
    2) Populate the Properties object with String values (making sure to use NewStringUTF to pass into the Properties method
    3) Find my java client classes which facilitate opening a connection.
    However, when I attempt to call the method on the object which actually creates the connection, I get an Exception.
    My immediate question is how do I see what the Exception is? I have an Exception object, but ExceptionDescribe doesn't product anything, and I'm having trouble finding any details about the Exception (what type of exception, what the Message or Call Stack is). At the moment, something's wrong but I can't see what. And I'll have no chance of fixing it if I don't know what the problem is.
    Thanks for any help,
    Ed

    I use some code for solving this task (in real project with Delphi 6.0 & Java 1.4.1).
    May be, it will help.
    procedure TJavaInterp.CheckJNIException(Message : string);
    begin
    if JNI_ExceptionCheck(JNIEnv) = JNI_TRUE then
    begin
    JNI_ExceptionDescribe(JNIEnv);
    JNI_ExceptionClear(JNIEnv);
    raise Exception.Create(Message);
    end;
    end;{ TJavaInterp.CheckJNIException }
    procedure TJavaInterp.HandleException(excpt : jthrowable);
    var
    Msg: string;
    ESyntax : Exception;
    CauseName : WideString;
    Tag : OleVariant;
    begin
    if JNI_IsInstanceOf(JNIEnv, excpt, FclsCommonSyntaxError) = JNI_TRUE then
    begin
    ESyntax := Self.BuildSyntaxException(excpt);
    JNI_DeleteLocalRef(JNIEnv, excpt);
    raise ESyntax;
    end;
    Msg := Self.GetMessage(excpt);
    if JNI_IsInstanceOf(JNIEnv, excpt, FclsNPScriptRuntimeException) = JNI_TRUE then
    begin
    CauseName := Self.GetCauseName(excpt);
    Tag := Self.GetTag(excpt);
    JNI_DeleteLocalRef(JNIEnv, excpt);
    raise NPScriptHelper.BuildNPScriptRuntimeException(Msg, CauseName, Tag);
    end;
    if JNI_IsInstanceOf(JNIEnv, excpt, FclsHaltException) = JNI_TRUE then
    begin
    JNI_DeleteLocalRef(JNIEnv, excpt);
    raise Exception.Create(Msg);
    end;
    Msg := Self.ToString(excpt);
    JNI_DeleteLocalRef(JNIEnv, excpt);
    raise Exception.Create(Msg);
    end;{ TJavaInterp.HandleException }

Maybe you are looking for