#18600 [Com]: Unable to create Java Virtual Machine

From: Date: Wed, 30 Apr 2003 10:27:08 +0000
Subject: #18600 [Com]: Unable to create Java Virtual Machine
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-38794@lists.php.net to get a copy of this message
 ID:               18600
 Comment by:       belin at fc-net dot fr
 Reported By:      nalves at equifax dot com dot br
 Status:           Open
 Bug Type:         Java related
 Operating System: Windows 2000
 PHP Version:      4.2.3
 New Comment:

Running Apache 1.3.22 and PHP 4.3.1 as module,
sablotron IS NOT enabled,
and I use JDK 1.4.0_01

after many times configuring php.ini
(there is jvm.dll bundled with my php distrib
but it seems to be useless, I used the jvm.dll
into the jre\server directory).

well well well...
it works when my PHP code is fully clean,
even if I reload my page several times.

now, let's try to make a little error...
if i try to create an object 
(using $o = new Java(java_class_name))

if the class exists... no problem, if it
doesn't, just get an error but all is ok,
now if I try a java_class_name starting
with a lowercase character...

-> Unable to load virtual machine

ok ok. close explorer, modify the script,
and rewrite it correctly... lauching IE...
and the script...

-> Unable to load virtual machine

seems that if one error occurs everything after
is bad, even if it would not !

-> and then, the only thing to do is to shutdown
apache, and restart it... then the script goes ok...

conclusion. at the first error, shutdown and restart
apache, aaaaaargh ????


NOTE : this is only true for the apache module, when
using the cli version of php (command line), no
probleme with java VM...

hope it helps.

-Nicolas, french coder ;o)


Previous Comments:
------------------------------------------------------------------------

[2003-04-19 09:43:41] tuxo at gmx dot net

i experienced this problem too..
i want to use fop from xml.apache.org with the pear-class XML_fo2pdf to
produce pdf files.

system: win2k, apache 2.0.45, php 4.3.1, j2jdk 1.4.1.

any fixes available?

------------------------------------------------------------------------

[2003-04-18 08:31:02] jason at ipedo dot com

I get the same problem.
My envirnment:
W2K Server
php4-win32-STABLE-200304180830
Apache 2.0.43
Jdk1.3.1 or j2sdk1.4.1_01
Module not CGI

If it can't be fixed quickly, how can I work around it?

Does this bug also exist in other platform,eg linux, solaris?

------------------------------------------------------------------------

[2003-01-27 15:47:10] drobert at bfm dot bm

I get the same problem; The way I reproduced it is:

1. load a page with a Java call;
2. press and hold the refresh button.
3. It will eventually fail.

It seems that PHP is attempting to create a new JVM for each request
(unfortunately, this is required for a cgi install; it shouldn't be for
a SAPI install). My guess is that either Apache or PHP runs into
resource limits (e.g. does not release the JVM after it completes the
request; creates too many threads; etc...).

It would probably be better if PHP used a JVM pool; this wouldn't make
much difference in a cgi install, but would help SAPI installs. I have
no idea whether this is feasible or not; I've never actually taken the
time to give the source a looksy...

------------------------------------------------------------------------

[2003-01-17 03:56:29] gskumar at quark dot co dot in

Hi all,

How my servlet will call my php program. 
Any pointer appreciated.

Surendra.

------------------------------------------------------------------------

[2003-01-08 17:14:33] zzpeterzz at yahoo dot com

I HAVE A NEC 95 WINDOWS NOTEBOOK AND CANNOT INSTALL THE JAVA VIRTUAL
MACHINE PLUG IT COMES BACK  AND TELLS ME THIS THE PUBLISHERCANNOT BE
DETERMINED DUE TO TO PROBLEMS    AND THIS AS WELL  TRUST PROVIDER IS 
UNKNOWN OR NOT CONFIGURED PROPERLY   CAN U PLEASE TELL ME WHAT I CAN DO
TO REMEDY THIS?????? THANK YOU PETER  FIORE.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/18600

-- 
Edit this bug report at http://bugs.php.net/?id=18600&edit=1



Thread (60 messages)

« previous php.bugs (#38794) next »