Multiple JNI calls

I have created a class which calls my native c code. Just to test if everything was working fine I tested my class with one input file and one output file.
import java.io.*;
class JNIFoil {
     public native static void runFoilUsingJNI(String foilInput, String foilOutput);
     public static void main(String[] args) {
          JNIFoil.runFoilUsingJNI("./foil-log/add-R002S003-P01N00.d", "./foil-log/add-R002S003-P01N00-log.txt");
          System.out.println("Inside main");
          JNIFoil.runFoilUsingJNI("./foil-log/add-R004S006-P01N00.d", "./foil-log/add-R004S006-P01N00-log.txt");
     static {
          System.loadLibrary("foil");
}The native function implementation is as follows:
#include "JNIFoil.h"
#include <stdio.h>
const char* inFile;
const char* outFile;
void enter();
JNIEXPORT void JNICALL Java_JNIFoil_runFoilUsingJNI(JNIEnv * env, jclass cl, jstring inputFile, jstring outputFile) {     
     jboolean incopy, outcopy;
     //printf("\nInside JNIFoil.c with input to foil");
     inFile = (*env)->GetStringUTFChars(env,inputFile,&incopy);
     outFile = (*env)->GetStringUTFChars(env, outputFile, &outcopy);
     printf("\n File for foil is %s %s", inFile, outFile);
     enter();
     printf("\nReturning now");
void enter() {
     printf("\nCalling main");
     int a = main(1, "", inFile, outFile);
     printf("\nAfter Calling main with %d", a);
}But when I added in the second call to my native function weird thing is happening. First of all I dont see "Inside main" getting printed on console and also the second call to my native function is not working properly. I have no clue what is causing this and how do I fix this? Any suggestions or help would be appreciated.

Actually I realized after seeing this output file that my JVM is crashing.
# A fatal error has been detected by the Java Runtime Environment:
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x1000f52d, pid=1184, tid=3716
# JRE version: 6.0_20-b02
# Java VM: Java HotSpot(TM) Client VM (16.3-b01 mixed mode, sharing windows-x86 )
# Problematic frame:
# C  [foil.dll+0xf52d]
# 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 (0x00bf9800):  JavaThread "main" [_thread_in_native, id=3716, stack(0x001c0000,0x00210000)]
siginfo: ExceptionCode=0xc0000005, reading address 0x0000002e
Registers:
EAX=0x0000002e, EBX=0x03ed0478, ECX=0x00000001, EDX=0x00000000
ESP=0x0020fa00, EBP=0x0020fa28, ESI=0x00000014, EDI=0x00bf9800
EIP=0x1000f52d, EFLAGS=0x00010206
Top of Stack: (sp=0x0020fa00)
0x0020fa00:   00000014 00bf9800 0020fa28 1000f901
0x0020fa10:   03ed0528 03ed04d8 00000006 03ed0940
0x0020fa20:   03ed0478 00000006 0020fa58 1000fad6
0x0020fa30:   03ed0920 0000002e 00000000 00000000
0x0020fa40:   0000002e 00000000 00000006 0000002e
0x0020fa50:   0021be64 03ed0940 0020fa88 1000f085
0x0020fa60:   00000000 00000000 03ed0920 1000bb39
0x0020fa70:   00000006 03ed0920 00000013 00000002
Instructions: (pc=0x1000f52d)
0x1000f51d:   28 8b 45 10 8b 55 14 88 45 ff 88 55 fe 8b 45 0c
0x1000f52d:   83 38 00 0f 84 a6 00 00 00 8b 4d 0c 0f b6 45 ff
Stack: [0x001c0000,0x00210000],  sp=0x0020fa00,  free space=13e0020f51ck
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [foil.dll+0xf52d]
C  [foil.dll+0xfad6]
C  [foil.dll+0xf085]
C  [foil.dll+0x1d1a]
C  [foil.dll+0x1345]
C  [foil.dll+0x129a]
j  JNIFoil.runFoilUsingJNI(Ljava/lang/String;Ljava/lang/String;)V+0
j  JNIFoil.main([Ljava/lang/String;)V+29
v  ~StubRoutines::call_stub
V  [jvm.dll+0xf049c]
V  [jvm.dll+0x17fcf1]
V  [jvm.dll+0xf051d]
V  [jvm.dll+0xf9bc5]
V  [jvm.dll+0x10181d]
C  [java.exe+0x2155]
C  [java.exe+0x85b4]
C  [kernel32.dll+0x51194]
C  [ntdll.dll+0x5b495]
C  [ntdll.dll+0x5b468]
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  JNIFoil.runFoilUsingJNI(Ljava/lang/String;Ljava/lang/String;)V+0
j  JNIFoil.main([Ljava/lang/String;)V+29
v  ~StubRoutines::call_stub
---------------  P R O C E S S  ---------------
Java Threads: ( => current thread )
  0x01a55000 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=112, stack(0x03e00000,0x03e50000)]
  0x01a4d800 JavaThread "CompilerThread0" daemon [_thread_blocked, id=2996, stack(0x03db0000,0x03e00000)]
  0x01a4c800 JavaThread "Attach Listener" daemon [_thread_blocked, id=900, stack(0x03d60000,0x03db0000)]
  0x01a49800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=4016, stack(0x03d10000,0x03d60000)]
  0x01a45800 JavaThread "Finalizer" daemon [_thread_blocked, id=4040, stack(0x03cc0000,0x03d10000)]
  0x01a40c00 JavaThread "Reference Handler" daemon [_thread_blocked, id=2584, stack(0x03c70000,0x03cc0000)]
=>0x00bf9800 JavaThread "main" [_thread_in_native, id=3716, stack(0x001c0000,0x00210000)]
Other Threads:
  0x01a3f800 VMThread [stack: 0x03c20000,0x03c70000] [id=2568]
  0x01a56c00 WatcherThread [stack: 0x03e50000,0x03ea0000] [id=2796]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap
def new generation   total 4928K, used 281K [0x23af0000, 0x24040000, 0x29040000)
  eden space 4416K,   6% used [0x23af0000, 0x23b365a8, 0x23f40000)
  from space 512K,   0% used [0x23f40000, 0x23f40000, 0x23fc0000)
  to   space 512K,   0% used [0x23fc0000, 0x23fc0000, 0x24040000)
tenured generation   total 10944K, used 0K [0x29040000, 0x29af0000, 0x33af0000)
   the space 10944K,   0% used [0x29040000, 0x29040000, 0x29040200, 0x29af0000)
compacting perm gen  total 12288K, used 27K [0x33af0000, 0x346f0000, 0x37af0000)
   the space 12288K,   0% used [0x33af0000, 0x33af6d80, 0x33af6e00, 0x346f0000)
    ro space 10240K,  51% used [0x37af0000, 0x3801ae00, 0x3801ae00, 0x384f0000)
    rw space 12288K,  54% used [0x384f0000, 0x38b872d8, 0x38b87400, 0x390f0000)
Dynamic libraries:
0x00400000 - 0x00424000      C:\Windows\system32\java.exe
0x770d0000 - 0x7720c000      C:\Windows\SYSTEM32\ntdll.dll
0x76fa0000 - 0x77074000      C:\Windows\system32\kernel32.dll
0x754d0000 - 0x7551a000      C:\Windows\system32\KERNELBASE.dll
0x76a40000 - 0x76ae0000      C:\Windows\system32\ADVAPI32.dll
0x76b30000 - 0x76bdc000      C:\Windows\system32\msvcrt.dll
0x77210000 - 0x77229000      C:\Windows\SYSTEM32\sechost.dll
0x76d20000 - 0x76dc1000      C:\Windows\system32\RPCRT4.dll
0x7c340000 - 0x7c396000      C:\Program Files\Java\jre6\bin\msvcr71.dll
0x6d800000 - 0x6da97000      C:\Program Files\Java\jre6\bin\client\jvm.dll
0x76480000 - 0x76549000      C:\Windows\system32\USER32.dll
0x77080000 - 0x770ce000      C:\Windows\system32\GDI32.dll
0x77250000 - 0x7725a000      C:\Windows\system32\LPK.dll
0x77260000 - 0x772fd000      C:\Windows\system32\USP10.dll
0x738f0000 - 0x73922000      C:\Windows\system32\WINMM.dll
0x76550000 - 0x7656f000      C:\Windows\system32\IMM32.DLL
0x76ed0000 - 0x76f9c000      C:\Windows\system32\MSCTF.dll
0x75150000 - 0x7519b000      C:\Windows\system32\apphelp.dll
0x6d7b0000 - 0x6d7bc000      C:\Program Files\Java\jre6\bin\verify.dll
0x6d330000 - 0x6d34f000      C:\Program Files\Java\jre6\bin\java.dll
0x6d290000 - 0x6d298000      C:\Program Files\Java\jre6\bin\hpi.dll
0x77230000 - 0x77235000      C:\Windows\system32\PSAPI.DLL
0x6d7f0000 - 0x6d7ff000      C:\Program Files\Java\jre6\bin\zip.dll
0x10000000 - 0x1001b000      C:\Documents and Settings\roaan\Desktop\SimStudent FOIL\SimStudent\FOIL6(ORIGINAL)\FOIL6\foil.dll
VM Arguments:
java_command: JNIFoil
Launcher Type: SUN_STANDARD
Environment Variables:
CLASSPATH=.;C:\Program Files\Java\jre6\lib\ext\QTJava.zip
PATH=C:\cygwin\usr\local\bin;C:\cygwin\bin;C:\cygwin\bin;ommonProgramFiles\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\Java\jdk1.6.0_20\bin;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files\Java\jdk1.6.0_20\bin\
USERNAME=roaan
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 6 Model 23 Stepping 10, GenuineIntel
---------------  S Y S T E M  ---------------
OS: Windows 7 Build 7600
CPU:total 2 (2 cores per cpu, 1 threads per core) family 6 model 23 stepping 10, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1
Memory: 4k page, physical 3107188k(1736804k free), swap 6212612k(4745612k free)
vm_info: Java HotSpot(TM) Client VM (16.3-b01) for windows-x86 JRE (1.6.0_20-b02), built on Apr 12 2010 13:52:23 by "java_re" with MS VC++ 7.1 (VS2003)
time: Sat Aug 21 01:31:48 2010
elapsed time: 0 secondsI have been searching on different replies about what to do..., Any suggestions ?????

Similar Messages

  • Wildcards in Classpath for JNI-Calls

    Is it possible to use wildcards in the classpath for KNI-Calls?
    I would like to use wildcard for jni-calls like for normal java-calls (java -classpath *.jar ...), but it is not working.
    JDK version is JDK 1.5.0 on Win32

    I would like to use wildcard for jni-calls like for normal
    java-calls (java -classpath *.jar ...), but it is not working.It would be the Shell, not Java doing the wildcard magic.
    You would have to do the globbing manually (or use any OS APIs, or 3rd party APIs).

  • How to loop through single XML File and send multiple RFC calls?

    I am looking for the best approach to use for making multiple RFC calls (can be sequential) using a single XML file of data.  I have been attempting to get a BPM loop working, but to no avail.  My RFC only accepts a single set of delivery input and I have been told to try to work with it as is.
    input xml sample:
    <?xml version="1.0" encoding="UTF-8"?>
    <ProofOfDelivery>
       <POD>
          <delivery_number>1</delivery_number>
          <carrier_name>UPS</carrier_name>
       </POD>
       <POD>
          <delivery_number>2</delivery_number>
          <carrier_name>UPS</carrier_name>
       </POD>
    </ProofOfDelivery>
    I need to make a synchronous RFC call for each set of POD data.
    Thanks in advance!

    Thanks for the inputs.
    I tried with a BPM and multi-mapping transformation before a ForEach block.  I am getting this error:
    Work item 000000028028: Object FLOWITEM method EXECUTE cannot be executed
    Error during result processing of work item 000000028029
    com/sap/xi/tf/_ProofOfDeliveryMultiMapping_com.sap.aii.utilxi.misc.api.BaseRuntimeExceptionRuntim
    Error: Exception CX_MERGE_SPLIT occurred (program: CL_MERGE_SPLIT_SERVICE========CP, include: CL_
    Probably because I am not making/using the container objects properly.  Here is a screenshot of my BPM.  Can anyone spot my issue or point me to an example on this sort of container use?
    [http://kdwendel.brinkster.net/images/bpm.jpg|http://kdwendel.brinkster.net/images/bpm.jpg]
    Thanks

  • Multiple BAPI calls in RFC Adapter

    Hi, Dear Friends!
    I have asynchronous scenario File to RFC(BAPI).
    File contains raws. For each raw I need to execute BAPI.
    With the help of each raw I need to construct one document in R/3 database with the help of BAPI.
    But now my scenario provide only one document (only one BAPI is executed).
    I read file to xml structure. This structure contains elements. The elements represent raws of file. But BAPI is executed only for the first element.
    How to explain to XI that I want it impement BAPI <b>N times</b> - as number of raws in file (or elements in xml structure).
    So how to implement multiple BAPI calls. Have you any idea?
    Thank you in advance.
    Natalia Maslova.

    Hi Natalia
    have a look on these links
    http://help.sap.com/saphelp_nw04/helpdata/en/43/b46c4253c111d395fa00a0c94260a5/frameset.htm
    Best Design : for a SOAP -XI - BAPI ( Multiple )
    Re: RFC adapter...How it handles multiple calls...
    Re: Multiple BAPIs and COMMIT in BPM
    Re: Is it possible to compose XML in BPM from responses of multiple BAPI calls?
    Multiple BAPI calls in RFC Adapter
    may be helpful
    Thanks !!!

  • JNI Calling Java code when attaching to existing JVM

    I've got an Active/X that runs within IE, and also makes JNI calls (via the Invocation API) to Java code. Running within IE means there's already a JVM around, so I attach to it using JNI_GetCreatedJavaVMs
    This is fine. The problem is that I can't use the JNI findClass() to locate my Java classes, because I have no control over the classpath that the JVM is using to locate classes. The only solution I can think of so far is to either add my classes as part of the JVM, OR find out the classpath of the existing JVM (using System.getProperty("java.class.path") and copy my classes into that directory.
    Both solutions look ugly - anyone know of a cleaner way ?
    Mark.

    Toby, thanks for the reply.
    You're welcome.
    I notice from elsewhere on this forum, you're clearly a JNI expert.
    I've been known to work with it a little from time to time. =)
    My code has to work with JDK 1.1 so URLClassLoader is out. Writing my own classloader is fine, but how do I load it in the first place ? Is there something in JNI I've missed ?
    Possibly. Using DefineClass() you can load a class into the virtual machine, given it's byte-code. Now here's the tricky part. First, write your ClassLoader. It will be easiest if it doesn't rely on any other classes other than what is core to the JRE. Once you compile that classloader, you then need to include the bytecode as a resource in your executable/dll. Then, at runtime, you can load that resource, and use DefineClass to class-load it. Once you've class-loaded it, you can use NewObject, GetMethodID, CallXXXMethod, etc... to do the other class loading you need to do.
    Trust me, this really isn't as hard as it might sound.
    God bless,
    -Toby Reyelts
    As always, I recommend you check out the free, open-source JNI toolkit, Jace, at http://jace.reyelts.com/jace.

  • Core dump on solaris 8/7 making JNI call.

    Hi,
    I am running solaris 8 and solaris 7 with Java 1.3.1. I have required solaris patches installed on the machine for java 1.3.1.
    From a C program I am making some JNI calls and when I run the program it core dumps at the very first JNI call. C program that make JNI calls are in a .so file.
    Same C code with Java 1.3.1 is running fine on window 2000, AIX 5.1, RedHat Advanced Server 2.1 and SuSE Enterprise Linux 7.
    Any help will be greatly appriciated.
    Thanks

    Hiya,
    Any resolution to this post , we have a native JNI call on a Websphere server running on Solaris 8 .. and same thing happening .. random core dump on the box ..
    No warning , no explanation
    Thanks so much for your help
    (btw . running Sun jvm 1.4.2_13)

  • Local ref garbage collection within "nested" JNI calls

    I am using a JVM started in C++ to make calls to java classes. The C++ code makes JNI call into the JVM which instantiates a java class. The java class, in the course of execution, makes other JNI calls. All this happens on one thread of execution.
    What I am seeing is that local references from the native methods being called by the java class are not being released until the initial C++ native call exits. The JNI spec (text included below) seems to indicate there is registry of "nonmovable local references to Java objects" which "keeps the objects from being garbage collected". Is there only one such registry which does not get deleted until the initial C++ native call exits? If so, this would explain what I am seeing. How do I get around it?
    Thanks,
    Iztok
    From the JNI spec:
    "To implement local references, the Java VM creates a registry for each
    transition of control from Java to a native method. A registry maps nonmovable local references to Java objects, and keeps the objects from being garbage collected. All Java objects passed to the native method (including those that are returned as the results of JNI function calls) are automatically added to the registry. The registry is deleted after the native method returns, allowing all of its entries to be garbage collected."

    When I say "initial" I mean the initial C++ JNI call into a JVM running in a C++ process as shown in the pseudo code below. initNativeFunc() makes a call to Foo.doSomething() function which calls nativeFunc2 (another native function). Only a local reference to Retval was created in nativeFunct2, so when nativeFunct2 returns and the Retval is no longer used in Foo it should be a candidate for garbage collection. But this is not what happens. The Retval from nativeFunc2 is not being cleaned up until Foo.doSomething() returns. If I make the loop in Foo.doSomething() long enough, NewDoubleArray() returns a NULL when it runs out of memory.
    void initNativeFunc() {
    jclass clazz = env->FindClass("Foo");
    jmethodID mid = env->GetMethodID(clazz, "doSomething", "()V");
    env->CallVoidMethod(clazz, mid, ...);
    JNIEXPORT jobject JNICALL nativeFunc2() {
    jclass clazz = env->FindClass("Retval");
    jmethodID mid = env->GetMethodID("Retval, "<init>", "()V");
    jobject retval= env->NewObject(clazz, mid);
    jdoubleArray da = env->NewDoubleArray(100000);
    jfieldID fid = ...
    env->SetObjectField(retval, fid, da);
    return retval;
    public class Foo {
    public native void nativeFunc2();
    public void doSomething() {
    for (int i = 0; i < 100; i++) {
    Retval retval = nativeFunc2();
    }

  • Classpath for JNI call in NT4?

    ?I prepare MyClass for JNI call on iPlanet 6 running on NT. The corresponding DLL is put in WINNT\SYSTEM32. The classpath set in registry is updated too. But error "class not found. (no MyClass in java.library.path)" still occurs. Is there any work i miss? Please advise.?

    Hi,
    Can you check the Environment variable CLASSPATH ?, the application server's classpath found under Software/iPlanet->Application Server->6.0->Java using kregedit.
    Thanks & Regards
    Ganesh .R
    Developer Technical Support
    Sun Microsystems
    http://www.sun.com/developers/support

  • Stack overflow in JNI call

    Hi,
    I am doing a wrapper with JNI for a Windows library of image compression. I have a test program running correctly in C. This program compress data and it can move a lot of memory. If I call this program from a JNI functions I obtain a JNI error:
    An unrecoverable stack overflow has occurred.
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : EXCEPTION_STACK_OVERFLOW (0xc00000fd) occurred at PC=0x5FF88497
    Function=unpack_data+0x189D7
    Library=C:\WINDOWS\system32\NCSEcw.dll
    This error is produce inside my compression library. I try to adjust the parameters (-Xms -Xmx -Xss) of the JVM but in any case before the process ends it shows this exception. I have done other JNI interfaces and I never found with this problem before. Can anybody help me?
    Thanks in advance.

    I found in this forum a piece of code with a same kind problem but It is simpler than mine. I have proved this program in Windows and it produce the same error. In Linux it runs but if I enlarge the array largebuf it ends with the same error. In Linux I can reserve until 2 MB (in windows +-256K). Is there any way to increase the stack size in a jni call?.
    #include <stdio.h>
    #include <jni.h>
    #include "test.h"
    int myprint2(int a, int b){
         char extrabuf[100];
         printf("got here next\n");
         extrabuf;
         return 0;
    int myprint(int a, int b){
         char largebuf[260000];
         printf("got here\n");
         myprint2(1,1);
         largebuf;
         return 0;
    JNIEXPORT jint JNICALL Java_test_init(JNIEnv *env, jobject obj){
         myprint(1,1);
         return 1;
    test.java
    public class test{
         public native int init();
         public static void main(String []args){
              new test();
         public test(){
              System.loadLibrary("Nat");
              System.out.println(this.init());
    }

  • JNI calls in an Applet

    Hi all,
    I have an applet that makes an JNI call to a DLL. The DLL is in a custom directory c:\testing\test.dll. Under the default JDK that ships with Windows 2000 it works fine when I do a
    System.loadLibrary("c:/testing/test");
    However, I've switch to the JDK 1.3 plugin and now I get an UnsatisfiedLinkError. If I move the file to c:\winnt\system32, it works fine. I've tried setting the "java.library.path" property to no avail.
    Anyone have any ideas, besides moving the dll to c:\winnt\system32?
    thx.
    Mike

    the solution was to use System.load instead of System.loadLibrary

  • Help with multiple httpservice calls

    I need help with multiple httpservice call back to back, doing 10 different mysql query at startup of the app loading results into 14 datagrids/combobox all queries are to different tables.

    Hello,
    I think what Grizzzzzzzzzz means is the following:
        <mx:HTTPService id="serviceOne"
            url="here goes url"
            result="resultHandler1(event);"
            fault="faultHandler(event);"/>
        <mx:HTTPService id="serviceTwo"
            url="here goes url"
            result="resultHandler2(event);"
            fault="faultHandler(event);"/>
        <mx:HTTPService id="serviceThree"
            url="here goes url"
            result="resultHandler3(event);"
            fault="faultHandler(event);"/>
         // Result handler 1
         private function resultHandler1(event:ResultEvent):void{
              //Here do something with the results
             xmlCollection = event.result as XML;
             //then call the next service
             serviceTwo.send();
          // Result handler 2
          private function resultHandler2(event:ResultEvent):void{
              //Here do something with the results
             xmlCollection = event.result as XML;
             //then call the next service
              serviceThree.send();
    I hope this helps,
    Pierre

  • Session between multiple Webservice calls from PI7.0

    Hello XI SDNers,
    I am unable to overcome my Webservice session problem using SOAP (Axis) adapter. My scenario is as follows:
    I am calling a external Webservice deployed in Axis webservice engine from PI7.0, during my first call:  I call synchronous "Login" webservice and I became the response "User is Logged in"
    during my second synchronous call "GetItem", the webservice returns "The user doesn't have valid session". The two synchronous calls are executed from same scenario one after another!
    I lost my session after the "Login". Is there any way in PI 7.0 to maintain the session?
    Note: I tried the same scenario using XML SPY SOAP client, it is working!!!  it is maintaining the session between multiple webservice calls.
    Is there any suggestions to overcome this problem?
    Thanks and regards,
    Satish.

    Hi Satish,
       We are working on the same sort of scenarios, where we have to call more than one webservice in a sequential fashion using the same session id details.
        What we did was we built new xsds adding session details node using the webserive request and response xsds. And we are maintaining a sessions table which contains session id and  status fields in PI. So we send webservice request with the session id details. We wrote an UDF to get the session details from PI and set the status field as busy so that no other request uses the same session details.
       Webserive response again contains the sessions details which can be used for the next webservice request.
      Finally after all the calls set back the status to Active in PI table.
    Webservice Calls From a User Defined Function
    /people/bhavesh.kantilal/blog/2006/11/20/webservice-calls-from-a-user-defined-function
    Hope this helps.
    Thanks,
    Vijaya.

  • Multiple Service called doesn't work as expected

    Hello
    I have been trying to do this.
    callresponder id="test"
    SomeService properly imported through Flash Builder 4
    for (var i:int=0;i< pool.length;i++)
    test.token = SomeService.getSomething(pool[i].someValue);
    Only the first one would be successful. It seems that while result event has not occurred the service is busy and cannot be used. Is there a way to workaround this?
    Help! I don't want to call after result event!

    The point is I want to avoid waiting for each service to complete, although what you suggest would work I finally figured it out how to solve this problem.
    Problem: The problem is one call responder cannot be used by multiple service call.
    Solution: Make more call responders....
    var c:CallResponder;
    before each iteration begins
    c = new CallResponder();
    c.addEventListener(ResultEvent.RESULT, resultHandler);
    c.token = SomeService.whatEver(something);

  • Creating JVM to Make JNI calls

    I am trying to create a JVM to make JNI calls to Java. When I try to link my C++ program with jvm.lib, I am getting following error. Please advise.
    "fatal error LNK1106: invalid file or disk full"
    I am sure the disk is not full.

    What IDE are you using? I am using MS VC++ 5.0 with jdk 1.3 and I got the same error. After trying several things (including recreating my project)I realized that jdk 1.3 was created after VC++ 5.0. So on a wild hunch I installed jdk 1.2.2. I then removed all project referrences to jdk 1.3. Closed all my files. Reopend them. Made sure the jni.h external dependency was pointing to 1.2.2 (you may have to do a build to force it) and then everything linked fine.

  • JNI call CallLongMethod causes gpf

    Hi,
    I am using the JNI call CallLongMethod to return a jlongArray.
    jlongArray itemArray = (jlongArray)env->CallLongMethod(jObjFilterCondition, JavaIDs::_mids[JMETHOD_FI_GETALLVALUES]);
    Here method id is cached and it was retrieved as follows:
    env->GetMethodID (env->FindClass("com/fujitsu/pureweb/valueobjects/FilterItem"), "getAllValues", "()[J");
    After this if I try to call GetLongArrayElements(), it results in gpf. This occurs only in Solaris (compiler used is cc 5.0 and JDK 1.3.1_02. The problem does not occur in Windows.
    What can be possible reason for this?
    *** Interestingly, if I replace CallLongMethod with CallIntMethod, it works!!!!!!
    Regards,
    Harish

    If you are trying to get a reference to an array, then you are using the wrong JNI subroutine. An array is an object, and you have to use CallObjectMethod...

Maybe you are looking for

  • Error while creating oracle external table

    I am trying to create an external table with the following syntax. WhenI have executed this statement in my server which running in my machine, it is working fine. Whine I try to run the same statement on different server, it is giving the below erro

  • Can not shut down at retina

    Can not shut down the machine, close the display to dark , But still running, lost all power pass the night!

  • Failure window.cpp line 2039

    Developed LV 5.1.1-Applications on Win NT4.0. Now i need to run them on WIN 2000 Systems but receive only errors while starting : window.c line 2019 (by starting my Application.exe) window.cpp line 2039 (by starting the LV Development system on the W

  • Widgets dans Captivate 7

    Bonjour je viens d'installer Captivate 7 et je me rends compte que ce qui a motivé mon achat me pose problème. Les widgets de jeux (mots cachés, pendu etc.... ) sont en anglais (j'ai pourtant acheté une version française). Les consignes dans l'interf

  • Center Speaker plays center sounds and rear sounds. Inspire 5.1 5300 speakers.

    My inspire 5.1 5300 speakers are set up for 5.1 surround sound. I have CMSS enabled. I hear static from the rear speakers. Everything seems to be set up just fine. But when I run the speaker test the front right, center, and front left work. The rear