"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.

Similar Messages

  • Incompatible initial and maximum heap sizes specified

    At first my program was crashing, saying;
    java.lang.OutOfMemoryError: Java heap space
    So I added this vm argument: -Xms128M
    Now, i get this message:
    Incompatible initial and maximum heap sizes specified
    What do I do?

    At first my program was crashing, saying;
    java.lang.OutOfMemoryError: Java heap space
    So I added this vm argument: -Xms128M
    Now, i get this message:
    Incompatible initial and maximum heap sizes
    specified
    What do I do?Specify a maximum heap size (-Xmx) as well (and make that be greater than or equal to the minimum size).

  • The initial heap size must be less than or equal to the maximum heap size.

    All,
    Please help!!
    I have tested my Application Client Project in WSAD on my pc and it works fine.
    I have 1gb RAM on my pc. When I deploy the same app on another xp pc(same as mine but 512mb RAM) I get a heap size error. Here is the exact error:
    Incompatible initial and maximum heap sizes specified:
    initial size: 268435456 bytes, maximum heap size: 267380736 bytes
    The initial heap size must be less than or equal to the maximum heap size.
    The default initial and maximum heap sizes are 4194304 and 267380736 bytes.
    Usage: java [-options] class [args...]
    (to execute a class)
    or java -jar [-options] jarfile [args...]
    (to execute a jar file)
    where options include:
    -cp -classpath <directories and zip/jar files separated by ;>
    set search path for application classes and resources
    -D<name>=<value>
    set a system property
    -verbose[:class|gc|jni]
    enable verbose output
    -version print product version
    -showversion print product version and continue
    -? -help print this help message
    -X print help on non-standard options
    Could not create the Java virtual machine.
    Press any key to continue . . .
    Here is the batch file that runs my app:
    @echo off
    SET appClientEar=C:\corp\apps\mts\jars\MTSClientEAR.ear
    set JVM_ARGS=-Xms256M -Xmx256M
    set CLIENT_PROPS=C:\corp\apps\mts\jars\medicalclient.properties
    set APP_ARGS=
    call C:\bnsf\IBM\WebSphere\AppClient\bin\launchClientBNSF.bat "%JVM_ARGS%" %appClientEar% "-CCpropfile=%CLIENT_PROPS%" %APP_ARGS%
    @pause
    I have changed the value of Xms and Xmx of JVM_ARGS to different size but I sitll get error. Anyone knows what the problem is. Thanks..

    Don't know why, but the "maximum heap size: 267380736 bytes" value is just slightly less than 256*1024*1024, wheras the reported initial size is equal to that.
    Try setting the initial value to 255MB.

  • Customizing Paging File: what is the recommended initial and maximum size?

    Hi everyone, and Harm,
    Following Harm's response to my question about how to setup disks, Harm said this:
    "disk allocation: It is a three stage process, first you define the boot order in the BIOS, then you format the disks inWindows and allocate drive letters, then still in Windows you setup the pagefile. Then the allocation of media cache, preview, project etc. is done in the preferences and project setup of PR."
    and I have a question about paging file.
    First let me say describe my new machine, it has a 4 disc setup, no RAID, 16GB RAM, with OCZ-Vertex3 for OS & Programs, i.e. i have installed Windows 7 Ultimate 64bit on this disc, and Web Premium CS5 and Acrobat Pro 9. In BIOS, i have made the OCZ (OS) disk, be the priority in the Boot order.
    Later, after verifying the system is in working order, i will upgrade to Classic Collection CS5.5, so at this point, i have named my 3 additional disks as such,
    WDC WD 2002FAEX-007BA0 - "Media Projects(D)"
    WDC WD 1002FAEX-00Y9A0 - "Pagefile, Media Cache (E)"
    WDC WD 1002FAEX-00Y9A0 - "Previews, Exports(F)"
    So, for now these are simply names, which i have given to the various disks, and now i am changing the paging file, switching it from happening in the OS disk, in order to happen inthe disk which (via Premier, later) will be designated for Media Cache.
    So, in Windows Performance Options pane, I went to Advanced tab, & under Virtual memory I hit "change", uncheck Automatically manage paging file size for all drives, select drive E, which is the disk that's to have the paging file happen in it.
    And the question, assuming that i am supposed to select Custom size, can you Harm, or/and others, please recommend the Initial and Maximum sizes?
    Or, should i select "System managed size"?
    Thanks:)

    http://lifehacker.com/5426041/understanding-the-windows-pagefile-and-why-you-shouldnt-disa ble-it
    Keep in mind Video/Animation applications use more ram now than almost any other type and there are far more memory hungry services running in the background as well. Consider the normal recommendations are for standard applications. HD material changed far more than just the need for 64Bit memory addressing.
    Eric
    ADK

  • Maximum heap size of JVM

    hi,
    I need to set the maximum heap size of the JVM. I know that I can do
    it for a single run by saying:
    java -Xmx75M example.class
    But how do I make the JVM use this maximum heap size for all its
    runs, without specifying '-Xmx75M' in every run.
    I need this because I am using my system as a server for JSP web
    site. For that site if a very simple query is given such as 'a' in title, as many as 6000
    records as retrieved from my Filemaker Databases and the java
    ResultSet object is not able to handle those records. The system is
    then throwing an exception and error message 'Host not found' is
    sent back to the client's browser. As far as I know, Filemaker does
    not support 'LIMIT' keyword in queries.
    So please tell me how can I rectify that problem.
    Thanks in advance,
    niranjan maturi

    hi,
    I tried setting TOMCAT_OPTS. The maximum I could go in my system is 1300M
    i.e. set TOMCAT_OPTS="-DXmx=1300m".
    Still I am having the problem that when some 5000 records are fetched from the database, the ResultSet object is not able to handle them. It is able to handle upto 2000 records. I am using windows2000, jdk1.3.2 and Filemaker Pro 5.0 databases.
    I tried to set the maximum number of records that can be retrieved to 2000 so that the problem will be solved. But I am not able to set that as well. I did:
    Class.forName("com.fmi.jdbc.JdbcDriver").newInstance();
    Connection con = DriverManager.getConnection("standard statement");
    PreparedStatement pstmt = con.prepareStatement("select id, pubyear, Checkedoutby, >>callnumber from mprrc_materials");
    pstmt.setFetchSize(2000);
    ResultSet rs3 = pstmt.executeQuery();Its giving the error:
    java.lang.AbstractMethodError at that setFetchSize() statement.
    I guess the JDBC driver provided by Filemaker Pro does not support that. So what can be done to solve the problem.
    Thanks,
    Niranjan Maturi

  • Maximum heap size for 64bit JVM

    Hi,
    I am trying to set the maximum heap size for a java process in a 64bit JVM . I am not able to set more then 3G
    command line config:
    java -Xms64m -Xmx3g -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=8000 com.superpages.puboptions.CampaignFeedStarter >> publisher.out 2>&1 &
    Hardware / software configs
    *$uname -a*
    SunOS labsbear 5.9 Generic_122300-19 sun4u sparc SUNW,Sun-Fire-V440
    *16GB total physical memory*
    *4 processor machine*
    *64 bit JVM*
    JDK1.6
    where is this limitation coming from. How to set the heap size to 6g.
    Thanks for your time
    Meena

    You need to use the -d64 switch to request the 64-bit JVM. E.g.,$ java -showversion -Xmx6g HelloWorld
    Invalid maximum heap size: -Xmx6g
    The specified size exceeds the maximum representable size.
    Could not create the Java virtual machine.
    $ java -showversion -d64 -Xmx6g HelloWorld
    java version "1.6.0_07"
    Java(TM) SE Runtime Environment (build 1.6.0_07-b04)
    Java HotSpot(TM) 64-Bit Server VM (build 10.0-b23, mixed mode)
    Hello world!

  • Rounding Value,Minimum Lot Size and Maximum Lot Siz parameters

    Hello Gurus,
           Please explain me the what is the use of the parameter Rounding Value
    ,Minimum Lot Size and Maximum Lot Size parameters in the product master and how does it in impact during the Heuristic Run?
    Thanks.

    Rounding value is the incremental quantities in which the order can be produced/procured. Eg. if orders are possible with quantities 40,60, 80, 100 etc..then rounding value is 20.
    Min lot size is the minimum quanity in which order can be produced eg. 40 in above example
    Max lot size is the maximum quanitity in which the order can be produced/procured. eg. 100 in our example
    Impact on Heuristic run: heuristics takes all the above parameter to plan supply order. eg. if requirement is 55, it will supply plan for 60. If requirement is 120, it will produce two orders - one for 100 and the other for 20. if the reuqirement is 10, the order size will be 40.
    Hope this helps.

  • How to set the maximum heap size on a deployed application?

    I�m running a fairly large java application and am getting java.lang.OutOfMemoryError. I could increase the heap size in my development environment to eliminate this error. However, I don�t know how to set this in a deployed application. We are currently using ant to build our software.
    Another question, when I execute a statement such as java �Xmx512M �cp app.jar. Is it correct to say that the application in app.jar will use to a maximum of 512MB of memory when running?
    Thank you everyone for your help!

    But first, when you say "a deployed environment" do you mean an executable .jar file? This is what I'm using.The term "deploy" is commonly used to refer to deploying an ear file or a war file on an application server.
    I would assume that there is some entry you can include in the .jar's
    Manifest.mf file to specify the maximum memory, but I can't find an example of the entry. <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6197671"></a>

  • Upto how much I can set maximum Heap size for jvm?

    I am running application on 8GB RAM Windows 64 bits machine.
    I am running out of OutOfMemory (Heap Space). I want to increase the Heap Size for my jvm.
    But can anybody please tell me what is the limit by which I can set the maximum size for heap?
    Thanks in Advance,
    Jenish

    Max allowed memory per process is 2 raised to the 64th power. What maximum memory you can set depends on the memory available
    for your application. You may be able to set more than 8GB ram then it will use the swap space and it will slow down your application
    performance. So try different memory size and see which one works best for your application.

  • Heap size memory error on WebI Reports

    Hello,
    I'm developping my own JDBC driver to report specific data in Business Objects. I've actually an universe build on this driver and a web intelligence report. When I try to request I've an heap size error due to the size of my jvm. My JBDC driver is deployed thanks to a jar file. Normally I can increase jvm size with the argument -Xmx256M in command-line.
    I tried several things :
    I modified register HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/Session Manager/Subsystems, SharedSection to 1024,3072,1024
    I passed Tomcat's memory to 1024, I can't more because I'm on 32 bits on Windows Server 2003.
    I tried to add MAX_HEAP_SIZE=1024000000 on webi.properties in c:\programfiles\Tomcat\webapps\businessobjects\enterprise115\desktoplaunch\WEB-INF\classes\, as explained on a post,but this directory doesn't exist, but there is 4 different webi.properties files one in C:\Program Files\Business Objects\Tomcat55\webapps\PerformanceManagement\WEB-INF\lib so I added max heap size parameter in this one.
    I improved my JDBC-driver to avoid memory leak, and BO requests to limit results.
    But I still have an heap size error.
    Some people have other ideas to solve my problem ?
    Best regards.       
    BO XI 3.1 Service Pack 2 HotFix 1
    Tomcat 5.5 : 1024Mo memory allocation
    Windows Server 2003 32bits

    Hi Hizam,
    1. Go to universe and click on View--> Structure
    2. Check objects and Conditions.
    3. If you found any changes then re-export your universe and run queries.
    Once everything goes fine then Schedule the report.
    Hope it helps you....!!
    Thank You!

  • How to increase Memory and Java Heap Size for Content Server

    Hi,
    My content server is processing requests very slowly. Over performance is not good. I have 2 GB of RAM any idea what files I can modify to increase the Java Heap Size for the Content Server. If I increase the RAM to 4 or 6 GB where do I need to make changes for the Java Heap Size and what are the recommended values. I just have Content Server Running on the linux box. Or how do I assign more memory to the user that owns the content server install.
    Thanks

    You might find these interesting:
    http://blogs.oracle.com/fusionecm/2008/10/how_to_-javatuning.html
    http://download.oracle.com/docs/cd/E10316_01/cs/cs_doc_10/documentation/admin/performance_tuning_10en.pdf
    Do you have access to metalink? This has about everything you could want:
    https://metalink2.oracle.com/metalink/plsql/f?p=130:14:9940589543422282072::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,788210.1,1,1,1,helvetica
    Or search for "788210.1" in metalink knowledgebase if that link doesn't work and look for the FAQ on configuring Java for Content Servers

  • Maximum Heap Size in Java 5

    When migrating an application from JDK1.4.2_12 to JDK1.5.0_10,it was seen that the max. heap size that was set using -Xmx had to be reduced from 1.5 GB to 1.3 GB on a win32 machine inorder to create JVM successfully. Any pointers to what in Java 5.0 could have brought about this change is highly appreciated.
    (Please note that I understand how heap size allocation works w.r.t virtual memory on win32.)

    Because the VM foot print got bigger of course.
    That has happened with every version of the Sun VM.

  • Heap size full Error message displayed when build par file in Eclispe.

    We are getting below error message.
    [plugin-assemble] Java returned: 1
    [plugin-assemble] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:107)
    [plugin-assemble] at com.mslv.oms.j2ee.deploytool.automation.c.a(Unknown Source)
    [plugin-assemble] at com.mslv.oms.deploytool.api.d.a(Unknown Source)
    [plugin-assemble] at com.mslv.oms.deploytool.anttasks.OMSPluginAssemble.execute(Unknown Source)
    [plugin-assemble] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    [plugin-assemble] at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
    [plugin-assemble] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [plugin-assemble] at java.lang.reflect.Method.invoke(Method.java:597)
    [plugin-assemble] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
    [plugin-assemble] at org.apache.tools.ant.Task.perform(Task.java:348)
    [plugin-assemble] at org.apache.tools.ant.Target.execute(Target.java:357)
    [plugin-assemble] at org.apache.tools.ant.Target.performTasks(Target.java:385)
    [plugin-assemble] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
    [plugin-assemble] at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
    [plugin-assemble] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    [plugin-assemble] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
    [plugin-assemble] at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
    [plugin-assemble] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
    [plugin-assemble] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
    we tried various option to change Xmx & XXMaxPermSize in eclispe ini file.
    -showsplash
    org.eclipse.platform
    -launcher.XXMaxPermSize
    2048M
    -framework
    plugins\org.eclipse.osgi_3.4.3.R34x_v20081215-1030.jar
    -vmargs
    -Dosgi.requiredJavaVersion=1.5
    -Xms64m
    -Xmx1024m
    Your help is highly appreciated.

    I have a couple of recommendations, hopefully they will help:
    1. In the Design Studio installation it mentions that you have to append: -vmargs -Dsun.lang.ClassLoader.allowArraySyntax=true to the shortcut created to launch it. Eclipse won't take both: the configuration on your eclipse.ini and the arguments in the shortcut, I recommend to just use the eclipse.ini
    Make sure that your configuration is what you have specified by going to:
    - In Design Studio open menu: Help ->About Eclipse Platform ->Configuration Details …
    2. When you are using Ant to build, deploy a project you may run into Java Heap problem. You may need to increase the amount of memory Ant is allowed to use for your project, to do that:
    - In Design Studio open menu: Run->External Tools->Open External Tools Dialog…
    - Select the build script you want to change on the left view.
    - Select the JRE tab on the right
    - Set the following as VM arguments: -Xms768m -Xmx1024m -XX:MaxPermSize=512m (this is just an example, adjust the values to your computer specifications)

  • Object in cache count and total heap size consumed.

    Hi
    Can you please help me to extract - total number of custom value objects (count) and its total heap space consumed. How do we extract this information (from jrcmd or jrockit command control - jrockit jvm).
    Do we need to use - com.tangosol.net.management.Registry? can you share some example/documentation in this regard.
    Thanks
    sunder

    Hi NJ,
    Thanks for your response - if I have to implement unit-calculator - i need to use instrumentation API to compute the size of a entry which will affect the performance of system.
    Here is my problem.
    1 - Have a com.tangosol.net.DefaultCacheServer (distributed cache) instance running
    2 - A client joins the distributed cluster and inserts records into cluster and leaves the cluster.
    when I do jrcmd on "DefaultCacheServer" i dont see any of custom java components (beans set distributed cache) - I want to have visibility of objects being put in cache and actual space consumed. Is there a way to get this?
    [xx@yyy ~]$ jrcmd 10693 print_object_summary
    10693:
    --------- Detailed Heap Statistics: ---------
    64.7% 6565k 2571 +6565k [B
    10.2% 1034k 14816 +1034k [C
    3.7% 374k 3199 +374k java/lang/Class
    3.6% 364k 15560 +364k java/lang/String
    2.8% 280k 3468 +280k [Ljava/lang/Object;
    1.2% 119k 118 +119k [Lcom/tangosol/util/RecyclingLinkedList$Node;
    1.0% 98k 2510 +98k com/tangosol/io/ByteArrayWriteBuffer
    0.9% 94k 2418 +94k com/tangosol/run/xml/SimpleElement
    0.8% 81k 2088 +81k com/tangosol/run/xml/SimpleElement$AttributeMap
    0.8% 80k 696 +80k [Ljava/util/HashMap$Entry;
    0.6% 64k 2740 +64k java/util/HashMap$Entry
    Note there are no custom component been listed in DefaultCacheServer instance.
    Thanks
    sunder

  • Initial and Minimum Pool Size

    in j2ee admin console, i set the parameter to 8. I go to oracle and from sql*plus i execute the following command
    select * from v$session
    However, when i run my sample program I only see a session from my computer. Is it right? or I am supposed to see 8 sessions

    Well, that would depend on whether you set initial pool size to 8 or minimum pool size to 8, wouldn't it? All you said was that you set "the parameter" to 8.

Maybe you are looking for

  • Error while trying to assign an empty value

    Hi , In my bpel process i get an error while trying to assign an empty output to a variable. It occurs in assign activity copy operation. What can i do? How can i skip this? Sometimes there may be null /empty values ...below is the error message Erro

  • How to access an external text file in a Servlet class?

    I do the regular file I/O in the Servlet class. But when I run Servlet class, text file is not loaded. Can sb tell me how to do it? Thanx Richard

  • Ipod and AMDS

    Hi, my ipod touch wont connect to itunes, it came up with a message that said it couldnt be connected because the AMDS couldnt be found, so I googled how to fix that and the system didnt have the option to stop or restart the AMDS. Can someone please

  • How can I include metadata when importing libraries?

    I've exported my 100 GB of photos to an external hard drive. Now I would like to split my photos into five libraries and import them including their metadata (modifications and tags, mostly) to my new libraries. Is that possible?

  • Applescript in Automator

    I'm having an odd problem. With iChat launched and online, Automator is returning an error of 'Application isn't running' when I run the following script: on run {input, parameters} tell application "iChat" set status to offline end tell end run Runn