cancel
Showing results for 
Search instead for 
Did you mean: 

Could not create the Java Virtual Machine

Former Member
8,448

Hi, I'm running sqlanywhere 12 on a Linux, Fedora core 16, 64bit machine. I have applied the latest EBF for Linux 32/64. (build 3519) I'm able to run the server, and connect to my database, but I have two problems:

  1. When ever i try to run dbisql or scjview i get the following: "Invalid maximum heap size: -Xmx0m" Could not create the Java Virtual Machine

  2. I can not load the SQLAnywhere Client libraries. phpinfo() gives me this error in the SQLAnywhere support area. I have loaded php-5.3.2_sqlanywhere.so as a PHP extension in my php.ini file, and created an sqlanywhere.ini file in the /etc/php.d directory.

Any advice would be greatly appreciated.

Tom.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member

For #2 it seems that your SQLAnywhere environment is not setup correctly that's why the SQLAnywhere PHP driver cannot load the SQLAnywhere libraries. You did not specify if you are trying to run PHP from the command line or from Apache. In either case, you need to make sure that you have setup your SQLAnywhere environment by sourcing either sa_config.sh or sa_config.csh scripts located in your SQLAnywhere bin32 or bin64 directory.

Former Member
0 Kudos

The problem was from Apache, and you are correct. I've solved this problem by sourcing the sa_config.sh file from "/etc/sysconfig/httpd" Now when apache starts, i can see it sources the file, and loads the client libraries! Thanks again.

Former Member

The first issue was fixed as CR 694479 and will be included in 12.0.1 build 3539. I don't know when that is expected to be released (hopefully soon).

The problem is with how we handle the 3.0 kernel. We were doing a kernel version check (because the API changed) when calculating your system memory that assumed the kernel version would never proceed past 2. Sadly, the only workaround (other than what Graham suggested, which won't work for the server) is to remove memory from your system.

Have a look at this question for more details.

Former Member
0 Kudos

Ok, thanks. I will use other tools until the new EBF is available.

Former Member
0 Kudos

Please note that 12.0.1 build 3723 for Linux was posted on Friday (May the 4th be with you).

Former Member

For #1, it seems that the native (non-Java) launchers for dbisql and scjview are not providing the correct default heap memory in the JVM command line, due the issue Phil describes. You can use the -batch option (eg. dbisql -batch) to generate a script file (.sh on Linux or .bat on Windows) with the same commands that the native launcher would use. As a workaround for launching dbisql or scjview directly, you could edit the generated script file to give a more appropriate -Xmx value to the Java VM, eg. -Xmx1g.