C++ and JVM Heap

Hi, just a short question. If I call a native method from Java which read a large file into memory, it consume the JVM heap or its own memory?
Thanks.

Can't say for sure where the problem is (though DO hope that it's some error in the code - otherwise i'd be in trouble - starting to write a code based on storing large data structures in native part), but two suggestions:
1) error is 'file i/o' specific, meaning that probably you are running out of some IO resources (which means that DLL is probably written incorrectly or some specific memory area of JVM is to be increases - see HotSpot tuning). I recall that you are getting the error during memory allocation error, but still...
2) .... probably smth else :) (just forgot what was the second one...)
Try this workaround: start up JVM from native code and read the file into JVM from that layer
eg, event based model:
// native code
main() {
*p = CreateJVM();
while (true) {
   if (p->doReadFile()) {
     file* f = readFile();
     p->setFileBytes(f->toByteArray());
   sleep();
// java code
void readFile() {
  setDoReadFile(true);
  while (!isDataReady())   wait(1000);
  byte[] arr = getFileBytes();
}This way you'd be sending data TO JVM, not reading it FROM JVM. I guess there might be other way to implement this kind of solution (still JVM driven, but with reading data not into memory allocated from JVM, but into the process the JVM itself was started from - by passing a pointer to this main process into Java and then into native method or smth like that, but don't know for sure how to do this).
I'll run appox. the same test (without reading data from the file but generating it from Java code) under Linux and let you know the results.

Similar Messages

  • Does bdb cache use JVM heap memory?

    I'm using BDB Java API. Do I need to set the heap size to be bigger than the db cache size?

    Hi Mimi,
    BDB cache size and JVM heap size are used for two different things. Cache size is used for storing the db data in modifying them in memory. If the cache size is not optimum then there would be too much of I/O activity and the performance would be affected.
    JVM heap size is used by the JVM to store the objects that the application creates. If the heap size is too small and there are too many objects get created by the application then the GC thread would be very active and will affect the performance of the application.
    Whether the heap size would be bigger than the cache size or not will depend upon how the application works.
    -Debsubhra Roy

  • JVM heap size limit under Windows

    Hi,
    I'm looking either for some help with a workaround, or
    confirmation that the information I've found is still the case for the
    current state of Java.
    Development machine is Win XP Pro, 2G RAM.
    Biggest heap I can allocate is about 1.6G, and that is not large enough for this
    app.
    I have a Swing application that
    1) must run on Win XP, 32 bit
    2) must implement an editor (similar to Excel but with fewer features) to handle large csv files
    ( up to about 800Mb).
    3) Strong preference for Java 5, though higher could conceivably be supported.
    Research so far tells me that this is the result of process memory limitations
    of Windows and the JVM, and that I might be able to squeeze a little more heap with
    Windows' rebase command, but probably not enough and I would start running the
    risk of conflicts with other applications on my users' systems. Ugh.
    Also I read of the Windows /3GB switch, but posts say that the JDK's available are not
    built to be able to use that feature. I havent had a chance to add memory to
    test that yet. However, I'm also under the impression that I should be able to
    allocate a heap larger than physical RAM ... except for that process size limit.
    So ... my information is basically that I'm stuck with a limit of about 1.6G for
    heap size, regardless of the RAM on my computer.
    Can anyone confirm whether that is still correct, preferably with a pointer to some
    official reference ?
    Or better yet, point me toward a workaround?
    Thanks!
    -tom

    >
    Some bookmarks I have on this topic.
    http://sinewalker.wordpress.com/2007/03/04/32-bit-windows-and-jvm-virtual-memory-limit/
    http://stackoverflow.com/questions/171205/java-maximum-memory-on-windows-xp
    The first link pulled together what I found in lots of bits and pieces elsewhere, nice to have a coherent summary :)
    The second link offered a bit of insight into the jvm that I hadn't seen yet .
    Thanks!

  • Can I get the reference to all objects in JVM Heap?

    Hello,
    Thanx in advance for reading (and replying) to this problem.
    I need to find an object whose reference I dont have.
    I feel the best place to search for is the JVM heap.
    If I get that JVM heap, and am able to get all the objects created, I can locate the particular object that I am looking for.
    Is there a way to od this????
    Any suggestions ????
    Vikas

    JVMTI will mostly help you in this case. But i recomend you to review you application design, because such services are unsafe and rather tricky.

  • Can you alter the JVM heap space size for all Windows users?

    Hi,
    I have used the "-Xmx" option to increase the Java Heap space for my Java application. This works fine, but all other users on my system still have the default heap space setting and I want them to have use an increased heap space as well. I cannot alter the JVM heap space at the command line since our Java application is started via an ActiveX bridge from a Windows application.
    So far I have found one potential, but not really good solution; I have figured out that I can copy the deployment.properties file containing the altered JVM heap setting from the "Application Data\Sun\Java\Deployment" folder in my own Windows "Documents and Settings" folder to the same folder of another user. However, this is not a really good solution since we are running a system with about 60 users and often new user accounts are created and sometimes people forget to copy the deployment.properties file.
    Does anyone know a better solution. I've tried to search the Windows registry or the JRE files for a default JVM heap space setting but I can't find it anywhere. Still on some systems the default is 64Mb and on others 96Mb, so I guess there must be a setting somewhere?

    The following is my eclipse.ini:
    -vmargs
    -Xms256m
    -Xmx512m
    -Dfuego.fstudio=true
    -DprodMode=preProduction
    -Dbea.home=C:\bea\albpm6.0\studio\..
    -Djava.endorsed.dirs=""
    -XX:PermSize=256M
    -XX:MaxNewSize=256M
    -XX:MaxPermSize=1024M
    but i think this configuration just effect the eclipse, not embed bpm engine. I also change the engine preference, increase the heap size, but engine crash as before.
    I want to change the jvm from jdk to jrockit, i hope any suggest.

  • Capturing the JVM heap usage information to a log

    When using weblogic 6.1sp3 the console under monitoring/performance a graph is
    displayed with the historical JVM heap usage information. Is there any way to
    capture this information to a log?

    For heap size before and after each gc, you could pass the -verbose:gc option to the JVM
    on startup:
    WLS C:\alex>java -verbose:gc weblogic.Admin PING 10 10
    [GC 512K->154K(1984K), 0.0068905 secs]
    [GC 666K->164K(1984K), 0.0069037 secs]
    [GC 676K->329K(1984K), 0.0029822 secs]
    [GC 841K->451K(1984K), 0.0038960 secs]
    [GC 963K->500K(1984K), 0.0015452 secs]
    [GC 1012K->598K(1984K), 0.0027509 secs]
    [GC 1110K->608K(1984K), 0.0029370 secs]
    [GC 1120K->754K(1984K), 0.0027361 secs]
    [GC 1266K->791K(1984K), 0.0019639 secs]
    [GC 1303K->869K(1984K), 0.0028314 secs]
    [GC 1381K->859K(1984K), 0.0012957 secs]
    [GC 1367K->867K(1984K), 0.0012504 secs]
    [GC 1379K->879K(1984K), 0.0018592 secs]
    [GC 1391K->941K(1984K), 0.0036871 secs]
    [GC 1453K->988K(1984K), 0.0027143 secs]
    Sending 10 pings of 10 bytes.
    RTT = ~47 milliseconds, or ~4 milliseconds/packet
    Looks like it might be too much info though...
    Cheerio,
    -alex
    Fazle Khan wrote:
    When using weblogic 6.1sp3 the console under monitoring/performance a graph is
    displayed with the historical JVM heap usage information. Is there any way to
    capture this information to a log?

  • Can off JVM heap Memory used in the Near-Cache front-tier

    I had tried to config a near-Cache used nio-manager(off JVM heap) in the Front-tier.
    <near-scheme>
          <scheme-name>CohApp-near</scheme-name>
          <front-scheme>
            <external-scheme>
            </external-scheme>
          </front-scheme>
          <back-scheme>
            <distributed-scheme>
              <scheme-ref>CohApp-distributed</scheme-ref>
            </distributed-scheme>
          </back-scheme>
          <invalidation-strategy>auto</invalidation-strategy>
          <autostart>true</autostart>
        </near-scheme>
    when start 'com.tangosol.net.DefaultCacheServer' for this config, error as:
    Oracle Coherence Version 3.7.1.0 Build 27797
    Enterprise Edition: Development mode
    Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
    2014-03-30 16:34:17.518/1.201 Oracle Coherence EE 3.7.1.0 <Error> (thread=main,
    member=n/a): Error org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invali
    d content was found starting with element 'external-scheme'. One of '{"http://xm
    lns.oracle.com/coherence/coherence-cache-config":local-scheme, "http://xmlns.ora
    cle.com/coherence/coherence-cache-config":class-scheme}' is expected. - line 92
    Exception in thread "main" (Wrapped: Failed to load the factory) (Wrapped: Missi
    ng or inaccessible constructor "com.tangosol.net.DefaultConfigurableCacheFactory
    (String)"
    <configurable-cache-factory-config>
      <class-name>com.tangosol.net.DefaultConfigurableCacheFactory</class-name>
      <init-params>
        <init-param>
          <param-type>java.lang.String</param-type>
          <param-value>coherence-cache-config.xml</param-value>
        </init-param>
      </init-params>
    </configurable-cache-factory-config>) java.lang.reflect.InvocationTargetExceptio
    n
            at com.tangosol.util.Base.ensureRuntimeException(Base.java:288)
            at com.tangosol.net.ScopedCacheFactoryBuilder.getDefaultFactory(ScopedCa
    cheFactoryBuilder.java:311)
            at com.tangosol.net.DefaultCacheFactoryBuilder.getSingletonFactory(Defau
    ltCacheFactoryBuilder.java:48)
            at com.tangosol.net.DefaultCacheFactoryBuilder.getFactory(DefaultCacheFa
    ctoryBuilder.java:121)
            at com.tangosol.net.ScopedCacheFactoryBuilder.getConfigurableCacheFactor
    y(ScopedCacheFactoryBuilder.java:112)
            at com.tangosol.net.CacheFactory.getConfigurableCacheFactory(CacheFactor
    y.java:126)
            at com.tangosol.net.DefaultCacheServer.getDefaultConfigurableCacheFactor
    y(DefaultCacheServer.java:364)
            at com.tangosol.net.DefaultCacheServer.main(DefaultCacheServer.java:197)
    Caused by: (Wrapped: Missing or inaccessible constructor "com.tangosol.net.Defau
    ltConfigurableCacheFactory(String)"
    <configurable-cache-factory-config>
      <class-name>com.tangosol.net.DefaultConfigurableCacheFactory</class-name>
      <init-params>
        <init-param>
          <param-type>java.lang.String</param-type>
          <param-value>coherence-cache-config.xml</param-value>
        </init-param>
      </init-params>
    </configurable-cache-factory-config>) java.lang.reflect.InvocationTargetExceptio
    n
            at com.tangosol.util.Base.ensureRuntimeException(Base.java:288)
            at com.tangosol.run.xml.XmlHelper.createInstance(XmlHelper.java:2652)
            at com.tangosol.run.xml.XmlHelper.createInstance(XmlHelper.java:2536)
            at com.tangosol.net.ScopedCacheFactoryBuilder.getDefaultFactory(ScopedCa
    cheFactoryBuilder.java:273)
            ... 6 more
    Caused by: java.lang.reflect.InvocationTargetException
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
    orAccessorImpl.java:39)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
    onstructorAccessorImpl.java:27)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
            at com.tangosol.util.ClassHelper.newInstance(ClassHelper.java:694)
            at com.tangosol.run.xml.XmlHelper.createInstance(XmlHelper.java:2611)
            ... 8 more
    Caused by: (Wrapped: Failed to load cache configuration: coherence-cache-config.
    xml) (Wrapped) java.io.IOException: Exception occurred during schema validation:
    cvc-complex-type.2.4.a: Invalid content was found starting with element 'externa
    l-scheme'. One of '{"http://xmlns.oracle.com/coherence/coherence-cache-config":l
    ocal-scheme, "http://xmlns.oracle.com/coherence/coherence-cache-config":class-sc
    heme}' is expected.
            at com.tangosol.util.Base.ensureRuntimeException(Base.java:288)
            at com.tangosol.run.xml.XmlHelper.loadResourceInternal(XmlHelper.java:34
    1)
            at com.tangosol.run.xml.XmlHelper.loadFileOrResource(XmlHelper.java:283)
            at com.tangosol.net.DefaultConfigurableCacheFactory.loadConfig(DefaultCo
    nfigurableCacheFactory.java:439)
            at com.tangosol.net.DefaultConfigurableCacheFactory.loadConfig(DefaultCo
    nfigurableCacheFactory.java:425)
            at com.tangosol.net.DefaultConfigurableCacheFactory.<init>(DefaultConfig
    urableCacheFactory.java:155)
            ... 14 more
    Caused by: (Wrapped) java.io.IOException: Exception occurred during schema valid
    ation:
    cvc-complex-type.2.4.a: Invalid content was found starting with element 'externa
    l-scheme'. One of '{"http://xmlns.oracle.com/coherence/coherence-cache-config":l
    ocal-scheme, "http://xmlns.oracle.com/coherence/coherence-cache-config":class-sc
    heme}' is expected.
            at com.tangosol.run.xml.XmlHelper.loadXml(XmlHelper.java:122)
            at com.tangosol.run.xml.XmlHelper.loadXml(XmlHelper.java:157)
            at com.tangosol.run.xml.XmlHelper.loadResourceInternal(XmlHelper.java:32
    2)
            ... 18 more
    Caused by: java.io.IOException: Exception occurred during schema validation:
    cvc-complex-type.2.4.a: Invalid content was found starting with element 'externa
    l-scheme'. One of '{"http://xmlns.oracle.com/coherence/coherence-cache-config":l
    ocal-scheme, "http://xmlns.oracle.com/coherence/coherence-cache-config":class-sc
    heme}' is expected.
            at com.tangosol.run.xml.SimpleParser.parseXml(SimpleParser.java:212)
            at com.tangosol.run.xml.SimpleParser.parseXml(SimpleParser.java:93)
            at com.tangosol.run.xml.SimpleParser.parseXml(SimpleParser.java:162)
            at com.tangosol.run.xml.SimpleParser.parseXml(SimpleParser.java:115)
            at com.tangosol.run.xml.XmlHelper.loadXml(XmlHelper.java:118)
            ... 20 more
    Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid conten
    t was found starting with element 'external-scheme'. One of '{"http://xmlns.orac
    le.com/coherence/coherence-cache-config":local-scheme, "http://xmlns.oracle.com/
    coherence/coherence-cache-config":class-scheme}' is expected.
            at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAX
    ParseException(ErrorHandlerWrapper.java:195)
            at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Err
    orHandlerWrapper.java:131)
            at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(
    XMLErrorReporter.java:384)
            at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(
    XMLErrorReporter.java:318)
            at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErro
    rReporter.reportError(XMLSchemaValidator.java:417)
            at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportS
    chemaError(XMLSchemaValidator.java:3182)
            at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleS
    tartElement(XMLSchemaValidator.java:1806)
            at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startEl
    ement(XMLSchemaValidator.java:705)
            at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scan
    StartElement(XMLNSDocumentScannerImpl.java:400)
            at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
    l$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2756)
            at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(X
    MLDocumentScannerImpl.java:648)
            at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next
    (XMLNSDocumentScannerImpl.java:140)
            at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
    l.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
            at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(X
    ML11Configuration.java:808)
            at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(X
    ML11Configuration.java:737)
            at com.sun.org.apache.xerces.internal.jaxp.validation.StreamValidatorHel
    per.validate(StreamValidatorHelper.java:144)
            at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.vali
    date(ValidatorImpl.java:111)
            at javax.xml.validation.Validator.validate(Validator.java:127)
            at com.tangosol.run.xml.SaxParser.validateXsd(SaxParser.java:236)
            at com.tangosol.run.xml.SimpleParser.parseXml(SimpleParser.java:206)
    So I think that if can off JVM heap Memory used in the Near-Cache front-tier?
    Or can help how to config the  off JVM heap Memory used in the Near-Cache front-tier.
    Thanks.

    Only local-scheme and class-scheme can be used in the front-scheme of a near cache. 

  • JVM heap parameter setting...

    hi body
    we have two HP machine. and each machine hardware configration is :  8  CPU  and  40G memory
    software environment:
    1. system sofeware :  HP-UX 11.31  64bit
    2. NetWeaver 7.0 (2004s)
    3. HP JDK 1.4.2 64bit
    in machine one, also host one ,  the  Message Server(SCS)  | Central Instance and Oracle DB instance  installed.
    the DI (Dialog Instance)  installed in second host alone.  and it  contain two server node .
    what is the best  configuration about JVM heap and GC parameters for each host(CI adn DI)
    please help

    The best configuration depends not only on your hardware, but also on the number of users and the way the system is being used.
    For parameter recommendations of JVM, please check note 723909 - Java VM settings for J2EE 6.40/7.0
    Kind regards,
    Mark

  • "Incompatiable initial and maximum heap sizes specified" error

    Hi,
    Using the command below:
    java -jar -Xms128m myjar.jar
    I get the following errors:
    "Error occurred during initialization of VM"
    "Incompatiable initial and maximum heap sizes specified"
    but if I take off the initial heap size parameter, just run:
    java -jar myjar.jar
    it works fine apart from that the heap size is not desired.
    Can anyone please tell me what's the cause of the problem here? I'm suspecting the JVM has been configured to restrict manual adjustment of heap sizes...
    Many thanks.

    Hi,
    Using the command below:
    java -jar -Xms128m myjar.jar
    I get the following errors:
    "Error occurred during initialization of VM"
    "Incompatiable initial and maximum heap sizes
    specified"
    but if I take off the initial heap size parameter,
    just run:
    java -jar myjar.jar
    it works fine apart from that the heap size is not
    desired.
    Can anyone please tell me what's the cause of the
    problem here? I'm suspecting the JVM has been
    configured to restrict manual adjustment of heap
    sizes...
    Many thanks.It turns out that I need to also specify the maximum heap size as well. Thanks.

  • How to increase JVM Heap Size

    Hi all,
    Our Environment
    ===============
    OS - Windows XP Service Pack 3
    Oracle Developer Suite - 10.1.2.3.0
    Oracle Forms & Reports Service 10.1.2.3.0
    Oracle Database 10.2.0.1.0
    JDK 1.5
    Jinitiator 1.3.1.30
    Apache POI 3.5
    From forms we are writing to excel files after copying XL template using Apache POI 3.5 and JDK 1.5. This XL template file has got lot of macros.
    We have imported the Java class files into form as pl/sql library. We are able to write upto 7Mb size of XL file. Beyond that size it comes with the error Ora-105101.
    We tried to increase the JVM Heap Size to 640M by setting values -Xmx640M everywhere in OC4J_BI_FORMS/Server Properties/Java Options, Home/Server Properties/Java Options through Enterprise Manager console. Also manually set the values in OPMN.XML and reloaded the same. Also set -Xmx640M in Jinitiator 1.3.1.30 Java Runtime Parameters. Also set in Java console. All settings have no effect.
    We have written a small program to display the run time memory from forms, which displays only maximum memory 63M all the time.
    PACKAGE BODY HeapSize IS
    -- DO NOT EDIT THIS FILE - it is machine generated!
    args JNI.ARGLIST;
    -- Constructor for signature ()V
    FUNCTION new RETURN ORA_JAVA.JOBJECT IS
    BEGIN
    args := NULL;
    RETURN (JNI.NEW_OBJECT('HeapSize', '()V', args));
    END;
    -- Method: getTotalMemory ()D
    FUNCTION getTotalMemory(
    obj ORA_JAVA.JOBJECT) RETURN NUMBER IS
    BEGIN
    args := NULL;
    RETURN JNI.CALL_DOUBLE_METHOD(FALSE, obj, 'HeapSize', 'getTotalMemory', '()D', args);
    END;
    -- Method: getMaxMemory ()D
    FUNCTION getMaxMemory(
    obj ORA_JAVA.JOBJECT) RETURN NUMBER IS
    BEGIN
    args := NULL;
    RETURN JNI.CALL_DOUBLE_METHOD(FALSE, obj, 'HeapSize', 'getMaxMemory', '()D', args);
    END;
    BEGIN
    NULL;
    END;
    declare
    obj ORA_JAVA.JOBJECT;
    BEGIN
    obj:=HeapSize.new;
    message('Total memory '||HeapSize.getTotalMemory(obj));
    message('Max memory '||HeapSize.getMaxMemory(obj));
    END;
    Below procedure is for writing to Excel file.
    ============================================
    PACKAGE BODY UWWriteExcel IS
    -- DO NOT EDIT THIS FILE - it is machine generated!
    args JNI.ARGLIST;
    -- Constructor for signature ()V
    FUNCTION new RETURN ORA_JAVA.JOBJECT IS
    BEGIN
    args := NULL;
    RETURN (JNI.NEW_OBJECT('UWWriteExcel', '()V', args));
    END;
    -- Method: copyExcel (Ljava/lang/String;Ljava/lang/String;)V
    PROCEDURE copyExcel(
    obj ORA_JAVA.JOBJECT,
    a0 VARCHAR2,
    a1 VARCHAR2) IS
    BEGIN
    args := JNI.CREATE_ARG_LIST(2);
    JNI.ADD_STRING_ARG(args, a0);
    JNI.ADD_STRING_ARG(args, a1);
    JNI.CALL_VOID_METHOD(FALSE, obj, 'UWWriteExcel', 'copyExcel', '(Ljava/lang/String;Ljava/lang/String;)V', args);
    END;
    -- Method: getSpreadSheetPara (Ljava/lang/String;)V
    PROCEDURE getSpreadSheetPara(
    obj ORA_JAVA.JOBJECT,
    a0 VARCHAR2) IS
    BEGIN
    args := JNI.CREATE_ARG_LIST(1);
    JNI.ADD_STRING_ARG(args, a0);
    JNI.CALL_VOID_METHOD(FALSE, obj, 'UWWriteExcel', 'getSpreadSheetPara', '(Ljava/lang/String;)V', args);
    END;
    -- Method: openSheet (I)V
    PROCEDURE openSheet(
    obj ORA_JAVA.JOBJECT,
    a0 NUMBER) IS
    BEGIN
    args := JNI.CREATE_ARG_LIST(1);
    JNI.ADD_INT_ARG(args, a0);
    JNI.CALL_VOID_METHOD(FALSE, obj, 'UWWriteExcel', 'openSheet', '(I)V', args);
    END;
    -- Method: getCellValues (IID)V
    PROCEDURE getCellValues(
    obj ORA_JAVA.JOBJECT,
    a0 NUMBER,
    a1 NUMBER,
    a2 NUMBER) IS
    BEGIN
    args := JNI.CREATE_ARG_LIST(3);
    JNI.ADD_INT_ARG(args, a0);
    JNI.ADD_INT_ARG(args, a1);
    JNI.ADD_DOUBLE_ARG(args, a2);
    JNI.CALL_VOID_METHOD(FALSE, obj, 'UWWriteExcel', 'getCellValues', '(IID)V', args);
    END;
    -- Method: getCellValues (IILjava/lang/String;)V
    PROCEDURE getCellValues(
    obj ORA_JAVA.JOBJECT,
    a0 NUMBER,
    a1 NUMBER,
    a2 VARCHAR2) IS
    BEGIN
    args := JNI.CREATE_ARG_LIST(3);
    JNI.ADD_INT_ARG(args, a0);
    JNI.ADD_INT_ARG(args, a1);
    JNI.ADD_STRING_ARG(args, a2);
    JNI.CALL_VOID_METHOD(FALSE, obj, 'UWWriteExcel', 'getCellValues', '(IILjava/lang/String;)V', args);
    END;
    -- Method: exportExcel ()V
    PROCEDURE exportExcel(
    obj ORA_JAVA.JOBJECT) IS
    BEGIN
    args := NULL;
    JNI.CALL_VOID_METHOD(FALSE, obj, 'UWWriteExcel', 'exportExcel', '()V', args);
    END;
    -- Method: copy (Ljava/lang/String;Ljava/lang/String;)V
    PROCEDURE copy(
    a0 VARCHAR2,
    a1 VARCHAR2) IS
    BEGIN
    args := JNI.CREATE_ARG_LIST(2);
    JNI.ADD_STRING_ARG(args, a0);
    JNI.ADD_STRING_ARG(args, a1);
    JNI.CALL_VOID_METHOD(TRUE, NULL, 'UWWriteExcel', 'copy', '(Ljava/lang/String;Ljava/lang/String;)V', args);
    END;
    BEGIN
    NULL;
    END;
    declare
    obj ORA_JAVA.JOBJECT;
    BEGIN
    message('-1');pause;
    obj:=UWWriteExcel.new;
    message('0');pause;
    UWWriteExcel.copyExcel(obj,'C:\\excel\\CAT2009WS.XLS','C:\\excel\\CAT2009WS.XLS');
    message('1');pause;
    UWWriteExcel.openSheet(obj,0);
    message('2');pause;
    UWWriteExcel.getCellValues(obj,6,2,900);
    message('3');pause;
    UWWriteExcel.getCellValues(obj,7,2,911);
    message('4');pause;
    UWWriteExcel.exportExcel(obj);
    END;
    When the size of XL is more than 7Mb, after message(0) it will be display oracle error.
    From command prompt if we run the same java class file by passing -Xmx256m parameter we are able to write to big XL file.
    Can anyone tell me where I am wrong... Can we increase the JVM Heap Size from forms...

    I have a simular problem.
    Via Forms I call a Java class (import Java class -> PL/SQL class java method).
    For this specific process I need to set the Xmx java option...
    How do I do this ?
    Changing the java option for the Forms-OC4J in the EM doesn't help.
    Is there an other level where I can modify this ?
    Does the java process of the forms is the single process that exists ? How does he handles such java calls?
    Are that separed java processes ? threads ? ....
    Thanks !!!

  • JVM Heap size settings

    I am unbale to find the JVM heap settings.Could you please me where the heap size was defined?

    886340 wrote:
    With reference to Java WebStart.
    sigh
    - I open google
    - I type in "java webstart set heap". Click search
    - first hit: the webstart faq
    http://download.oracle.com/javase/1,5.0/docs/guide/javaws/developersguide/faq.html
    - I search for "heap" using the browser search function
    - I feel superior for finding the answer that quickly and easily
    It makes me sad when people don't want to help themselves to live an easier and more rewarding development life. All it takes is the will to learn how to find information yourself :(

  • Unified CCX Engine JVM Heap counter monitoring

    Greetings!
      I'm looking for solution how I can monitor Unified CCX Engine JVM Heap counter from external system.
    Description for the object in RTMT:
    Object: Unified CCX Engine JVM Heap
    Counter: PercentageMemoryUsedAfterGC
    Desc: This represents the percentage of heap memory that is used by the application after the last full Garbage Collection cycle.
    At the moment I see the only one solution which is to get the value via SNMP. But I couldn't find the OID for this counter. Can anyone tell me where I can find it or suggest another solution ?
    Thanks in advance for your answers.

    AMOR is a new one for me, and I like it!
    I have not tried to access this API from UCCX, however, it's just another VOS API which should be the same on all VOS platforms.  An attempt to query the UCCX server for its PerfMon WSDL, does not return one, so perhaps it doesn't.  It did work on my CUCM.
    https://ServerName:8443/perfmonservice2/services/PerfmonService?wsdl

  • Increase JVM heap size when calling it from C++

    I have a program that loads images and only works properly increasing heap.
    java McVImg
    gives me an Out of memory error.
    java -Xmx120M McVImg
    works fine.
    If I want to call JVM from a C++ program using Java native interface,
    How should I increase JVM heap ?
    Thanks in advance. Ignasi Villagrasa.

    I'm trying to do what you told me and it doesn't work.
    I show the C++ code I'm using:
    void JavaParam::LoadJVM()
         JavaVMInitArgs vm_args;
         JavaVMOption options[2];
    jint res;
         vm_args.version = JNI_VERSION_1_2;
    JNI_GetDefaultJavaVMInitArgs(&vm_args);
         if (res < 0)
    fprintf(stderr, " Requested version is not supported\n");
              fputs ("Requested version is not supported\n",traza);
              fflush(traza);
    exit(-1);
         //Establecemos classpath
         //Atencion el classpath ser� el jar
         //options[0].optionString = "-Djava.class.path=..";
         options[0].optionString = "-Djava.class.path=..\\mcjava.jar";
         options[1].optionString = "-Xmx120M";
         //Nuevos argumentos
    vm_args.options=options;
         vm_args.nOptions = 2;
         vm_args.ignoreUnrecognized = JNI_FALSE;
         //Creamos Maquina Virtual Java
    res = JNI_CreateJavaVM(&jvm,(void **)&env,&vm_args);
    if (res < 0)
    fprintf(stderr, "Can't create Java VM: %d\n",(int)res);
              fprintf(traza, "Can't create Java VM RES: %d \n",(int)res);
              fflush(traza);
    exit(1);
         jvm_creada = 1;
    Is that right ?
    Thanks in advance. Ignasi Villagrasa.

  • Jvm heap dump options

    We have a memory leak occurring on our appserver (glassfish) and are having trouble pinpointing its cause, so I want to turn on some of the JVM heap dump options. I have turned on the following two:
    -XX:-HeapDumpOnOutOfMemoryError
    -XX:HeapDumpPath=/heap_dump.hprofAre there any other options I can use to help resolve this? Also what will the dump output contain? Plain-text?
    Thanks

    a profiler comes to mind. But how do you know it is an actual memory leak? Are you getting out of memory exceptions?

  • How to set JVM heap?

    Hi,
    I don't know where to set the JVM heap...can anybody give me step by step to set the JVM heap..

    What do you mean by set the heap? Set its size?Yes, what I mean is heap size. I got the problem java.lang.outOfmemory, and try ind the solution. Some of solution said set the heap size but it didn't explain in more detail.
    Look at the arguments to java. (I mean "java" as in
    "java.exe", the JVM executable.)What u mean look at the arguments to java?

