JVM fails

I'm writing JNI application for some C++ code. I don't have implementations of any functions but I'm pass values of parameters through my java program. e.g. in following OpenDevice function I can pass parallel port parameter(defined in C++) through Java. The implementation is just calling the function. It works.
OpenDevice(DWORD port);
GetImage(BYTE* buffer);
........DWORD and BYTE are defined as unsigned long and unsigned char respectively.
now I want to read 'buffer' but when I try to read the buffer, the JVM fails.
Would any1 help me in above?

The C function takes BYTE*, then the problem can be that you are not handling the Java native stuff correctly. Generally, you must have more C warpper code to create a jbyteArray using NewByteArray() in jni.h and copy data from BYTE buffer to it.
Can you show your Java native method signature?

Similar Messages

  • Collect with 32bit JVM failed

    Hi,
    I am using collect tool from Sun Studio 12, i used it succeccfully on my system using 64-bit Sun JDK 1.6
    but when i try to use it to collect Hardware counter data using 32-bit jvm it failes and shows error while i trying to analyze collect data using "Analyzer" tool
    The error message it shows is *"test.1.er***Collector Error: Initializing Hardware counter profiling failed"*
    OS version
    $ uname -a
    Linux m02 2.6.18-92.el5.src-PAPI #1 SMP Tue Jan 27 10:57:40 CET 2009 x86_64 x86_64 x86_64 GNU/Linux
    Java version (32-bit version that is not working)
    ]$ java -version
    java version "1.6.0_10"
    Java(TM) SE Runtime Environment (build 1.6.0_10-b33)
    Java HotSpot(TM) Server VM (build 11.0-b15, mixed mode)
    the other Java version that is working fine (64-bit version)
    ]$ java -version
    java version "1.6.0_13"
    Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
    Java HotSpot(TM) 64-Bit Server VM (build 11.3-b02, mixed mode)
    collect command output
    ]$ collect
    NOTE: Linux-64-bit, 32 CPUs, CentOS_5.2 system "mi02" is supported by the Performance tools.
    NOTE: The J2SE[tm] version 1.6.0_10 found at java (picked by PATH) is supported by the Performance tools.
    usage:  collect <args> target <target-args>
            Sun Analyzer 7.7 Linux_i386 2009/06/03 [64-bit]
      -p <interval> specify clock-profiling
            clock profiling interval range on this system is from
            10.000 to 1000.000 millisec.; resolution is 10.000 millisec.
      -h <ctr_def>...[,<ctr_n_def>]
            specify HW counter profiling for up to 4 HW counters
            see below for more details
      -s <threshold>        specify synchronization wait tracing
      -r <option>   specify thread analyzer experiment; see man page
      -H {on|off}   specify heap tracing
      -M {version|off}      specify an MPI experiment
            Supported MPI versions: CT8.2, CT8.1, CT8, CT7, CT7.1, OPENMPI, MPICH2, MVAPICH2
      -m {on|off}   specify MPI tracing
      -j {on|off|path}      specify Java profiling
      -J <java-args>        specify arguments to Java for Java profiling
      -t <duration> specify time over which to record data
      -x    specify leaving the target waiting for a debugger attach
      -n    dry run -- don't run target or collect performance data
      -y <signal>[,r]       specify delayed initialization and pause/resume signal
            When set, the target starts in paused mode;
              if the optional r is provided, it starts in resumed mode
      -F {on|off|all|=<regex>}      specify following descendant processes
      -A {on|off|copy}      specify archiving of load-objects; default is on
      -S <interval> specify periodic sampling interval (secs.)
      -L <size>     specify experiment size limit (MB.)
      -l <signal>   specify signal for samples
      -o <expt>     specify experiment name
      -d <directory>        specify experiment directory
      -g <groupname>        specify experiment group
      -O <file>     redirect all of collect's output to file
      -v    print expanded log of processing
      -C <label>    specify comment label (up to 10 may appear)
      -R    show the README file and exit
      -V    print version number and exit
    Default experiment:
            expt_name = test.3.er
            clock profiling enabled, 10.000 millisec.
            descendant processes will not be followed
            periodic sampling, 1 secs.
            experiment size limit 2000 MB.
            experiment archiving: on
            data descriptor: "p:10000;S:1;L:2000;A:1;"
                    host: `m02', cpuver = 2501, ncpus = 32, clock frequency 1200 MHz.
                    memory:  16518000 pages @ 4096 bytes = 64523 MB.
    Specifying HW counters on `AMD Family 10h':
        <ctr_def> == [+]<ctr>[~<attr>=<val>]...[~<attrN>=<valN>][/<reg#>][,<interval>]
           <+>
              for memory-related counters, attempt to backtrack to find
              the triggering instruction and the virtual and physical
              addresses of the memory reference
           <ctr>
              counter name, must be selected from the available counters
              listed below.  On most systems, if a counter is not listed
              below, it may still be specified by its numeric value
           <attr>=<val>
              optional attribute where <val> can be in decimal or hex
              format, and <attr> can be one of:
                 'umask'
                 'os'
                 'edge'
                 'pc'
                 'inv'
                 'cmask'
           <reg#>
              forces use of a specific hardware register.  If not specified,
              collect will attempt to place the counter into the first
              available register and as a result, may be unable to place
              subsequent counters due to register conflicts.
           <interval> == {on|hi|lo|<value>}
              `on' selects the default rate, listed below
              `hi' specifies an interval ~10 times shorter than `on'
              `lo' specifies an interval ~10 times longer than `on'
    Aliased HW counters available for profiling:
        cycles[/{0|1|2|3}],99999989 (`CPU Cycles', alias for BU_cpu_clk_unhalted; CPU-cycles)
        insts[/{0|1|2|3}],9999991 (`Instructions Executed', alias for FR_retired_x86_instr_w_excp_intr; events)
        ic[/{0|1|2|3}],100003 (`I$ Refs', alias for IC_fetch; events)
        icm[/{0|1|2|3}],100003 (`I$ Misses', alias for IC_miss; events)
        itlbh[/{0|1|2|3}],100003 (`ITLB Hits', alias for IC_itlb_L1_miss_L2_hit; events)
        itlbm[/{0|1|2|3}],100003 (`ITLB Misses', alias for IC_itlb_L1_miss_L2_miss; events)
        eci[/{0|1|2|3}],1000003 (`E$ Instr. Refs', alias for BU_internal_L2_req~umask=0x1; events)
        ecim[/{0|1|2|3}],10007 (`E$ Instr. Misses', alias for BU_fill_req_missed_L2~umask=0x1; events)
        dc[/{0|1|2|3}],1000003 (`D$ Refs', alias for DC_access; load events)
        dcm[/{0|1|2|3}],100003 (`D$ Misses', alias for DC_miss; load events)
        dtlbh[/{0|1|2|3}],100003 (`DTLB Hits', alias for DC_dtlb_L1_miss_L2_hit; load-store events)
        dtlbm[/{0|1|2|3}],100003 (`DTLB Misses', alias for DC_dtlb_L1_miss_L2_miss; load-store events)
        ecd[/{0|1|2|3}],1000003 (`E$ Data Refs', alias for BU_internal_L2_req~umask=0x2; load-store events)
        ecdm[/{0|1|2|3}],10007 (`E$ Data Misses', alias for BU_fill_req_missed_L2~umask=0x2; load-store events)
        fpadd[/{0|1|2|3}],1000003 (`FP Adds', alias for FP_dispatched_fpu_ops~umask=0x1; events)
        fpmul[/{0|1|2|3}],1000003 (`FP Muls', alias for FP_dispatched_fpu_ops~umask=0x2; events)
        fpustall[/{0|1|2|3}],1000003 (`FPU Stall Cycles', alias for FR_dispatch_stall_fpu_full; CPU-cycles)
        memstall[/{0|1|2|3}],1000003 (`Memory Unit Stall Cycles', alias for FR_dispatch_stall_ls_full; CPU-cycles)
        PAPI_l1_dcm[/{0|1|2|3}],100003 (`Level 1 data cache misses'; load-store events)
        PAPI_l1_icm[/{0|1|2|3}],100003 (`Level 1 instruction cache misses'; events)
        PAPI_l2_dcm[/{0|1|2|3}],100003 (`Level 2 data cache misses'; load-store events)
    Raw HW counters available for profiling:
      *......  { I removed raw counter list to shorten this post}*
    See section 3.15 of the "BIOS and Kernel Developer's Guide (BKDG) For AMD Family 10h Processors,"
    AMD publication #31116
    See the collect.1 man page for more information
    analyzer tool version
    $ analyzer -v
    analyzer: Sun Analyzer 7.7 Linux_i386 2009/06/03
    Any idea what is wrong with my configuration? Can we use collect for 32-bit and java apps?
    Thanks a lot
    Edited by: allo6 on Aug 20, 2009 3:25 AM

    hi,
    how to compile 32 bits libraries on a Centos5 64 bits running on AMD 64 bits (Family 10h)
    running
    make CC="gcc -m32" CFLAGS="-m32" LDFLAGS="-m32" ARCH=i386
    or just
    make CC="gcc -m32" CFLAGS="-m32" LDFLAGS="-m32" generate a 32 bit version
    /usr/local/perfctr32/lib/libperfctr.so.5.2.6.35: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped
    but the "collect"command (from sun studio for collecting HW values) returns HW counter not suported.
    the above generated library is 32 bit but it is intel architecture, The architecture i have is AMD, what "ARCH" flag to spefify for this
    if i do not specify any ARCH value there there is this error in the make command
    ake[4]: Entering directory `perfctr-2.6.x/examples/perfex'
    gcc -m32 -m32 perfex.o x86.o ../../usr.lib/libperfctr.a -o perfex
    ../../usr.lib/libperfctr.a(event_set_x86.o):(.rodata+0x24): undefined reference to `perfctr_p5_event_set'
    ../../usr.lib/libperfctr.a(event_set_x86.o):(.rodata+0x28): undefined reference to `perfctr_p5mmx_event_set'
    ../../usr.lib/libperfctr.a(event_set_x86.o):(.rodata+0x2c): undefined reference to `perfctr_ppro_event_set'
    ../../usr.lib/libperfctr.a(event_set_x86.o):(.rodata+0x30): undefined reference to `perfctr_p2_event_set'
    ../../usr.lib/libperfctr.a(event_set_x86.o):(.rodata+0x34): undefined reference to `perfctr_p3_event_set'
    ../../usr.lib/libperfctr.a(event_set_x86.o):(.rodata+0x38): undefined reference to `perfctr_mii_event_set'

  • JVM Fails when using SQLJ/JDBC

    My program is often terminating with the following error.
    # An EXCEPTION_ACCESS_VIOLATION exception has been detected in native code outside the VM.
    # Program counter=0x604483d3
    From the error I suspect it is either the SQLJ runtime or the JDBC driver causing the problem.
    I mostly get this error after 3 - 4 hrs of execution of my program.
    Has anybody experienced this problem? Any input is appreciated.
    Vig
    null

    Hi there
    it seems to be an outside-JVM exception, it could be caused by native code,
    Try to use a thin driver of Java which is 100% java, and tell us what does it do!
    salam

  • JVM fails to initialize

    Hi,
    We have an app that has been deployed for a while absolutely fine. Today users are reporting that they get the message "Could not initialize Java virtual machine. Program will exit". Has anyone any idea what might cause this?
    Thanks
    Simon

    I'm not surprised this chap never came back to you!
    I'm looking for the answer to the same question... my dialog pops up when I start BEA WebLogic 8.1QuickStart. Another BEA 'program icon' - Configuration Wizard - starts just fine.
    They both use the same Java environment.
    The dialog is entitled Java Virtual Machine Launcher and it displays the following text... "Could not initialize the Java virtual machine. Program will exit!"
    Now, I suppose my Pet is ill, but I am hoping that another user with a pet in recovery will read these posts and tell us what they did to cure it. At the moment, I feel like shooting the poor animal.

  • Setting max heap in Oracle JVM

    Hello -
    I'm having a problem with a Java stored procedure running out of heap memory in Oracle 10g running Java 1.4.
    Normally (running Java in a standard context) I would just modify the -Xmx with a higher value, but for the life of me I can't figure out how to do it in a stored procedure context.
    I have browsed Google and I have browsed the Oracle JVM installation stuff, all to no avail.
    Can anyone help me with how to set my max heap size, or verify that it's impossible? I have taken all of the standard Oracle memory parameters (JAVA_POOL, UGA/PGA/SGA limits) out of the picture by jacking them up and keeping an eye on memory values up to the point that the procedure fails (at ~700m), so I'm pretty sure that this is my problem.
    So far I have looked at:
    Config files
    Config tables
    DB parameters
    I haven't been able to find anything remotely related to JVM option configuration in any of the above.
    It is worth noting that I ran across another forum where someone was wanting to set their minimum heap size, and they were told that it was not possible. I'm just having trouble believing that it's the same story with something as critical as max heap size.
    Much obliged for any help.
    Thanks,
    Annaka

    From Metalink Note 466112.1:
    Applies to:
    Oracle Server - Enterprise Edition - Version: 9.2.0.1 to 10.2.0.3
    This problem can occur on any platform.
    Symptoms
    When attempting to execute a java class that works fine in a stand alone JVM, fails with Oracle JVM with the following error:
    ERROR
    ORA-29532: Java call terminated by uncaught Java exception:
    java.lang.OutOfMemoryError
    ORA-06512: at "IDS_SYS.POD", line 3
    Cause
    The MaxMemorySize was set 256M (the default values) where the JSO needs memory more than 256 MB to run.
    This can be checked as following:
    SQL> create or replace function getMaxMemorySize return number
    2 is language java name
    3 'oracle.aurora.vm.OracleRuntime.getMaxMemorySize() returns long';
    4 /
    Function created.
    SQL> select getMaxMemorySize from dual;
    GETMAXMEMORYSIZE
    268435456
    After increasing the MaxMemorySize to a larger value(1 GB), the problem was fixed
    Solution
    Please increase the MaxMemorySize to a larger values(i.e. 1GB), this can be done as following:
    SQL> create or replace function setMaxMemorySize(num number) return number
    2 is language java name
    3 'oracle.aurora.vm.OracleRuntime.setMaxMemorySize(long) returns long';
    4 /
    Function created.
    SQL> select setMaxMemorySize(1024*1024*1024) from dual;
    SETMAXMEMORYSIZE(1024*1024*1024)
    Then you can check if the value is set correctly using the following:
    SQL> select getMaxMemorySize from dual;
    GETMAXMEMORYSIZE
    1073741824
    In my case I had to set the parameter within a job's the session.
    bye
    TPD
    Edited by: TPD on Sep 23, 2008 4:27 PM - tags added

  • Space in "Program Files" causing JNI_CreateJavaVM to fail

    JNI experts:
    I'm launching a VM from a .exe (Win2000) written in C using MSVC and using JNI_CreateJavaVM. I'd like to specify the location of my installed jar file using the
    -Djava.class.path=path as an optionString in an options element of JavaVMInitArgs.
    All works wonderfully. Congratulations to all those who made JNI happen :)
    So... there's one problem. When my jar file is installed in c:\Program Files\xyz\myfile.jar the JVM fails to find it. When installed in c:\xyz\myfile.jar the JVM finds it and all is well.
    It looks like this: "-Djava.class.path=c:\Program Files\..."
    So I'm rather convinced the space between Program and Files is causing the problem. I've tried many hacks and searched the web and newsgroups to a large degree... with no luck.
    This is jdk1.3 and I've tried both JDK and JRE dlls:
    c:\Program Files\JavaSoft\JRE\1.3.0_0\bin\hotspot\jvm.dll
    and
    c:\jdk1.3\bin\hotspot\jvm.dll
    I've also tried classic instead of hotspot.
    Any clues would be helpful. Or, can I get access to the JVM code (I know that much of the Java implementation is available in various locations). I'm sure after dissecting that I could find the problem.
    Also, installing the .jar file in a directory without spaces in the name is unacceptable :(
    Thanks much...
    -Clint

    Ok, I've found the problem. For reference:
    1. Use the ext directories (jre/lib/ext). However, this won't work when using older JVMs. Which I'm attempting to provide backward compatibility.
    OR
    2. The java.class.path system property must contain entire path of a jar file, not just a directory containing the jar files of interest.
    ALSO
    3. An odd behavior. When the java.class.path system property contains an invalid path, the JVM seems to add the current working directory (the directory from where the JVM was initated) to the java.class.path property. For instance, I had:
    -Djava.class.path=c:\test;c:\testBad;
    where c:\testBad is not an actual directory. This will make the JVM look in the CWD to look for class files. Or so that is the behavior that I witnessed. Go figure...
    -Clint

  • The impact of java.ext.dirs and XMX settings to a JVM

    Hello,
    I've been using a XMX setting of 3800M for a particular JVM running a particular task.
    However, if I pass the -Djava.ext.dirs option, and point it to some directories, the JVM fails for the same task I've been running in my first run.
    truss output appears to show the failure occurring during mmap() resulting in ENOMEM.
    The question is, under what condition would java.ext.dirs change the behavior of my XMX setting? If it take it out, it runs fine.
    Java version: 1.4.1, SunOS Sparc

    This sounds like a problem I had a while ago that stumped me for several days.
    If your class with the "main" method is loaded from the extensions directory (java.ext.dirs), it appears that a special classloader is used to do that, not the standard classloader that looks in the classpath. This special classloader appears to ignore the classpath and look only in the extensions directory. Also, the JVM appears to try this classloader before the standard classloader.
    Now, when one class wants to load another class, it always uses the classloader that loaded it to load that other class (unless you specifically write your program to use some other classloader). So what is happening to you is this: The "extensions classloader" loads your class with the "main" method, because it can. Then your "main" method tries to load another class, but it uses the "extensions classloader" to do that. And the "extensions classloader" doesn't look in the classpath, and what you saw is what you got.
    At least the answer to your problem is clear: Don't do that.

  • Ssl_accetp failed when java visual machine tries to load jar file

    my web server uses openssl to implement https protocol .
    my webpage contains a jar file.( "archive=droptext.jar")
    JVM failed to load this jar from web server (using https protocol).
    because Server failed to make a ssl connection after a ssl_accept failed error .(the function "SSL_accept (ssl)" failed)
    if I use class file instead of jar file. JVM can successfully make a connection with server and load the class file.
    I have no choice but to use jar file because the applet contains more than one class file.

    >
    Try putting the domain names in the Windows hosts files with their numeric addresses. That should bypass any DNS lookup. If you have central maintenance you can update all the hosts files when IP address change.
    We have considered this option, but then we have the same problem described on c). IP maintentance. IPs change often and we cannot control it.
    Malcolmmc, paul.miner, jschell,
    I think the problem is Netbios resolution, rather than DNS one. The sites that figure on java.policy file, are not available in terms of Netbios (they are not LAN clients), so they are only visibles on DNS resolution. But Java still tries to resolve them with Netbios first, so I think there's a timeout on this resolution (not the DNS one) . This timeout causes the problem.
    But, anyway .... Why is Java trying to resolve those names ??? In fact, Java will only have to match the site you are visiting with the site specified on java.policy (just a String comparison). Why does Java need to resolve (netbios & dns) the names on java.policy? I cannot figure out why.
    Thank you all.
    Marc

  • Out of Memeory Error

    Hi All,
    My application is RMI based running in JDK .1.3.1_12 And JRE 1.3.1_09, Server is Windows 2000, 6GB RAM.
    Four different RMI services are running. 2 services are configured as JVM heap size intial memory as 1100 Mb and Max mem as 1600 Mb. Remaining are Max is 64 Mb only.
    When i change one of the sevice(1600 mb ) Max memeory is 1700 Mb, during the RMI service start up,i'm geeting this error.
    NFO | jvm 2 | 2005/10/14 08:26:34 | Error occurred during initialization of VM
    INFO | jvm 2 | 2005/10/14 08:26:34 | Could not reserve enough space for object heap
    What could be the problem, Eventhough i'm having 6 Gb Ram.Please advise me

    Hi,
    eventhouif u set maxheap sizeof JVM to 1700 MB, may be JVM failing to get the enugh memoryfrom OS.
    and also if u change the minimum heap size of JVM then other processes will effect. so itis not advisable to change the minimum heap size of JVM.
    i sugget that better keep minimum heap size as 256MB max heap size as 100MB.
    ex:
    -Xms256MB -Xmx1700MB

  • Java freezes safari

    I've read through a few other discussions on this site trying to figure out why my financial web page freezes when it tries to load a java program to do stock trading. The people at Schwab are clueless about macs.
    I notice on my hard drive, that i have two different copies of the java plugin 1.4.2_9 and 1.3.1. Should i trash the older version? I also notice in my Safari help file, that both are listed, in various palces.
    I emptied the caches for both java files, and did all the usual file and safari torubleshooting. anybody have any other suggestions?

    Streetsmart.com does not freeze Safari for me - but it is not working either. I had a similar problem when I first got this Mac - in November, and was told by Schwab to reset Safari, then restart my computer - and it worked. However, I have tried that this time, and it does not. From my Schwab account page - I click the StreetSmart.com icon, and it goes into the testing phase. The test comes back - JVM failed. (everything else passes) However, when I test the JVM on another website, it passes. Also - when I try the Schwab simulation of StreetSmart (which uses day old data) it works fine. I saw in another discussion group that someone else was having problems with JVM - When comparing plug-ins - he found the following:
    "The only difference that I found was under Safari/Help/Installed Plug-ins.
    The userid that properly loaded the java apps had only one plug-in.
    Java plug-in for cocoa 1.4.2_09
    The userid that didn't load the java apps had three plug-ins.
    Java 1.3.1 plug-in CFM
    Java 1.3.1 plug-in
    Java plug-in for cocoa 1.4.2_09"
    I find that I have the three plug-ins as well. Is that the same for you?
    PowerBookG4   Mac OS X (10.4.6)  

  • "UnsatisfiedLinkError:  make_statement" when run in debugger

    I have a problem retrieving a ResultSet from a REF CURSOR --
    apparently due to the JVM failing to locate requisite
    native code within Oracle.
    The problem is not in the code itself, but somewhere in the
    configuration / environment / debugger. I conclude this because
    the application runs perfectly outside the debugger (and
    has, for years).
    It fails only when the JVM attempts to locate a native method
    within Oracle, when running the application from an Eclipse debug
    launch configuration within the (newly acquired) Eclipse 3.0.1 debugger.
    I should mention that we also very recently upgraded to Oracle 9i.
    Therefore, I conclude the problem must be some kind
    of runtime classpath / library search path mis-resolution,
    or a java / oracle client code mis-match.
    But I cannot find the cause.
    WHAT I'VE ALREADY CHECKED / TRIED:
    (1) I have quadruple-checked the jar list within the 'Classpath'
    tab of the Eclipse's debug launch configuration dialog -- the
    classes12.jar, etc. are those we've been using successfully in
    the past.
    (2a) Rather than rely on the system Path variable, I resorted to
    explicitly specifying the -Djava.library.path as a VM option within
    the 'Arguments' tab of the same dialog, as well. The library search
    list specified within the Eclipse debug launch configuration is
    identical to the system Path variable used when the application
    is run outside the debugger. The behavior is the same regardless
    of whether -Djava.library.path is specified in the debugger, or not.
    (2b) I have modified the -Djava.library.path value specification
    with forward slashes rather than backslashes as file separators
    -- it made no difference. I also eliminated newlines -- it made
    no difference, either.
    RELEVANT ENVIRONMENT:
    WindowsXP
    WebLogic 6.1
    Oracle 9i (recent upgrade to this version; the Oracle server is installed)
    Eclipse 3.0.1
    OCI JDBC Driver
    THE CODE:
    theStatement.registerOutParameter (1, oracle.jdbc.driver.OracleTypes.CURSOR);
    if (inArgs != null)
    setInputFields ( theStatement, inArgs.iterator(), 2);
    theStatement.execute();
    // THROWS 'UnsatisfiedLinkError' FROM THIS LINE:
    theResultSet = (ResultSet) theStatement.getObject ( 1 );
    Enumeration returnItems = parseResults ( theResultSet );
    theStatement.close();
    THE ERROR THROWN:
    java.lang.UnsatisfiedLinkError: make_statement
    at oracle.jdbc.oci8.OCIDBAccess.make_statement (Native Method)
    at oracle.jdbc.oci8.OCIDBAccess.RefCursorBytesToDBStatement(OCIDBAccess.java:2373)
    at oracle.jdbc.driver.OracleStatement.getCursorValue(OracleStatement.java:3670)
    at oracle.jdbc.driver.OracleStatement.getObjectValue(OracleStatement.java:5792)
    at oracle.jdbc.driver.OracleStatement.getObjectValue(OracleStatement.java:5622)
    at oracle.jdbc.driver.OracleCallableStatement.getObject(OracleCallableStatement.java:698)
    at appA.common.ADBInterface.executeQuery(DBInterface.java:323)
    at appA.common.AEvent.initialize(AEvent.java:233)
    at appA.agent.mainDlg.main(AgentDlg.java:759)
    THE LIBRARY SEARCH PATH:
    (The same path is specified as the value for both as the system Path variable,
    and as the -Djava.library.path JVM argument.)
    -Djava.library.path="C:\oracle\ora92\bin;
    C:\oracle\ora92\jre\1.4.2\bin\client;
    C:\oracle\ora92\1.4.2\bin;
    C:\Program Failes\Oracle\jre\1.3.1\bin;
    C:\Program Files\Oracle\jre\1.1.8\bin;
    C:\Windows\system32;
    C:\Windows;
    C:\Windows\system32\wbem;
    C:\Program Files\appA\bin"
    ODD THING / CLUE?
    Strangely, if I simply move the 'C:\oracle\ora92\bin' directory later
    in the Library Search Path, the application continues to run
    fine outside of Eclipse, but from within Eclipse,
    the JVM now fails to locate the requisite ocijdbc9.dll and the
    application produces a different error:
    "java.lang.UnsatisfiedLinkError: no ocijdbc9 in java.library.path"
    The ocijdbc9.dll is present within C:\oracle\ora92\bin, so I would
    have expected the JVM to still be able to find it, despite simply
    moving the directory later in the search path.
    This must surely be telling me something I am simply too dense /
    distracted to pick up on.
    I cannot determine why the JVM fails to locate the make_statement
    native method when run from within the Eclipse debugging environment.
    Should I be looking at version changes to the classes12.jar attendant
    to the Oracle 9i upgrade?
    Any clues or help out there?
    ... KBaldwin

    Answering my own question:
    YES, it was correct to suspect a mis-match between the version of the Oracle jar files used to generate the class files and the Oracle .dll libraries.
    It turned out a buddy in the group changed the debugger configuration to use a special directory containing all the third-party jar files the app depends upon, for convenience. Unfortunately, he somehow picked up an old version of one of those jar files (classes12.zip) that came from some pre-Oracle 9i installation. Once I updated the directory to contain the Oracle 9i version of that jar file, the JVM was now able to locate the requisite code at run-time, and the debugger worked.
    Now the only mystery is why the hell the app ran fine outside the debugger, but I suspect the launch command is running a different application jar / class file set that was not built with the bogus old classes12.zip.

  • ORA_FFI problem in using JNI from C dll

    Hi,
    I am encountering a strange problem in ORA_FFI while calling a C dll.
    The C program uses JNI to dynamically load a jvm (using LoadLibrary('C:\\jdev1012\\jdk\\jre\\bin\\server\\jvm.dll'))and then call an
    instance object. The problem is when invoked at runtime it executes
    fine the first time but from the same session if its invoked again the
    JVM fails to initialize. It seems the JVM is not getting released though
    I am using DestroyJavaVM.
    I am using forms10g and could have used ORA_JAVA but i have some
    other C projects with which i am trying to integrate into one dll.
    I am really stuck and any experience on this will really be helpful.
    -Thanks,
    Samrat

    I suspect the "-d64" switch is interpreted by the java launcher to make it load a 64-bit JVM library rather than one of the the usual 32-bit JVM libraries. If so, you would need to load the same 64-bit JVM in your own program. Try looking in SDK source files java.c and java_md.c to get started.
    (I don't have HP-UX or any 64-bit system here, so this is just a best guess.)
    -slj-

  • Memory Allocation problem when using JNI

    For a Project we need to interface Labwindows-CVI/ Teststand with an application written in Java. we are using JNI. The code uses JNI_CreateJavaVM to start a JVM to run the Java interface code. The code did run for some time , but now ( without any obvious change nor on the CVI side neither on the Java side) JNI_CreateJavaVM fails with -4 error code, that means that the start of the JVM failed due to memory allocation failure. First investigation showed, that even if Windows Task Manager shows about 600M free physical memory, you can allocate in CVI only about 250M as a single block at the time we are calling  JNI_CreateJavaVM. That might be a little bit to less as we need to pass -Xmx192m to the JVM to run our code. Unfortunately just increasing the physical memory of that machine from 1.5G to 2G doesn't change anything. The free memory showed by Task Manager increases, but the allocatable memory block size does not. Are the any trick to optimize CVI/Teststand for that use case ?  Or maybe known problems with JNI ?
    Solved!
    Go to Solution.

    hi,
    have you tried other functions to allocate memory?
    the -Xmx command only sets the maximum heap size. You can try to use -Xms. This command sets the initial Java heap size. 

  • Frm-42431 Unable to Initialize Debugger

    Frm-42431 Unable to Initialize Debugger
    Please help...
    When I am trying to run a module thru the forms developer's debug push button
    this is the message I get....
    From the Forms help
    FRM-42431: Unable to initialize debugger.
    Cause:  An error occured while attempting to initialize debugger.
    This could be ca used by one of the following:
    1. The JVM failed to startup.
    2. The Classpath does not include the debugger dependencies.
    Srisankar.S

    Unable to debug
    http://forums.oracle.com/forums/thread.jspa;jsessionid=8d92200630dd01123d81135544ccaef4e9d8cd1484c5.e34Tb34Lb34PbO0Lb3eTahiPc30Qe0?messageID=155032&#155032

  • Why does my console NOT run as a storage node

    help!
    I created a minimal console script, for testing, to run as a storage node, with my own classes in the classpath.
    Unfortunately, it does not act as a storage node, even though I patterned it after the console script in the coherence/bin directory.
    The failure symptom is that my application, run on a non-storage-enabled jvm, fails with "storage is not configured."
    If instead of the console, I run as a storage node a jvm, with the same command line options, except with my own mainline that loops dumping the cache, the application in the other jvm works.
    The console does work as a client node, and is able to use my custom classes from the classpath. Hence it is participating in the cluster (the whole cluster runs on my PC).
    I assume there is something simple wrong here, but it escapes me.
    Thanks in advance
    Run Command
    /java/SDK_EE/jdk/bin/java
    -cp '/tmp/rvcinf-test/bin;../../../dist/rvcicache.jar;../../../lib/coherence.jar'
    -server -Xms256m -Xmx512m
    -Dtangosol.coherence.management=all -Dtangosol.coherence.management.remote=true
    -Dtangosol.coherence.distributed.localstorage=true -Dlogfile=logs/runsvrx-coherence.log
    com.tangosol.net.CacheFactory
    How the Working Java Storage Node is Run
    /java/SDK_EE/jdk/bin/java
    -cp '/tmp/rvcinf-test/bin;../../../dist/rvcicache.jar;../../../lib/coherence.jar'
    -server -Xms256m -Xmx512m
    -Dtangosol.coherence.management=all -Dtangosol.coherence.management.remote=true
    -Dtangosol.coherence.distributed.localstorage=true -Dlogfile=logs/runsvrx-coherence.log
    test.MainlineStorageNode
    Notes:
    My classes in:/tmp/rvcinf-test/bin and ../../../dist/rvcicache.jar
    Shown on multiple lines for readibility - was executed as one line (this is an output of bash after set -x)
    Coherence3.4.1/407
    Edited by: mesocyclone on Sep 18, 2009 11:10 PM

    Hi,
    The CacheFactory console does not automatically join all cache services. If you join the cache-service that your application is using from the console, e.g.:
    Map (?): cache foo
    2009-09-19 20:55:07.606/6.305 Oracle Coherence GE 3.6/480 <Info> (thread=main, member=1): Loaded cache configuration from "file:/Users/rhlee/work/coherence/env_configs/v2/coherence-cache-config.xml"
    2009-09-19 20:55:07.779/6.478 Oracle Coherence GE 3.6/480 <D5> (thread=DistributedCache, member=1): Service DistributedCache joined the cluster with senior service member 1
    ...it should work.
    thanks,
    -Rob

Maybe you are looking for

  • Where are the HP 2600n Drivers

    I have a new HP Color Laser 2600n printer. It is attached to a Airport Adapter. I added Bonjour to my Windows XP computer and it can see the printer and print to the printer. When I installed it via Bonjour, the install process asked for the driver C

  • Unwanted rubbish in a PDF file with Distiller 9

    I made a program to automacally generate a technical catalogue (I use ole automation to draw the drawing in Autodesk inventor, I export the drawing to PDF and insert it in an indesign document). Everything worked perfectly with Indesign CS1 and Acrob

  • What happened to custom labels in contacts???

    Prior to loading 4.0.2, I could differentiate between the phone numbers for a given contact by selecting Custom Label and creating a label by name. In this way, multiple mobile phone numbers for a single contact - perhaps a family - could be distingu

  • Referring to cell for  Custom Formuale in WEBI

    Hi, I have the data some thing like this Region     Rev APJ          10 EMEA       50 Now I want to create a custom formulae like I want to take 50% of APJ revenue and 20% of EMEA value . In excel the I can point to the APJ revenue cell that is  (100

  • Why am I forced to update my OS because the Cloud desktop is not backward compatible with OS X 10.6.8? [was: Why do you do this...]

    Why do you do this... My mac is old pro running Version 10.6.8 and now I cant up load the creative cloud desk top app without updating the OS. Why cant these apps be backward compatible? I am perfectly happy with V 10.6.8 and my old pro..