Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Right-click on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
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
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
|
|
|
|
1
|
2
(2) |
3
|
4
|
5
(1) |
6
|
7
|
8
|
9
|
10
(1) |
11
|
12
|
13
|
14
(1) |
15
|
16
|
17
(2) |
18
(1) |
19
|
20
|
21
|
22
|
23
|
24
(2) |
25
(2) |
26
(2) |
27
(1) |
28
|
29
|
30
|
31
(4) |
|
|
|
|
|
From: Peter Niederlag <pn@kr...> - 2005-01-31 21:58:16
|
Hi, Jost Boekemeier schrieb: >>OK, here you go, since the log-file is 70k I just >>put it online [1] > > > Your link is not accessible for me. Is it possible to > search for the lines which contain "returning map for" > and post these only? sorry, must have been a temporarily problem... anyway: -------------snipp------------------------ Jan 31 21:04:26 JavaBridge DEBUG: returning map for class [Lorg.omg.WfBase.NameValue; Jan 31 21:04:26 JavaBridge DEBUG: end packet: 1 Jan 31 21:04:26 JavaBridge DEBUG: recv: 15 Jan 31 21:04:26 JavaBridge DEBUG: end packet: 1 Jan 31 21:04:26 JavaBridge DEBUG: recv: 2 Jan 31 21:04:26 JavaBridge DEBUG: end packet: 1 Jan 31 21:04:26 JavaBridge DEBUG: recv: 2 Jan 31 21:04:26 JavaBridge DEBUG: end packet: 1 Jan 31 21:04:26 JavaBridge DEBUG: recv: 54 Jan 31 21:04:26 JavaBridge DEBUG: end packet: 36 Jan 31 21:04:26 JavaBridge DEBUG: recv: 18 Jan 31 21:04:26 JavaBridge DEBUG: end packet: 1 Jan 31 21:04:26 JavaBridge DEBUG: recv: 8 Jan 31 21:04:26 JavaBridge DEBUG: end packet: 1 Jan 31 21:04:26 JavaBridge DEBUG: recv: 17 Jan 31 21:04:26 JavaBridge DEBUG: end packet: 1 Jan 31 21:04:26 JavaBridge DEBUG: recv: 50 Jan 31 21:04:26 JavaBridge DEBUG: send: SETRESULTFROMOBJECT Jan 31 21:04:26 JavaBridge DEBUG: recv: 15 Jan 31 21:04:26 JavaBridge DEBUG: recv: 0 Jan 31 21:04:26 JavaBridge DEBUG: send: 0 Jan 31 21:04:26 JavaBridge DEBUG: end packet: 1 Jan 31 21:04:26 JavaBridge DEBUG: recv: 55 Jan 31 21:04:26 JavaBridge DEBUG: end packet: 37 Jan 31 21:04:26 JavaBridge DEBUG: recv: 55 Jan 31 21:04:26 JavaBridge DEBUG: end packet: 37 Jan 31 21:04:26 JavaBridge DEBUG: recv: 54 Jan 31 21:04:26 JavaBridge DEBUG: end packet: 36 Jan 31 21:04:26 JavaBridge DEBUG: recv: 18 Jan 31 21:04:26 JavaBridge DEBUG: end packet: 1 Jan 31 21:04:26 JavaBridge DEBUG: recv: 8 Jan 31 21:04:26 JavaBridge DEBUG: end packet: 1 Jan 31 21:04:26 JavaBridge DEBUG: recv: 17 Jan 31 21:04:26 JavaBridge DEBUG: end packet: 1 Jan 31 21:04:26 JavaBridge DEBUG: recv: 50 Jan 31 21:04:26 JavaBridge DEBUG: send: SETRESULTFROMSTRING .... .... java.lang.Throwable: child aborted connection during read at JavaBridge.setResultFromObject(Native Method) at JavaBridge.setResult(JavaBridge.java:588) at JavaBridge.Invoke(JavaBridge.java:916) at JavaBridge.trampoline(Native Method) at JavaBridge.Trampoline(JavaBridge.java:237) at JavaBridge.trampoline(Native Method) at JavaBridge.Trampoline(JavaBridge.java:237) at JavaBridge.trampoline(Native Method) at JavaBridge.Trampoline(JavaBridge.java:237) at JavaBridge.handleRequests(Native Method) at JavaBridge.run(JavaBridge.java:221) at java.lang.Thread.run(Thread.java:536) Jan 31 21:04:26 JavaBridge DEBUG: communication broken: ffffffff Jan 31 21:04:26 JavaBridge DEBUG: terminate communication channel: 817eff0 ----------snapp----------------------------------- >>It involves >>heavy usage of CORBA, so that might be causing the >>problem? > > > Could be, if you don't unwrap the value you've > received -- hmm, what does unwrap mean? I'll have a look at the EJB rmi(iiop example... > version 1.0.8 contains an example which > connects to a EJB service via rmi/iiop, so this should > work in general. Yes, just switched to cvs/1.0.8 yesterday, haven't looked into those examples yet. >>[1] http://www.niekom.de/pub/php-java-bridge.log > > > I get a "unable to connect". see above, but the link should generally be working. Cheers, Peter |
From: Peter Niederlag <pn@kr...> - 2005-01-31 21:57:30
|
Hi, Jost Boekemeier schrieb: > Hi, > > >>public NameValue[] process_context >>$nameValues = $activity->process_context(); >>So far I couldn't figure out a way how to iterate through all the >>elements of the returned array in PHP. > > > $Array = new java_class("java.lang.reflect.Array"); > for($i=0; $i<$Array->getLength($nameValues); $i++) > echo $nameValues[i] . "\n"; > > should work if you have PHP5 (please see > tests.php5/arrayInterface.php). PHP5 is quite OK. Works perfect this way, Thx! (I looked at all the tests and examples already but didn't manage to adjust it to my problem correctly) > In PHP4 the bridge uses the same method > as the ext/java: it copies all elements from the java array into a PHP > hashtable $nameValues. I don't know at the moment how it is possible to > ask a PHP hash table for its length. Sorry, no help from me. :-< [...] >>'foreach ($nameValues as $value) { echo "soemthing" }' work. > > > This should work in both PHP4 and PHP5, please see > tests.php5/iteratorInterface.php. The example uses a Map, but > getPhpMap() works for Arrays, Maps and Collections. > > Can you please set the log level to debug and send the result? I am > looking for the output of: logDebug("returning map for "+ > value.getClass()); OK, here you go, since the log-file is 70k I just put it online [1] instead of posting it to the list. What I am doing is only proof-of-concept for an exam, no production-code. performancewise(and stability) I should probably rather do a lot of the stuff in a native java-library instead. It involves heavy usage of CORBA, so that might be causing the problem? Although, it pretty much looks like it was really possible to use a java CORBA-library within PHP. >>Do I need to modify the native Java-Class so it provides another >>java-interface(collection,ArrayList)? > > > Not necessary. I think that for some reason the value is neither an > Array, nor a Map or Collection. We'll see. hopefully it is of some help... [1] http://www.niekom.de/pub/php-java-bridge.log Big thx, Peter |
From: Jost Boekemeier <jost2345@ya...> - 2005-01-31 18:32:28
|
Hi, > public NameValue[] process_context > $nameValues = $activity->process_context(); > So far I couldn't figure out a way how to iterate through all the > elements of the returned array in PHP. $Array = new java_class("java.lang.reflect.Array"); for($i=0; $i<$Array->getLength($nameValues); $i++) echo $nameValues[i] . "\n"; should work if you have PHP5 (please see tests.php5/arrayInterface.php). In PHP4 the bridge uses the same method as the ext/java: it copies all elements from the java array into a PHP hashtable $nameValues. I don't know at the moment how it is possible to ask a PHP hash table for its length. > It seems not possible to access the java.length property '$nameValues->length' The bridge accesses java via reflection. For some reasons Sun decided to wrap arrays differently (via a separate java.lang.reflect.Array interface). > 'foreach ($nameValues as $value) { echo "soemthing" }' work. This should work in both PHP4 and PHP5, please see tests.php5/iteratorInterface.php. The example uses a Map, but getPhpMap() works for Arrays, Maps and Collections. Can you please set the log level to debug and send the result? I am looking for the output of: logDebug("returning map for "+ value.getClass()); > Do I need to modify the native Java-Class so it provides another > java-interface(collection,ArrayList)? Not necessary. I think that for some reason the value is neither an Array, nor a Map or Collection. We'll see. Jost |
From: Peter Niederlag <pn@kr...> - 2005-01-31 10:07:42
|
Hi, for a few days I have been testing the php-java-bridge and I must admit it seems pretty mature and useful. :-> One slight problem remains though. I do need to call a java-method which will return a (dynamic sized)Java-Array of Java-Objects. signature of the java-method: public NameValue[] process_context() usage via php-java-bridge: $nameValues = $activity->process_context(); So far I couldn't figure out a way how to iterate through all the elements of the returned array in PHP. It seems not possible to access the java.length property '$nameValues->length' nor will a 'foreach ($nameValues as $value) { echo "soemthing" }' work. Are there any means available so I can determine how many elements are in $nameValues? I did see the provided examples and manual regarding the use of arrays but I am not quite sury about it yet. ;( Do I need to modify the native Java-Class so it provides another java-interface(collection,ArrayList)? Thx, Peter |
From: Jost Boekemeier <jost2345@ya...> - 2005-01-27 19:34:35
|
> On 27/01/2005, at 4:00, Jost Boekemeier wrote: > > >> PHP Fatal error: Cannot override final method > >> java::?B?() in Unknown on > > I could reproduce this problem. I am trying to fix > this for version 1.0.8, thanks for reporting it. The above problem goes away when you distclean the php directory and remove all references to the old ext/java bridge and then re-build. I have compiled the bridge with TCP sockets directly into PHP 4.3.9 and compiled it into a CGI binary. As far as I can tell, the bridge works as it should. Jost ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 250MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: Paul Schaap <poorly@ma...> - 2005-01-26 21:10:12
|
Jost, Great, thankyou for this. I will test this out myself, and if reproducible I'll report it as a bug to apple. REGARDS Paul On 27/01/2005, at 4:00, Jost Boekemeier wrote: >> PHP Fatal error: Cannot override final method >> java::?B?() in Unknown on I could reproduce this problem. I am trying to fix this for version 1.0.8, thanks for reporting it. [Apple JDK 1.4 crashes after running the scheme-demo for one hour] I have just tested 1.3 on OSX 10.2. It seems that Apple's java 1.3 is worse than 1.4, it took down the OSX 10.2 machine immediately! I don't know why this happens; I cannot think of any reason why starting 4 java threads could crash the entire operating system... I think we should document that the Apple Java VM is not supported and that we wait until Mac OSX 10.4 is available. Jost --- To run the test you need the "kawa.jar", which is available at http://www.fsf.org/software/kawa or at php-java-bridge.sf.net/kawa.jar. The test follows: import java.lang.*; import kawa.standard.*; public class test implements Runnable { public void run() { try { while (true) { Scheme s = new Scheme(); s.eval(" (letrec ((f (lambda(v) (if (= v 0) 1 (* (f (- v 1)) v))))) (f 155)) "); } } catch(Throwable t) {t.printStackTrace();} } public static void main(String s[]) throws Throwable { (new Thread(new test())).start(); (new Thread(new test())).start(); (new Thread(new test())).start(); (new Thread(new test())).start(); // terminate test after 10sec Thread.sleep(10000); } } ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 250MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: Jost Boekemeier <jost2345@ya...> - 2005-01-26 17:01:08
|
> > PHP Fatal error: Cannot override final method > > java::?B?() in Unknown on I could reproduce this problem. I am trying to fix this for version 1.0.8, thanks for reporting it. [Apple JDK 1.4 crashes after running the scheme-demo for one hour] I have just tested 1.3 on OSX 10.2. It seems that Apple's java 1.3 is worse than 1.4, it took down the OSX 10.2 machine immediately! I don't know why this happens; I cannot think of any reason why starting 4 java threads could crash the entire operating system... I think we should document that the Apple Java VM is not supported and that we wait until Mac OSX 10.4 is available. Jost --- To run the test you need the "kawa.jar", which is available at http://www.fsf.org/software/kawa or at php-java-bridge.sf.net/kawa.jar. The test follows: import java.lang.*; import kawa.standard.*; public class test implements Runnable { public void run() { try { while (true) { Scheme s = new Scheme(); s.eval(" (letrec ((f (lambda(v) (if (= v 0) 1 (* (f (- v 1)) v))))) (f 155)) "); } } catch(Throwable t) {t.printStackTrace();} } public static void main(String s[]) throws Throwable { (new Thread(new test())).start(); (new Thread(new test())).start(); (new Thread(new test())).start(); (new Thread(new test())).start(); // terminate test after 10sec Thread.sleep(10000); } } ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 250MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: Jost Boekemeier <jost2345@ya...> - 2005-01-25 20:46:13
|
> PHP Fatal error: Cannot override final method > java::?B?() in Unknown on I will try to reproduce this problem when the SF ppc-osx2 is available again. > indicates we can > > use 1.2, 1.3, 1.3.1, and 1.4.2 with 1.4.2 being > the default, would it > > be worth trying a different version ? The latest 1.4 seems to run okay if I switch off the compiler, 1.3 and earlier are no longer supported, the bridge uses features from 1.4 (exception chaining). However, when the JIT is enabled the scheme-demo (which is a pure java test) crashes after one hour. I will test against java 1.5 when it is available for OSX. Until then please run the server part on a different operating system, for example RHEL3 for PPC with IBM java 1.4.1, please see -> http://www-106.ibm.com/developerworks/java/jdk/linux/tested.html Jost ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 250MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: Poorly <poorly@ma...> - 2005-01-25 05:43:51
|
Hi Jost, OK, I compiled the bridge (with the extern patch) in with PHP (5.0.3) successfully as per the windows method but when starting apache I get the following in the error_log, which is part of the same error I had with the extension version :- PHP Fatal error: Cannot override final method java::?B?() in Unknown on line 0 PHP Fatal error: Cannot override final method java::?B?() in Unknown on line 0 PHP Fatal error: Cannot override final method java_exception::?B?() in Unknown on line 0 PHP Info Java section says :- java support Enabled java bridge 1.0.8 java command JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home LD_LIBRARY_PATH=/usr/local/lib/php/extensions/no-debug-non-zts-20041030 /System/Library/Frameworks/JavaVM.framework/Home/bin/java -Djava.library.path=/usr/local/lib/php/extensions/no-debug-non-zts-20041030 -Djava.class.path=/usr/local/lib/php/extensions/no-debug-non-zts-20041030 -Djava.awt.headless=true JavaBridge /var/tmp//.php_java_bridgehkq3uI 0 '' java.libpath /usr/local/lib/php/extensions/no-debug-non-zts-20041030 java.classpath /usr/local/lib/php/extensions/no-debug-non-zts-20041030 java.java_home /System/Library/Frameworks/JavaVM.framework/Home java.java /System/Library/Frameworks/JavaVM.framework/Home/bin/java java.log_file <stdout> java.log_level 0 java status not running And when I go to a test page I get :- Fatal error: php_mod_java(52): Could not connect to server: Socket operation on non-socket -- Have you started the java bridge? in /Library/WebServer/Documents/phpjava.php on line 2 I've also tried hacking the Makefiles to add in -flat_namespaces and -export-dynamic but still no luck. CHEERS Paul > Jost, > >>[please excuse the delay] >> >> >> > No problem, I appreciate the help. > >> >> >>>-ZEND_DECLARE_MODULE_GLOBALS(java) >>>+extern ZEND_DECLARE_MODULE_GLOBALS(java) >>> >>> >> >>Thanks. I will commit this shortly. >> >> >> >> >>>-libtoolize -f >>>+glibtoolize -f >>> >>> >> >> >>We need the gnu autoconf/automake/libtool anyway as the apple versions >>(at least the installation at SF) don't work properly. So I think the >>change is not necessary. >> >> >> >> >>>java.lang.UnsatisfiedLinkError: no natcJavaBridge in java.library.path >>> at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1517) >>> at java.lang.Runtime.loadLibrary0(Runtime.java:788) >>> at java.lang.System.loadLibrary(System.java:834) >>> at JavaBridge.main(JavaBridge.java:520) >>> >>> >> >>Which java version have you used? BTW: Are there other java >>implementations than the one from apple? The apple JIT crashes after >>running the bridge for one hour. I don't think it's a problem with the >>bridge but rather a bug in the JIT; running a pure java version of the >>scheme-demo has the same effect. >> >> >> > As far as I know apples implementation is the only one. Mind you > /System/Library/Frameworks/JavaVM.framework/Versions/ indicates we can > use 1.2, 1.3, 1.3.1, and 1.4.2 with 1.4.2 being the default, would it > be worth trying a different version ? > >> >> >>>dyld: /usr/sbin/httpd Undefined symbol >>>_php_info_print_table_end >>> >>> >> >>No idea what this is (I haven't tested apache, yet). But it sounds as >>if the dynamic loader cannot re-export symbols from a dynamic library: >>apache dlopen()s PHP which in turn must dlopen() the bridge in such a >>way that the PHP symbols are exported to the bridge. >> >> > apples dynamic loader weirdness :-). I'll google a bit on the > "re-export" clue ... > >>The fact that the httpd complains about missing symbols rather than PHP >>doesn't sound good, maybe it's an issue with PHP not invoking dlopen() >>correctly on this system. It might be necessary to compile the bridge >>directly into PHP; please see the windows install instructions for >>details. >> >> >> >> > I'll have a go at that too. > > Also I'm running an up to date Panther (10.3.7) build, but I am > running a home brew php-5.0.3 so I'll also try reverting to the > default php-4.3.? and see if it works there. > >>Jost >> >> >> >> > > CHEERS > Paul |
From: Poorly <poorly@ma...> - 2005-01-24 22:34:50
|
Jost, >[please excuse the delay] > > > No problem, I appreciate the help. > > >>-ZEND_DECLARE_MODULE_GLOBALS(java) >>+extern ZEND_DECLARE_MODULE_GLOBALS(java) >> >> > >Thanks. I will commit this shortly. > > > > >>-libtoolize -f >>+glibtoolize -f >> >> > > >We need the gnu autoconf/automake/libtool anyway as the apple versions >(at least the installation at SF) don't work properly. So I think the >change is not necessary. > > > > >>java.lang.UnsatisfiedLinkError: no natcJavaBridge in java.library.path >> at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1517) >> at java.lang.Runtime.loadLibrary0(Runtime.java:788) >> at java.lang.System.loadLibrary(System.java:834) >> at JavaBridge.main(JavaBridge.java:520) >> >> > >Which java version have you used? BTW: Are there other java >implementations than the one from apple? The apple JIT crashes after >running the bridge for one hour. I don't think it's a problem with the >bridge but rather a bug in the JIT; running a pure java version of the >scheme-demo has the same effect. > > > As far as I know apples implementation is the only one. Mind you /System/Library/Frameworks/JavaVM.framework/Versions/ indicates we can use 1.2, 1.3, 1.3.1, and 1.4.2 with 1.4.2 being the default, would it be worth trying a different version ? > > >>dyld: /usr/sbin/httpd Undefined symbol >>_php_info_print_table_end >> >> > >No idea what this is (I haven't tested apache, yet). But it sounds as >if the dynamic loader cannot re-export symbols from a dynamic library: >apache dlopen()s PHP which in turn must dlopen() the bridge in such a >way that the PHP symbols are exported to the bridge. > > apples dynamic loader weirdness :-). I'll google a bit on the "re-export" clue ... >The fact that the httpd complains about missing symbols rather than PHP >doesn't sound good, maybe it's an issue with PHP not invoking dlopen() >correctly on this system. It might be necessary to compile the bridge >directly into PHP; please see the windows install instructions for >details. > > > > I'll have a go at that too. Also I'm running an up to date Panther (10.3.7) build, but I am running a home brew php-5.0.3 so I'll also try reverting to the default php-4.3.? and see if it works there. >Jost > > > > CHEERS Paul |
From: Jost Boekemeier <jost2345@ya...> - 2005-01-24 21:30:57
|
[please excuse the delay] > -ZEND_DECLARE_MODULE_GLOBALS(java) > +extern ZEND_DECLARE_MODULE_GLOBALS(java) Thanks. I will commit this shortly. > -libtoolize -f > +glibtoolize -f We need the gnu autoconf/automake/libtool anyway as the apple versions (at least the installation at SF) don't work properly. So I think the change is not necessary. > java.lang.UnsatisfiedLinkError: no natcJavaBridge in java.library.path > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1517) > at java.lang.Runtime.loadLibrary0(Runtime.java:788) > at java.lang.System.loadLibrary(System.java:834) > at JavaBridge.main(JavaBridge.java:520) Which java version have you used? BTW: Are there other java implementations than the one from apple? The apple JIT crashes after running the bridge for one hour. I don't think it's a problem with the bridge but rather a bug in the JIT; running a pure java version of the scheme-demo has the same effect. > dyld: /usr/sbin/httpd Undefined symbol > _php_info_print_table_end No idea what this is (I haven't tested apache, yet). But it sounds as if the dynamic loader cannot re-export symbols from a dynamic library: apache dlopen()s PHP which in turn must dlopen() the bridge in such a way that the PHP symbols are exported to the bridge. The fact that the httpd complains about missing symbols rather than PHP doesn't sound good, maybe it's an issue with PHP not invoking dlopen() correctly on this system. It might be necessary to compile the bridge directly into PHP; please see the windows install instructions for details. Jost |
From: Poorly <poorly@ma...> - 2005-01-18 00:41:50
|
Tag Jost, Yes that worked, I got it compiling fine, the diff for a full compile is=20 (note change to glibtoolize required for OSX) :- #########################################################################= ##### diff -urN php-java-bridge_1.0.8-pre/client.c php-java-bridge/client.c --- php-java-bridge_1.0.8-pre/client.c Sat Jan 8 03:27:33 2005 +++ php-java-bridge/client.c Tue Jan 18 10:00:13 2005 @@ -27,7 +27,7 @@ #include "java_bridge.h" #include "php_java.h" =20 -ZEND_DECLARE_MODULE_GLOBALS(java) +extern ZEND_DECLARE_MODULE_GLOBALS(java) =20 #ifdef JAVA_COMPILE_DEBUG static int check_error(proxyenv *jenv, char*msg TSRMLS_DC) { diff -urN php-java-bridge_1.0.8-pre/java_bridge.c=20 php-java-bridge/java_bridge.c --- php-java-bridge_1.0.8-pre/java_bridge.c Sat Jan 8 03:27:33 2005 +++ php-java-bridge/java_bridge.c Tue Jan 18 10:00:05 2005 @@ -13,7 +13,7 @@ #include <string.h> =20 =20 -ZEND_DECLARE_MODULE_GLOBALS(java) +extern ZEND_DECLARE_MODULE_GLOBALS(java) =20 static jobjectArray php_java_makeArray(int argc, pval** argv TSRMLS_DC); static jobject php_java_makeObject(pval* arg TSRMLS_DC); diff -urN php-java-bridge_1.0.8-pre/server/autogen.sh=20 php-java-bridge/server/autogen.sh --- php-java-bridge_1.0.8-pre/server/autogen.sh Sat Jan 8 03:27:33 20= 05 +++ php-java-bridge/server/autogen.sh Tue Jan 18 10:00:59 2005 @@ -3,6 +3,6 @@ aclocal autoheader autoconf -libtoolize -f +glibtoolize -f ln -s `which libtool` . automake -a --foreign #########################################################################= ##### BUT, its is never that easy is it :-( ... Now when trying to start apache I've had some problems :- 1) I was originally getting the following error before the dyld in 2)=20 below :- java.lang.UnsatisfiedLinkError: no natcJavaBridge in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1517) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:834) at JavaBridge.main(JavaBridge.java:520) So I made a softlink like so called libnatcJavaBridge.jnilib ->=20 libnatcJavaBridge.dylib (dylib being the OSX lib name [why, why, why])=20 and no longer get this error, good ! 2) But I now I'm stuck on :- PHP Fatal error: Cannot override final method java::?B?() in Unknown on=20 line 0 PHP Fatal error: Cannot override final method java::?B?() in Unknown on=20 line 0 PHP Fatal error: Cannot override final method java_exception::?B?() in=20 Unknown on line 0 dyld: /usr/sbin/httpd Undefined symbols: __convert_to_string __efree __emalloc __object_init_ex __safe_emalloc __zend_get_parameters_array __zend_hash_index_update_or_next_insert __zend_hash_init __zend_list_find __zval_copy_ctor __zval_dtor __zval_ptr_dtor _convert_to_object _get_active_function_name _php_info_print_table_end _php_info_print_table_row _php_info_print_table_start _zend_ce_arrayaccess _zend_class_implements _zend_error _zend_exception_get_default _zend_get_class_entry _zend_get_parameters_ex _zend_get_std_object_handlers _zend_hash_copy _zend_hash_get_current_data_ex _zend_hash_get_current_key_ex _zend_hash_index_find _zend_hash_internal_pointer_reset_ex _zend_hash_move_forward_ex _zend_hash_num_elements _zend_list_insert _zend_objects_new _zend_register_ini_entries _zend_register_internal_class _zend_register_internal_class_ex _zend_register_list_destructors_ex _zend_throw_exception_object _zend_unregister_ini_entries _zend_wrong_param_count _zval_add_ref FYI my php.ini currently has this (I've been playing around in here a=20 fair bit):- java.class.path =3D "/usr/local/lib/php/extensions/no-debug-non-zts-20041= 030" java.home =3D "/System/Library/Frameworks/JavaVM.framework/Home" java.library.path =3D=20 "/usr/local/lib/php/extensions/no-debug-non-zts-20041030" extension=3Djava.so [java] And /usr/local/lib/php/extensions/no-debug-non-zts-20041030 looks like=20 this :- -rwxr-xr-x 1 root staff 4073 18 Jan 10:52 JavaBridge$1.class -rwxr-xr-x 1 root staff 1739 18 Jan 10:52 JavaBridge$2.class -rwxr-xr-x 1 root staff 1519 18 Jan 10:52 JavaBridge$3.class -rwxr-xr-x 1 root staff 1751 18 Jan 10:52 JavaBridge$4.class -rwxr-xr-x 1 root staff 769 18 Jan 10:52 JavaBridge$PhpMap.class -rwxr-xr-x 1 root staff 17011 18 Jan 10:52 JavaBridge.class -rwxr-xr-x 1 root staff 129892 18 Jan 10:52 java.so -rwxr-xr-x 1 root staff 73236 18 Jan 10:52 libnatcJavaBridge.a -rwxr-xr-x 1 root staff 69508 18 Jan 10:52 libnatcJavaBridge.dylib lrwxr-xr-x 1 root staff 23 18 Jan 11:27 libnatcJavaBridge.jnilib=20 -> libnatcJavaBridge.dylib -rwxr-xr-x 1 root staff 79164 21 Dec 15:56 zlib.a -rwxr-xr-x 1 root staff 77116 21 Dec 15:56 zlib.so Thanks for the help. REGARDS Paul P.S. I fondly recall the BMW museum in M=FCnchen :-) ... coool >>ld: multiple definitions of symbol _java_globals >> =20 >> >[...] > =20 > >>Typically these issues are resolved on OSX by using >>extern >> =20 >> > >Hmm, there exists a ZEND_EXTERN_MODULE_GLOBALS. Maybe >we should change the ZEND_DECLARE_MODULE_GLOBALS in >client.c and java_bridge.c? > >In any case, I will look at the issue when I am back >in munich, at the end of the month. Thank you for >reporting this issue. > > >Jost > > > >=09 > =09 >___________________________________________________________=20 >Gesendet von Yahoo! Mail - Jetzt mit 250MB Speicher kostenlos - Hier anm= elden: http://mail.yahoo.de > =20 > |
From: Jost Boekemeier <jost2345@ya...> - 2005-01-17 17:03:13
|
> ld: multiple definitions of symbol _java_globals [...] > Typically these issues are resolved on OSX by using > extern Hmm, there exists a ZEND_EXTERN_MODULE_GLOBALS. Maybe we should change the ZEND_DECLARE_MODULE_GLOBALS in client.c and java_bridge.c? In any case, I will look at the issue when I am back in munich, at the end of the month. Thank you for reporting this issue. Jost ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 250MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: Paul Schaap <poorly@ma...> - 2005-01-17 12:42:55
|
Hi All, I've tried compiling the php-java-bridge (1.0.7 with a Makefile hack, and 1.0.8pre) on OSX and I run into the following error :- gcc -bundle -flat_namespace -undefined suppress -o .libs/java.so .libs/java.o .libs/java_bridge.o .libs/client.o .libs/proxyenv.o .libs/bind.o .libs/init_cfg.o ld: multiple definitions of symbol _java_globals .libs/java.o definition of _java_globals in section (__DATA,__common) .libs/java_bridge.o definition of _java_globals in section (__DATA,__common) .libs/client.o definition of _java_globals in section (__DATA,__common) make: *** [java.la] Error 1 Which (I think?) relates to the following from php_java.h :- #ifdef ZTS # define JG(v) TSRMG(java_globals_id, zend_java_globals *, v) #else # define JG(v) (java_globals.v) #endif Typically these issues are resolved on OSX by using extern, and no amount of my crappy ideas have worked so far :-). Can anyone give me any pointers ? CHEERS Paul |
From: Jost Boekemeier <jost2345@ya...> - 2005-01-14 11:18:26
|
[Please excuse the delay] > I"ve noticed that creating objects take much more time comparing to Java The jni/reflection/net overhead is currently somewhere between 2 .. 3.5. That means that PHP needs 2 (GNU) up to 3.5 (SUN) as much time to create a proxy through JNI. script1: [1 * CreateInstance + 1 * Invoke -> 0.0790050029755 sec] script2: [1 * PHP print + 4 * CreateInstance -> 0.458841085434 sec] I am not sure if your test is relevant. The PHP IO operation in script2 probably takes the most of the time. Both scripts probably include the times for the server connect sequence, which is currently quite expensive because the PHP/Java Bridge currently does not use persistent connections. So I think the above times are meaningless. Can you please run the benchmark in the tests.php5 folder and post the times? If you find that the interpreted(*) java method executes more than 2 or 3.5 times faster than the PHP method doing the same thing using JNI/Reflection calls, then we have to examine the network connection more closely: The performance also depends on the OS kernel and how fast it can push the bytes through the communication channel. Unix domain sockets are usually nearly as efficient as shared memory, but the throughput may vary from kernel to kernel; especially if your kernel is compiled with debug enabled, the delay becomes noticeable. Regards, Jost Boekemeier (*) The compiled java method is about 10 times faster than the interpreted java script. But that's normal behaviour, native machine code is always much faster than any interpreted script code. |
From: Marek Lewczuk <marek@le...> - 2005-01-10 19:56:48
|
Hello Jost, I'm writing about performance of php/java bridge. I've noticed that creating objects take much more time comparing to Java. I understand that some decrease of speed is natural, however this should not be so visible. Look at below benchmarks: - java package example; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFRow; import org.apache.poi.hssf.usermodel.HSSFCell; class exampleclass { public void exampleclass () { HSSFWorkbook workbook = new HSSFWorkbook(); HSSFSheet sheet = workbook.createSheet(); HSSFRow row = sheet.createRow(0); HSSFCell cell = row.createCell((short) 0); } } from php: $spreadsheet = new java("example.exampleclass"); ----------------------------------------------------------------- time 0.0790050029755 sec - php: print "\n\nFrom PHP:\n"; $workbook = new java("org.apache.poi.hssf.usermodel.HSSFWorkbook"); $sheet = $workbook->createSheet(); $row = $sheet->createRow(0); $cell = $row->createCell(0); ----------------------------------------------------------------- time 0.458841085434 sec Now, if you will create only php objects (without $spreadsheet = new java("example.exampleclass")) then is even slower - about 0.55 sec. Is this a normal behavior ? ML |
From: Jost Boekemeier <jost2345@ya...> - 2005-01-05 18:40:51
|
> You will see that instead of special chars like "ąść" there is "?". > UTF-8 should work ? Yes, of course. See attached png. But note that your OS must support UTF-8. For example: bash-2.05b$ echo $LANG de_DE.UTF-8 > $baseFont = new Java("com.lowagie.text.pdf.BaseFont"); > public static final boolean EMBEDDED = true; Yes, I see the problem. The spec says that bean properties are examined first. Which means that we have to call the method BaseFont.isEmbedded(), which will return the protected variable embedded. This is a) not what you want and b) does not work because baseFont is a class, not an instance. JSR 223 currently has the same problem. I think it is necessary to check for a real variable first, only if that fails we should call the property method. I check this against the current spec and will decide when I am back from vacation in three weeks. BTW: Of course, the new Java(...BaseFont) code above should throw an exception "class is abstract" instead of silently returning the class instead of the instance. This is one of the problems the bridge has inherited from the original php4 ext/java written by Sam Ruby. This will change with the 2.x versions, when we switch to the JSR code. Jost |
From: Jost Boekemeier <jost2345@ya...> - 2005-01-02 19:21:13
|
> /usr/local/jdk1.5.0 > protocol.h:11:17: jni.h: No such file or directory Yes. This is a problem with the autoconf script: "find" does not following symlinks, so the incline does not find the include directories: PHP_EVAL_INCLINE(`for i in \`find $PHP_JAVA/include -type d -print\`; do echo -n "-I$i "; done`) I will fix this bug for the version 1.0.8, which will be available at the end of this month. Until then please invoke make as follows: make "CFLAGS=-I/usr/local/jdk1.5.0/include -I/usr/local/jdk1.5.0/include/linux" Regards, Jost Boekemeier ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 250MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: Jost Boekemeier <jost2345@ya...> - 2005-01-02 19:06:08
|
http://php-java-bridge.sourceforge.net/php-java-bridge_1.0.8-pre.tar.bz2 The following bugs were fixed: * AM_INIT_AUTOMAKE is now correctly called after AC_CONFIG_AUX_DIR (Autoconf 1.8, Fedora Core 3). * The space reserved for the auto-generated socketname (java.socketname not set) was two elements too small (due to a typo). This caused problems with some malloc implementations. New Features: * Zend's "thread safety", "ZTS", supported: It is now possible to run the PHP/Java Bridge in a pure threaded Web-Server, for example httpd 2.x with the worker MPM. -- Threaded servers are usually faster than servers which fork() childs, but they are also more insecure (no process barrier). However, since the web-server threads communicate with the single java process through a secure proxy, the server part of PHP/Java Bridge is protected even if a hacker takes over the web-server. * Linux' abstract namespace (see unix(7)) supported. This means that no socket files are created on this operating system (-> increased performance and security). * Linux' struct ucred (see unix(7)) supported: The UID and GID are passed to the server-side. Since the credentials are provided by the kernel, it is impossible to fake the auth. information. * Improved logging: module, time, level, message. Version 1.0.8 will be released at the end of this month. ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 250MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |