3 Replies Latest reply: Jul 5, 2012 8:53 PM by 947621 RSS

    Could not create the Java virtual machine What happen?

    947621
      all,good day!
      i use tomcat7 and JRockit JVM;
      tomcat7 version info:
      Server version: Apache Tomcat/7.0.27
      Server built: Mar 31 2012 03:43:36
      Server number: 7.0.27.0
      OS Name: Linux
      OS Version: 2.6.32-220.el6.x86_64
      Architecture: amd64
      JVM Version: 1.6.0_02-b05
      JVM Vendor: BEA Systems, Inc.


      JRockit JVM version info:
      java version "1.6.0_29"
      Java(TM) SE Runtime Environment (build 1.6.0_29-b11)
      Oracle JRockit(R) (build R28.2.2-7-148152-1.6.0_29-20111221-2104-linux-x86_64, compiled mode)

      in R28 jrdoc ,The -XgcPrio option is deprecated in Oracle JRockit R28. The option works in R28, but Oracle recommends that you use -Xgc instead. For more information, see -Xgc;

      in -Xgc option info lists the garbage collection modes that i can specify with the -Xgc option. pausetime mode in which the option;

      but,but,i use -Xgc:pausetime in my tomcat7;tomcat startup error:

      The configuration of the JVM attributes in Tomcat in catalina.sh

      export JAVA_OPTS="-server -Xms25G -Xmx25G -XgcPrio:pausetime -XpauseTarget=200"

      the error info:

      [ERROR] Argument error: -Xgc:pausetime
      [ERROR] pausetime is not a valid garbage collector name for -Xgc.
      Valid options are: singlecon, gencon, genpar or parallel (singlepar).
      [WARN ] No unit entered for pause time target, assuming ms.
      Could not create the Java virtual machine.


      what's wrong in my configuration ?

      Edited by: 944618 on 2012-7-5 上午4:26
        • 1. Re: Could not create the Java virtual machine What happen?
          Klara Ward, Java Mission Control Dev-Oracle
          I would add the jvm flag -showversion next to the -Xgc:pausetime flag, so you will see which JVM you're actually running.


          Also, the following part of your post is a bit inconsistent, which jvm flag are you actally using?

          "but,but,i use -Xgc:pausetime in my tomcat7;tomcat startup error:

          The configuration of the JVM attributes in Tomcat in catalina.sh

          export JAVA_OPTS="-server -Xms25G -Xmx25G -XgcPrio:pausetime -XpauseTarget=200"

          the error info:

          [ERROR] Argument error: -Xgc:pausetime"


          The error output you posted looks like the error you would get from a R27 version of JRockit.
          • 2. Re: Could not create the Java virtual machine What happen?
            947621
            Sorry,I was wrong!

            The configuration of the JVM attributes in Tomcat in catalina.sh

            export JAVA_OPTS="-server -Xms25G -Xmx25G -Xgc:pausetime -XpauseTarget=200"

            Error occurred;

            in the shell ,-showversion info As follows:
            java -showversion
            java version "1.6.0_29"
            Java(TM) SE Runtime Environment (build 1.6.0_29-b11)
            Oracle JRockit(R) (build R28.2.2-7-148152-1.6.0_29-20111221-2104-linux-x86_64, compiled mode)
            • 3. Re: Could not create the Java virtual machine What happen?
              947621
              question was Solve;
              in my system,R27& R28 have been installed;
              in /etc/profile JVM configure is R27;
              Technical staff make soft link /usr/bin/java use R28;
              so,in linux shell,use Command line java -version ,then print info is R28;
              but tomcat jvm is R27
              So that Tomcat use /etc/profile JVM configure first!

              Thank U all!