Maybe you are looking for

  • War file created in Eclipse works, but fails when created by Ant

    Hi, I am having trouble getting my flex war file to work when I create it using Ant, even though the same war works fine when I create it from my Eclipse Export War function. This is a critical problem and any ideas or suggestions would be greatly ap

  • Premiere freezes when trying to add media to the timeline.

    Dxdiag: I start up Premiere. I import a file via File > Import... I drag the file but it doesn't move and causes the program to freeze. I have updated all my drivers already and this has been going on for the past 6 months but now I need the program

  • Storage area for GUI status Z_FI_UPLOAD_FIDOC 100 too small

    Hi, I have created a program for uploading and posting open items aso. I've gathered items in an internal tables and tried to display on ALV list with tree for correct and incorrect items. When table contains more than 1000 items ( not all in one doc

  • Need help--drop tablespace

    all, I need to drop a tablespace but got the error from oracle: ORA-00604: error occurred at recursive SQL level 1 ORA-00376: file 3 cannot be read at this time ORA-01110: data file 3: 'C:\ORACLE\ORADATA\LOCALRED\UNDOTBS02.DBF'

  • Hovering over button in WAD

    Hi experts, Is there any feature in WAD of hovering over button (Buttons have a "hover stateu201D property) so that if put mouse cursor they are highlighted the additional information over button. thanks take care vishal sharma