You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(6) |
Oct
(6) |
Nov
(8) |
Dec
(2) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
(19) |
Feb
(15) |
Mar
(10) |
Apr
(8) |
May
(7) |
Jun
(9) |
Jul
(13) |
Aug
(31) |
Sep
(111) |
Oct
(52) |
Nov
(72) |
Dec
(42) |
| 2006 |
Jan
(21) |
Feb
(32) |
Mar
(33) |
Apr
(24) |
May
(15) |
Jun
(40) |
Jul
(32) |
Aug
(19) |
Sep
(38) |
Oct
(37) |
Nov
(63) |
Dec
(37) |
| 2007 |
Jan
(18) |
Feb
(39) |
Mar
(69) |
Apr
(49) |
May
(71) |
Jun
(59) |
Jul
(71) |
Aug
(85) |
Sep
(46) |
Oct
(14) |
Nov
(25) |
Dec
(56) |
| 2008 |
Jan
(24) |
Feb
(77) |
Mar
(104) |
Apr
(44) |
May
(41) |
Jun
(11) |
Jul
(31) |
Aug
(59) |
Sep
(44) |
Oct
(86) |
Nov
(66) |
Dec
(93) |
| 2009 |
Jan
(88) |
Feb
(41) |
Mar
(49) |
Apr
(135) |
May
(22) |
Jun
(31) |
Jul
(60) |
Aug
(71) |
Sep
(76) |
Oct
(18) |
Nov
(52) |
Dec
(20) |
| 2010 |
Jan
(8) |
Feb
(50) |
Mar
(35) |
Apr
(48) |
May
(46) |
Jun
(84) |
Jul
(38) |
Aug
(61) |
Sep
(51) |
Oct
(31) |
Nov
(17) |
Dec
(18) |
| 2011 |
Jan
(51) |
Feb
(14) |
Mar
(17) |
Apr
(23) |
May
(15) |
Jun
(11) |
Jul
(5) |
Aug
(5) |
Sep
(15) |
Oct
(8) |
Nov
(5) |
Dec
(25) |
| 2012 |
Jan
(2) |
Feb
(4) |
Mar
(6) |
Apr
(9) |
May
(27) |
Jun
(32) |
Jul
(36) |
Aug
(10) |
Sep
(16) |
Oct
(3) |
Nov
(13) |
Dec
(7) |
| 2013 |
Jan
(1) |
Feb
(4) |
Mar
|
Apr
(1) |
May
|
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(4) |
Oct
(2) |
Nov
(1) |
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
(2) |
Apr
(1) |
May
(2) |
Jun
(9) |
Jul
(5) |
Aug
(2) |
Sep
(4) |
Oct
|
Nov
|
Dec
|
| 2015 |
Jan
(3) |
Feb
(2) |
Mar
(4) |
Apr
(3) |
May
(1) |
Jun
(2) |
Jul
|
Aug
(2) |
Sep
(5) |
Oct
(1) |
Nov
|
Dec
|
| 2016 |
Jan
|
Feb
(5) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(5) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
| 2017 |
Jan
(6) |
Feb
|
Mar
|
Apr
(10) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(1) |
Dec
|
| 2018 |
Jan
(2) |
Feb
(5) |
Mar
|
Apr
|
May
(1) |
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
| 2021 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2023 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
1
(1) |
|
2
|
3
|
4
|
5
(1) |
6
(2) |
7
(4) |
8
(1) |
|
9
(1) |
10
(10) |
11
(5) |
12
|
13
(1) |
14
(1) |
15
|
|
16
|
17
|
18
|
19
(4) |
20
(1) |
21
|
22
|
|
23
|
24
|
25
(4) |
26
|
27
(10) |
28
|
29
|
|
30
|
|
|
|
|
|
|
|
From: <php...@li...> - 2007-09-11 07:22:54
|
> -----Original Message----- > From: php...@li... > [mailto:php...@li...] > On Behalf Of php...@li... > Sent: Dienstag, 11. September 2007 00:04 > To: php...@li... > Subject: Re: [Php-java-bridge-users] PLEASE name > globallyvisiblevariablesvery unique! > > > Why not just include java.inc first? Then, even if it does > use variables they you've set, then you'll overwrite the > value and it won't be an issue. I can't see any reason why > you couldn't do the include at the top of the page. I always > put it just after session_start(); > > --Nathan Shaskin > Compliance Publishing Because that part that declares $version is outside the code, that I write, as is the code that later checks for it. My code is dynamically, i.e. at runtime, embedded into this sequence. The code that declares $version and the code that uses it are both outside my control. I am essentially just providing the middle part that returns some values (using the java-bridge). I agree, that this is maybe not the best possible solution, but that's the way this library, that I am using, works... Michael |
|
From: <php...@li...> - 2007-09-10 22:03:49
|
Why not just include java.inc first? Then, even if it does use variables they you've set, then you'll overwrite the value and it won't be an issue. I can't see any reason why you couldn't do the include at the top of the page. I always put it just after session_start();
--Nathan Shaskin
Compliance Publishing
php...@li... wrote: > -----Original Message-----
> From: php...@li...
> [mailto:php...@li...]
> On Behalf Of php...@li...
> Sent: Montag, 10. September 2007 19:43
> To: php...@li...
> Subject: Re: [Php-java-bridge-users] PLEASE name globally
> visiblevariablesvery unique!
>
> ...
> Other libraries use similar code in their setup. I don't see
> a problem
> with this. I don't even understand the problem.
Sigh! My last attempt before giving up hope:
I have code like that roughly looks as follows.
---------------
...
$version = '1.0.0'; // this may also - say - be passed in as
parameter.
...
require_once(
);
...
...
// followed my some other code, that expects to see the
// variable value defined at the begin (or being passed in):
...
read_file('foo_bar_'.$version.'.xyz'); // supposed to read
'foo_bar_1.0.0.xyz'
...
---------------
then this code would now suddenly search for 'foo_bar_5.2.3.xyz'
(which most likely will not exist and hence this method fails), since
the innocently looking require_once(...) has modified the $version
variable during the check for the current php-version.
Why is it so hard to understand, that I simply ask, NOT to use a
variable called "$version"? As we have seen this is a very likely
variable name, may thus already exist and its modification can lead to
unexpected results.
I guess your answer will now be: MY code should not use a variable
called "$version", but since this is code that sits in a third party
library that I do not want to modify (since I then would have to
repeat that same modification in each new version) this is not an
option.
Hope I could make myself clear and if not I don't care any more...
Michael
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
php-java-bridge-users mailing list
php...@li...
https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
---------------------------------
Park yourself in front of a world of choices in alternative vehicles.
Visit the Yahoo! Auto Green Center.
|
|
From: <php...@li...> - 2007-09-10 20:46:59
|
> -----Original Message-----
> From: php...@li...=20
> [mailto:php...@li...]=20
> On Behalf Of php...@li...
> Sent: Montag, 10. September 2007 19:43
> To: php...@li...
> Subject: Re: [Php-java-bridge-users] PLEASE name globally=20
> visiblevariablesvery unique!
>=20
> ...
> Other libraries use similar code in their setup. I don't see=20
> a problem=20
> with this. I don't even understand the problem.
Sigh! My last attempt before giving up hope:
I have code like that roughly looks as follows.
---------------
...
$version =3D '1.0.0'; // this may also - say - be passed in as
parameter.
...
require_once(<php-bridge's Java.inc>);
...
<do somethings with the java-bridge>
...
// followed my some other code, that expects to see the=20
// variable value defined at the begin (or being passed in):
...
read_file('foo_bar_'.$version.'.xyz'); // supposed to read
'foo_bar_1.0.0.xyz'
...
---------------
then this code would now suddenly search for 'foo_bar_5.2.3.xyz'
(which most likely will not exist and hence this method fails), since
the innocently looking require_once(...) has modified the $version
variable during the check for the current php-version.
Why is it so hard to understand, that I simply ask, NOT to use a
variable called "$version"? As we have seen this is a very likely
variable name, may thus already exist and its modification can lead to
unexpected results.=20
I guess your answer will now be: MY code should not use a variable
called "$version", but since this is code that sits in a third party
library that I do not want to modify (since I then would have to
repeat that same modification in each new version) this is not an
option.
Hope I could make myself clear and if not I don't care any more...
Michael
|
|
From: <php...@li...> - 2007-09-10 17:47:08
|
Hi,
> DeclaredMethods (according to getDeclaredMethods):
> - doSomething([Ljava.lang.String;)
> - doSomething(java.util.List)
you could use java_inspect($object), which also prints the methods. :)
> I've tried to pass a single string the following ways:
> - java.lang.reflect.Array with java.lang.String
> - java.util.Arrays->asList with array('...')
> - ArrayList, how do I cast this to a java.util.List ?
All wrong. :) You need to pass a typed array.
> I keep getting a NoSuchMethodException.
Just pass a Java array or let the PHP/Java Bridge coerce the argument. For example:
$varargs = array("1", "2", "3");
or
$varargs = array (new Java("java.lang.String", "1"), new Java("java.lang.String", "2"), ...);
should work.
Regards,
Jost Boekemeier
Heute schon einen Blick in die Zukunft von E-Mails wagen? www.yahoo.de/mail
|
|
From: <php...@li...> - 2007-09-10 17:42:34
|
Hi Michael,
> > This means that we have to prefix all *temporary* variables
> > with java_. I don't think this is a good idea.
>
> Well - if you want to similar effect in other environments, then I
> guess this would be needed.
I don't think so. People shouldn't write unnatural code. I have never seen prefixes for temporary
variables such as:
for($myLib_i=0; $myLib_i<100; $myLib_i++) {...}
> that $version was actually the only var that is used in that way.
Other libraries use similar code in their setup. I don't see a problem
with this. I don't even understand the problem.
If you use the following code:
$i=something;
require_once("some_lib.php") ::= { ... for($i=0; $i<100; $i++) ... }
doSomethingWith($i);
then there's a bug in your code, I think. Your global variable "$i" should be named "$myApp_i",
not simply "$i".
Regards,
Jost Boekemeier
Wissenswertes für Bastler und Hobby Handwerker. BE A BETTER HEIMWERKER! www.yahoo.de/clever
|
|
From: <php...@li...> - 2007-09-10 17:31:12
|
Hi, according to http://msdn2.microsoft.com/en-us/library/ms740668.aspx the winsock error #10054 means: Connection reset by peer. An existing connection was forcibly closed by the remote host. This normally results if the peer application on the remote host is suddenly stopped, the host is rebooted, the host or remote network interface is disabled, or the remote host uses a hard close (see setsockopt for more information on the SO_LINGER option on the remote socket). This error may also result if a connection was broken due to keep-alive activity detecting a failure while one or more operations are in progress. Operations that were in progress fail with WSAENETRESET. Subsequent operations fail with WSAECONNRESET. Isn't it possible to shut down the back end? How do you stop tomcat? However, this is not a problem with the PHP/Java Bridge. The bridge uses pfsockopen() to create a persistent connection to the back end. PHP can and should detect if the back end has been restarted or not. Regards, Jost Boekemeier Machen Sie Yahoo! zu Ihrer Startseite. Los geht's: http://de.yahoo.com/set |
|
From: <php...@li...> - 2007-09-10 16:02:52
|
Whenever the PHP/JavaBridge on Apache has lost connection to Tomcat, then that was it! If - for example - Tomcat has been brought down and restarted, then the next time I want to call some java-code I get the following notice: -------------------------------------------------------------- Notice: fwrite() [function.fwrite]: send of 117 bytes failed with errno=3D10054 An existing connection was forcibly closed by the remote host. in C:\Program Files\xampp\htdocs\test\Java.inc on line 740 protocol error: , Invalid document end at col 8. Check the back end log for details. Notice: fwrite() [function.fwrite]: send of 11 bytes failed with errno=3D10054 An existing connection was forcibly closed by the remote host. in C:\Program Files\xampp\htdocs\test\Java.inc on line 746 -------------------------------------------------------------- In other words, if one side goes down, one has to bring down the other as well and has to restart both. Only then they will "find" each other again. Couldn't the bridge try to reconnect? I find it a bit tedious and also not very robust, that I always have to bring down both sides in lock-step and can't simply let one run all the time. Michael |
|
From: <php...@li...> - 2007-09-10 14:32:44
|
I think you could/should use an array(). For example the code below displays 12:
--- varargs.php ---
<?php require_once("http://localhost:9092/JavaBridge/java/Java.inc");
java_require("varargs.jar");
$varargs = new java("Varargs");
$t1 = new java('Varargs$Test', 1);
$t2 = new java('Varargs$Test', 2);
echo $varargs->varargs(array($t1, $t2));
?>
--- Varargs.java ---
public class Varargs {
public static class Test {
public int i;
public Test (int i) {
this.i = i;
}
public String toString() {
return String.valueOf(i);
}
}
public static String varargs(Test ...tests) {
StringBuffer buf = new StringBuffer();
for (Test test : tests) {
buf.append(test);
}
return buf.toString();
}
public static void main(String[] args) {
System.out.println(varargs(new Test(1), new Test(2)));
}
}
Peter
---------------------------------
Moody friends. Drama queens. Your life? Nope! - their life, your story.
Play Sims Stories at Yahoo! Games.
|
|
From: <php...@li...> - 2007-09-10 10:32:10
|
Hi Jost,=20
> -----Original Message-----
> From: php...@li...=20
> [mailto:php...@li...]=20
> On Behalf Of php...@li...
> Sent: Montag, 10. September 2007 11:32
> To: php...@li...
> Subject: Re: [Php-java-bridge-users] PLEASE name globally=20
> visible variablesvery unique!
>=20
> ...
> how can a temporary variable, which is used only within the=20
> Java.inc block, break your application?
OK - maybe "global" was the wrong term here. It's not really "global"
in the PHP sense. Apologies!
But it is "global" in the sense, that obviously the code, that I am
using (a widget library for which I was creating additional widgets
that then get dynamically loaded) creates an environment into which
that widget code gets dynamically loaded and embedded and in that
environment there obviously already exists a variable "$version".
> ...
> $version is a variable which is used only in the if() block.=20
> Since php currently doesn't support name spaces, it is=20
> created in the global environment instead. Whether or not an=20
> included library uses temporary bindings in the global=20
> environment should not affect a well-written application.
If there already exists a variable "$version" OUTSIDE (i.e. before)
the if-block, then obviously it takes that variable (and does not
create and use a new local var) and so overwrites its value, i.e. that
statement has an outside noticable effect.
> This means that we have to prefix all *temporary* variables=20
> with java_. I don't think this is a good idea.=20
Well - if you want to similar effect in other environments, then I
guess this would be needed. However, I just checked again, it seems
that $version was actually the only var that is used in that way.
Everything else seems to be used inside functions or classes and
should thus not harm. And all others var and constants that I found
during my quick glance ($JAVA_BASE, JAVA_HOST, JAVA_SERVLET,
JAVA_LOG_LEVEL, etc.) are already named such, that they are rather
unlikely to clash (and if they do, the names already suggests where to
look...). I hope I didn't miss any, though.
=20
> > I even suggest to NOT use any variable here, but to write=20
> this snippet=20
> > as
> > follows:
> > ...
> > if ((version_compare("5.1.2", phpversion(), ">"))) {
> > $msg =3D '<br><strong>PHP '.phpversion().' too=20
> old.</strong><br>\nFor
>=20
> How does this help? The temp var $msg is also created in the=20
> global environment.
Agreed - one could even compose the msg directly in the method call
thus avoiding the declarartion and use of $msg, but since that
variable is only used in the subsequent die(...) anyway, I did not
consider that an issue, while the use (and possible modification) of
"$version" obviously IS an issue and should be avoided.
Look, I didn't mean to cause a major headache here. I only reported a
problem that I banged into using the PHP/JavaBridge in my environment
and a IMHO really minor change, that allows to fix this and avoid
similar griefs for others in the future.=20
Michael
|
|
From: <php...@li...> - 2007-09-10 09:32:28
|
Hi,
> code, I didn't actually *use* anything from it, yet, just including it was
> enough to break my application.
how can a temporary variable, which is used only within the Java.inc block, break your
application?
> After some quite substantial investigation I had to learn, that the reason
> was, that the Java.inc file uses a globally visible variable "$version"
$version is a variable which is used only in the if() block. Since php currently doesn't support
name spaces, it is created in the global environment instead. Whether or not an included library
uses temporary bindings in the global environment should not affect a well-written application.
For version 4.2.3 we could turn the code block into a lambda() and immediately invoke it. This way
the bindings are created local to the anonymous function and do not pollute the global env.
> Apparently some other code that I am using also checks for such a variable.
> It expects to find 1.0.0 but now found 5.2.3 (the PHP version I am using)
Isn't it possible to keep your *global variables* in a separate map? BTW: I would prefix all
global variables with appname_ to avoid clashes with other libs. Temporary bindings don't need to
prefixed, though.
> if you use (and then leave around) such globally visible variables, then
> PLEASE make their names VERY unique.
This means that we have to prefix all *temporary* variables with java_. I don't think this is a
good idea.
However, we can and probably should turn global code blocks into anonymous functions and invoke
them immediately.
> I even suggest to NOT use any variable here, but to write this snippet as
> follows:
> ...
> if ((version_compare("5.1.2", phpversion(), ">"))) {
> $msg = '<br><strong>PHP '.phpversion().' too old.</strong><br>\nFor
How does this help? The temp var $msg is also created in the global environment.
Regards,
Jost Boekemeier
__________________________________
Yahoo! Clever - Der einfachste Weg, Fragen zu stellen und Wissenswertes mit Anderen zu teilen. www.yahoo.de/clever
|
|
From: <php...@li...> - 2007-09-10 09:19:52
|
Hi,
I'm having some problems with a Java 1.5 feature.
I have a java class with a function like:
public void doSomething(String...) {
...
}
DeclaredMethods (according to getDeclaredMethods):
- doSomething([Ljava.lang.String;)
- doSomething(java.util.List)
I've tried to pass a single string the following ways:
- java.lang.reflect.Array with java.lang.String
- java.util.Arrays->asList with array('...')
- ArrayList, how do I cast this to a java.util.List ?
I keep getting a NoSuchMethodException.
Any suggestions?
Setup:
- Apache 2.2.4
- PHP 5.2.3
- Tomcat 5.5.17
- Java Bridge 4.2.2
|
|
From: <php...@li...> - 2007-09-09 13:03:52
|
My application always failed mysteriously the very moment I included the
Java-bridge (i.e. as soon as I added "
require_once('http://localhost:8080/JavaBridge/java/Java.inc');" to my
code, I didn't actually *use* anything from it, yet, just including it was
enough to break my application.
After some quite substantial investigation I had to learn, that the reason
was, that the Java.inc file uses a globally visible variable "$version"
(which in line 4) is set to the current php-version and then compared to
'5.1.2' to give a warning if this is executed on a lower php-version.
Apparently some other code that I am using also checks for such a variable.
It expects to find 1.0.0 but now found 5.2.3 (the PHP version I am using)
and then behaved completely differently, i.e. eventually did not work at
all, since it combined that variable into a filename and then did not find
a file required and failed.
To verify this, I made myself a copy of Java.inc where I renamed this
variable and now everything works as expected.
So, dear PHP/JavaBridge developers:
if you use (and then leave around) such globally visible variables, then
PLEASE make their names VERY unique. The name "version" is obviously too
likely to appear in other's code as well and then can have very strange
side-effects!
I even suggest to NOT use any variable here, but to write this snippet as
follows:
...
if ((version_compare("5.1.2", phpversion(), ">"))) {
$msg = '<br><strong>PHP '.phpversion().' too old.</strong><br>\nFor
PHP versions < 5.1.4 install the java.so or php_java.dll from the
php-java-bridge-legacy download.<br>\nOr set the path to the PHP
executable, see php_exec in the WEB-INF/web.xml';
die($msg);
}
...
In the (hopefully rare) case where this test fails, it doesn't really hurt
to call the method twice (since the code is terminated anyway) and in the
good case this doesn't leave any traces.
Regards,
Michael
|
|
From: <php...@li...> - 2007-09-08 14:58:53
|
Hi, > Fatal error: Cannot redeclare java_last_exception_get() at the moment there are 5 other "php to java" bridges offering a similar API. One is proprietary code, two of them are obsolete, one is part of a proprietary J2EE application server and one is integrated into a PHP interpreter written in pure Java (http://www.projectzero.org/). Please try to run PHP without a php.ini file. If this works, please check your php.ini entries. Regards, Jost Boekemeier Wissenswertes für Bastler und Hobby Handwerker. BE A BETTER HEIMWERKER! www.yahoo.de/clever |
|
From: <php...@li...> - 2007-09-07 22:10:04
|
Bingo! Thank you so much!=20
The second part of you mail - disabling the php_java.dll - did the
trick!
I had enabled that before fully understanding, how this PHP/JavaBridge
works (or actually I think, for an earlier version of the bridge
(3.1.x?) it was even necessary) and had never thought about it any
more, let alone realized that this is not only not required any more
but can cause such adverse effects...
This problem has costed me two days of desperate searching and I
simply couldn't understand what was going on here. I definitely owe
you a beer! Or several, actually!=20
Thanks again,
Michael
> -----Original Message-----
> From: php...@li...=20
> [mailto:php...@li...]=20
> On Behalf Of php...@li...
> Sent: Freitag, 7. September 2007 23:01
> To: php...@li...
> Subject: Re: [Php-java-bridge-users] Strange "Cannot=20
> redeclare" errormessage...
>=20
>=20
> I believe I ran into the same error at one point. If I=20
> remember right, the way I fixed it was by removing the war=20
> file from Tomcat completely, deleting the folder named=20
> JavaBridge in the Tomcat folder (if this fails you'll need to=20
> restart first), then adding it back to the folder (thus=20
> deploying it and recreating the JavaBridge=20
> folder--effectively reinstalling the bridge)
>=20
> Also, make sure that PHP does NOT load the php_java=20
> extension. It doesn't need it and it may be where the=20
> function is already being declared.
>=20
> Hope this helps.
>=20
> --Nathan Shaskin
> Compliance Publishing
>=20
>=20
> php...@li... wrote: Help! I=20
> ran into a bizarre problem that I simply don't understand.
>=20
> As soon as I include the PHP/Java bridge in my code (i.e. as=20
> soon as I include the following statement in my PHP file):
> ------------------------------
> ... require_once('http://localhost:8080/JavaBridge/java/Java.inc');=20
> ...
> ------------------------------
>=20
> I am getting the following PHP error:=20
> ------------------------------
> Fatal error: Cannot redeclare java_last_exception_get() in=20
> http://localhost:8080/JavaBridge/java/Java.inc on line 1431
> ------------------------------
>=20
> Not only is the include done using "require_ONCE()"=20
> (capitalization here for emphasis only), but the Java.inc=20
> also is internally additionally guarded by:
> ------------------------------
> =20
> if(!function_exists("java_get_base")) {
> ...
> function java_get_base() {
> ...
> }
> ... lost of stuff among them also:
> function java_last_exception_get() {
> ...
> }
> }
> ?>
> ------------------------------
>=20
> So, IMHO it should NEVER EVER be possible that anything=20
> contained in this file is ever redeclared. And why is the=20
> error only at the function "java_last_exception_get(...)"=20
> which is somewhere after the middle of the file, while there=20
> are lots of other functions declared before it, which - if=20
> for some reason the file would indeed be re-read - should=20
> already cause errors much earlier...
>=20
> I simply don't understand what's going in here. Anyone who=20
> had similar encounters and/or can shed some light onto this?
>=20
> I am using this XAMPP v1.6.3a (a ready-packed combination of=20
> Apache v2.2.4 & PHP v5.2.3 & Zend Optimizer v3.3.0 & MySQL=20
> v5.0.45 - see
> http://www.apachefriends.org/en/xampp-windows.html) plus the=20
> Tomcat v6.10.13 -addon (on which I run the JavaBridge.war file).
>=20
> on WinXP Pro.
>=20
> Michael
>=20
>=20
> --------------------------------------------------------------
> -----------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and=20
> a browser. Download your FREE copy of Splunk now >> =20
> http://get.splunk.com/
_______________________________________________
> php-java-bridge-users mailing list=20
> php...@li...
> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
>=20
>=20
> =20
> ---------------------------------
> Take the Internet to Go: Yahoo!Go puts the Internet in your=20
> pocket: mail, news, photos & more.=20
> --------------------------------------------------------------
> -----------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and=20
> a browser. Download your FREE copy of Splunk now >> =20
> http://get.splunk.com/
_______________________________________________
> php-java-bridge-users mailing list=20
> php...@li...
> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
>=20
|
|
From: <php...@li...> - 2007-09-07 21:00:45
|
I believe I ran into the same error at one point. If I remember right, the way I fixed it was by removing the war file from Tomcat completely, deleting the folder named JavaBridge in the Tomcat folder (if this fails you'll need to restart first), then adding it back to the folder (thus deploying it and recreating the JavaBridge folder--effectively reinstalling the bridge)
Also, make sure that PHP does NOT load the php_java extension. It doesn't need it and it may be where the function is already being declared.
Hope this helps.
--Nathan Shaskin
Compliance Publishing
php...@li... wrote: Help! I ran into a bizarre problem that I simply don't understand.
As soon as I include the PHP/Java bridge in my code (i.e. as soon as I
include the following statement in my PHP file):
------------------------------
...
require_once('http://localhost:8080/JavaBridge/java/Java.inc');
...
------------------------------
I am getting the following PHP error:
------------------------------
Fatal error: Cannot redeclare java_last_exception_get() in
http://localhost:8080/JavaBridge/java/Java.inc on line 1431
------------------------------
Not only is the include done using "require_ONCE()" (capitalization
here for emphasis only), but the Java.inc also is internally
additionally guarded by:
------------------------------
if(!function_exists("java_get_base")) {
...
function java_get_base() {
...
}
... lost of stuff among them also:
function java_last_exception_get() {
...
}
}
?>
------------------------------
So, IMHO it should NEVER EVER be possible that anything contained in
this file is ever redeclared.
And why is the error only at the function
"java_last_exception_get(...)" which is somewhere after the middle of
the file, while there are lots of other functions declared before it,
which - if for some reason the file would indeed be re-read - should
already cause errors much earlier...
I simply don't understand what's going in here. Anyone who had similar
encounters and/or can shed some light onto this?
I am using this XAMPP v1.6.3a (a ready-packed combination of Apache
v2.2.4 & PHP v5.2.3 & Zend Optimizer v3.3.0 & MySQL v5.0.45 - see
http://www.apachefriends.org/en/xampp-windows.html) plus the Tomcat
v6.10.13 -addon (on which I run the JavaBridge.war file).
on WinXP Pro.
Michael
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
php-java-bridge-users mailing list
php...@li...
https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
---------------------------------
Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more.
|
|
From: <php...@li...> - 2007-09-07 20:39:22
|
Help! I ran into a bizarre problem that I simply don't understand.
As soon as I include the PHP/Java bridge in my code (i.e. as soon as I
include the following statement in my PHP file):
------------------------------
...
require_once('http://localhost:8080/JavaBridge/java/Java.inc');=20
...
------------------------------
I am getting the following PHP error:=20
------------------------------
Fatal error: Cannot redeclare java_last_exception_get() in
http://localhost:8080/JavaBridge/java/Java.inc on line 1431
------------------------------
Not only is the include done using "require_ONCE()" (capitalization
here for emphasis only), but the Java.inc also is internally
additionally guarded by:
------------------------------
<?php
=20
if(!function_exists("java_get_base")) {
...
function java_get_base() {
...
}
... lost of stuff among them also:
function java_last_exception_get() {
...
}
}
?>
------------------------------
So, IMHO it should NEVER EVER be possible that anything contained in
this file is ever redeclared.
And why is the error only at the function
"java_last_exception_get(...)" which is somewhere after the middle of
the file, while there are lots of other functions declared before it,
which - if for some reason the file would indeed be re-read - should
already cause errors much earlier...
I simply don't understand what's going in here. Anyone who had similar
encounters and/or can shed some light onto this?
I am using this XAMPP v1.6.3a (a ready-packed combination of Apache
v2.2.4 & PHP v5.2.3 & Zend Optimizer v3.3.0 & MySQL v5.0.45 - see
http://www.apachefriends.org/en/xampp-windows.html) plus the Tomcat
v6.10.13 -addon (on which I run the JavaBridge.war file).
on WinXP Pro.
Michael
|
|
From: <php...@li...> - 2007-09-07 10:12:12
|
Hi, > I don't know how to reproduce, but we have a nightly cron job that runs a > cli php script, and after a few weeks there are usually a couple processes > hanging around. do these processes still exist? Can you do a "ps auxwf" please? > I'll make a note to add a ticket when I see that next. I've just looked at the code. The JVM is started in the MINIT procedure and terminated (via kill SIGTERM, kill SIGTETM, kill -9 ...) in the MSHUTDOWN procedure. So if the PHP executable hangs, this means that the PHP MSHUTDOWN procedure hasn't been called (which used to happen with recent PHP binaries, when called with a zero-length PHP script); it means that there is a bug in your PHP CLI binary. Please either do not use this PHP CLI binary or start Java as an external process. > > However, the PHP/Java Bridge shouldn't be used that way. Please start Java > > as an external process. > I'm not sure how to do this (or how I'm not doing it). Please see the README or INSTALL.* documents from the binary download. Or this link http://www.ibm.com/developerworks/aix/library/au-javaphpaix5/ for a detailed description how to install the bridge. > So, the scripts that are hanging around do not actually invoke anything Java > in the PHP code. As I've said. If you ask PHP to start a JVM attached to it and the JVM does not terminate (probably due to a bug in the PHP), PHP will hang. Please see the documentation that comes with the PHP/Java Bridge download to see how to change it. Regards, Jost Boekemeier __________________________________ Yahoo! Clever: Sie haben Fragen? Yahoo! Nutzer antworten Ihnen. www.yahoo.de/clever |
|
From: <php...@li...> - 2007-09-06 16:16:37
|
> > Hi, > > > command-line PHP processes hanging around after they are completed. I'm > > using PHP4 and php-java-bridge 4.1.8 built from source on a 64bit Linux > box. > > if you start the Java VM as a subcomponent of PHP and the JVM refuses to > terminate, the PHP main > process will wait forever. > > Can you reproduce this problem? If so, can you please open a ticket and > attach the result of an > strace -s 1024 -ff ... at the end of that ticket? I don't know how to reproduce, but we have a nightly cron job that runs a cli php script, and after a few weeks there are usually a couple processes hanging around. I'll make a note to add a ticket when I see that next. > > However, the PHP/Java Bridge shouldn't be used that way. Please start Java > as an external process. > I'm not sure how to do this (or how I'm not doing it). This is the procedure: 1. I ask sys admin to install php-java-bridge 4.1.8 2. He does it 3. I spend time test driving it, while our current production code continues to function without USING it. (it's a small shop, and we do development and production on the same box) So, the scripts that are hanging around do not actually invoke anything Java in the PHP code. Is the subcomponent vs. external process a result of a decision made during the install process? A configuration option? We're running the bridge as a php module. With PHP4 and no J2EE container engine servlet thingy (don't know the terminology at all here), it was my impression this was our only option. Michael |
|
From: <php...@li...> - 2007-09-06 08:09:08
|
Hi,
> command-line PHP processes hanging around after they are completed. I'm
> using PHP4 and php-java-bridge 4.1.8 built from source on a 64bit Linux box.
if you start the Java VM as a subcomponent of PHP and the JVM refuses to terminate, the PHP main
process will wait forever.
Can you reproduce this problem? If so, can you please open a ticket and attach the result of an
strace -s 1024 -ff ... at the end of that ticket?
However, the PHP/Java Bridge shouldn't be used that way. Please start Java as an external process.
Regards,
Jost Boekemeier
Die etwas anderen Infos rund um das Thema Reisen. BE A BETTER WELTENBUMMLER! www.yahoo.de/clever
|
|
From: <php...@li...> - 2007-09-05 18:45:31
|
Since installing the bridge I have noticed an intermittent problem with command-line PHP processes hanging around after they are completed. I'm using PHP4 and php-java-bridge 4.1.8 built from source on a 64bit Linux box. Has anybody else had this problem? The scripts in question do not actually use the bridge at all. When I look in the process list, they have a JavaBridge.jar child process, and that, along with the fact that I never saw this before installing the bridge, leads me to believe that the problem is there. How would I even go about debugging this? Michael |
|
From: <php...@li...> - 2007-09-01 12:55:28
|
Hi, > Unable to call constructor, see the README section "Java platform issues" > for details. you need to copy all inter-library dependencies to the library dir. Are you sure that AdminBean (which probably exports the client stubs) is in the client directory? > This kind of problems made me use the HTTP which was the only one I could > make work. The java_require() method cannot be used to work around Java specific problems; since Java doesn't have a proper module system (compare the Java "CLASSPATH" with the code repository used by MS .NET), you must take care of library-dependencies yourself. These issues are usually solved by copying *all* libraries into the web application's private lib directory. But this method has the problem you've mentioned. When loading the same classes multiple times via different classloaders, the VM quickly runs out of memory. Example: https://www.redhat.com/docs/manuals/jboss/jboss-eap-4.2/readme-de-DE.html#issue8 Regards, Jost Boekemeier __________________________________ Yahoo! Clever - Der einfachste Weg, Fragen zu stellen und Wissenswertes mit Anderen zu teilen. www.yahoo.de/clever |