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
|
2
(3) |
3
(2) |
4
(2) |
5
(3) |
6
|
7
|
8
|
9
(1) |
10
(2) |
11
(3) |
12
|
13
|
14
|
15
|
16
|
17
(2) |
18
(1) |
19
(1) |
20
|
21
(1) |
22
(3) |
23
|
24
|
25
|
26
(1) |
27
(1) |
28
|
29
|
30
(3) |
31
(2) |
|
|
|
From: Francis L. (QC/EMC) <fra...@er...> - 2005-08-31 14:43:14
|
Hi again ! I sent my email too early in the debug process... I found the problem: I supposed that the jdbc classes were in the jdk jar files, but they aren't. The log file was saying something like: Aug 31 08:10:16 JavaBridge INFO : try to load class com.mysql.jdbc.Driver Class loading error [...] Thanks for your tips! Francis -----Original Message----- From: Kai Londenberg [mailto:K.L...@li...] Subject: Re: [Php-java-bridge-users] jdbc and the bridge >Hi everyone, > >I am using the java-bridge for about 3 months now and it has been very stable, but yesterday I ran in to something really strange. > >In my java files, I create a java.sql.DriverManager object and I play with it. >If I use this object with the java-bridge, it does not complain about anything, but nothing happens in the DB. > >Any Idea about what's happening? >Thanks, Can you give an example, or better yet a test case which shows the problems ? Which version of the php java bridge do you use ? If it's not the latest version, try to update and then check if the problem still occurs. Also, If you can't create a test case outside of your development environment or don't have time for that - try to find out where the problem occurs - if the Java code gets called at all, if an exception occurs. Put the log level of the php-java bridge to 4 or higher and then look at the log whether any problem is reported. |
From: Kai L. <K.L...@li...> - 2005-08-31 08:39:35
|
On Tue, 30 Aug 2005 15:01:25 -0500, you wrote: >Hi everyone, > >I am using the java-bridge for about 3 months now and it has been very = stable, but yesterday I ran in to something really strange. > >In my java files, I create a java.sql.DriverManager object and I play = with it. >If I use this object with the java-bridge, it does not complain about = anything, but nothing happens in the DB. > >Any Idea about what's happening? >Thanks, Can you give an example, or better yet a test case which shows the problems ? Which version of the php java bridge do you use ? If it's not the latest version, try to update and then check if the problem still occurs. Also, If you can't create a test case outside of your development environment or don't have time for that - try to find out where the problem occurs - if the Java code gets called at all, if an exception occurs. Put the log level of the php-java bridge to 4 or higher and then look at the log whether any problem is reported. with best regards, Kai Londenberg ------------------------------- librics GmbH & Co. KG G=F6ttinger Chaussee 115 D-30459 Hannover Tel. +49 511 - 473 88 77 =46ax +49 511 - 473 88 78 mailto: K.L...@li... |
From: Francis L. (QC/EMC) <fra...@er...> - 2005-08-30 20:01:34
|
Hi everyone, I am using the java-bridge for about 3 months now and it has been very stable, but yesterday I ran in to something really strange. In my java files, I create a java.sql.DriverManager object and I play with it. If I use this object with the java-bridge, it does not complain about anything, but nothing happens in the DB. Any Idea about what's happening? Thanks, Francis Leblanc Ericsson Montreal |
From: Jost B. <jos...@ya...> - 2005-08-30 17:51:41
|
Hi Jonathan, --- "Abbett, Jonathan" <Jon...@ch...> schrieb: > The Java sessions I create with java_get_session > seem to disappear > awfully quickly. the default value is (or should be) 1400 seconds. It can be changed with: $session=java_get_session(..) $session->setTimeout(timeout_in_seconds); How fast does the session expire? We've had a bug in 2.0.6 where we passed 1400, but interpreted it as milliseconds. Regards, Jost Boekemeier ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: Abbett, J. <Jon...@ch...> - 2005-08-30 13:58:17
|
The Java sessions I create with java_get_session seem to disappear awfully quickly. How do I set a bigger maximum age for my session store (i.e. 20 minutes)? Thanks, Jon =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Jonathan Abbett Children's Hospital Informatics Program 1 Autumn Street, Fifth Floor Boston, MA 02215 617-355-8334 jon...@ch... http://www.chip.org |
From: Jost B. <jos...@ya...> - 2005-08-27 10:17:28
|
Hi Jonathan, > php_mod_java(59): Synchronization problem, rinit > with active connection called. thank you very much for this problem report. Now suddenly PR1202896 ("session still open in rinit") makes sense. The basic problem is the same that Bryan has reported, please see: http://sourceforge.net/mailarchive/forum.php?thread_id=7884155&forum_id=42415) Kai has already explained what what __sleep() means and how to store java objects. During client/server communication both the client and the server build a dictionary of (handle . object) pairs. When you serialize/deserialize a handle without restoring its server-side meaning the server and client suddenly use different dictionaries and very strange things may happen; it is like switching the language in the middle of a conversiation. In a sentence like "hier is gift", the server should better know that "gift" means "poison", otherwise it will get into trouble when the client asks to handle() it. Please use $session=java_get_session(<name>) to store java values. Okay, now how to handle the problem? We could implement the __sleep() and __wakeup() methods and abort script execution if they are called. But I think it shouldn't be too diffcult to implement them correctly: All we need is to move the pair from the globalRef into the session ref when _sleep() is called. __wakeup() is a little bit more complicated because we restore an object which has the old (client-side view) of the object identity and we receive an object from the session ref which has the correct identity. We must "patch" the restored object to contain the correct id and then discard the received object. I have created a ticket for this: PR1274526. In the meantime please use java_get_session() to store your java values. Regards, Jost Boekemeier ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: Abbett, J. <Jon...@ch...> - 2005-08-26 13:32:16
|
I'm seeing a bunch of strange stuff in my log files, not sure what to = make of it. =20 In my php_errors log file, right when I restart Apache: =20 [26-Aug-2005 08:52:27] PHP Notice: php_mod_java(57): waiting for server = another 14 seconds in Unknown on line 0 =20 =20 In my Apache error log, after I visit a page: =20 [client 10.1.150.118] PHP Fatal error: Exception thrown without a stack = frame in Unknown on line 0 [client 10.1.150.118] PHP Fatal error: php_mod_java(59): = Synchronization problem, rinit with active connection called. Cannot = continue, aborting now. Please report this to: = php...@li... = <mailto:php...@li...> in Unknown on line = 0, referer: http://ajax.ping.chip.org/viewer.php = <http://ajax.ping.chip.org/viewer.php>=20 =20 =20 I'm seeing this in my php-java-bridge.log file: =20 java.lang.NoSuchMethodException: __sleep(). Candidates: [] at php.java.bridge.JavaBridge.Invoke(JavaBridge.java:966) at php.java.bridge.Request.handleRequests(Request.java:190) at php.java.bridge.JavaBridge.run(JavaBridge.java:142) at php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:20) It looks like the php-java-bridge log error happens the first time I run = a particular page, then the "exception thrown without a stack frame," = etc. occurs when I try to rerun the page. At this point, my PHP pages = will stop responding until I restart Apache. =20 =20 The code snippet that's (probably) causing the problem: =20 GLOBAL $doctypes; =20 try { $pac =3D getPingActionClient(); $headersResult =3D $pac->readDocumentHeaders(getSessionVar('ticket'), = getSessionVar('username'), null); $documentHeaders =3D $headersResult->getDocumentHeader(); } catch (Exception $e) { log_write("[getDocumentHeaders] ERROR: $e"); log_write("[getDocumentHeaders] Returning null..."); } =20 $menu =3D ''; $buildlist =3D array(); $iter =3D $documentHeaders->iterator(); =20 while ($iter->hasNext()) { $header =3D $iter->next(); $docClass =3D $header->getDocumentClassification(); $urn =3D $docClass->getClassification(); if (isset($doctypes[$urn]) && !in_array($urn, $buildlist)) { $buildlist[] =3D $urn; $menu .=3D createMenuItem($doctypes[$urn]['display_name'], = $doctypes[$urn]['menu_url']) . "/n"; } } =20 It gets a list of "Document Headers," then iterates over them. Not too = complex. I'm using PHP5 with Apache2: full info at = http://ajax.ping.chip.org/info.php <http://ajax.ping.chip.org/info.php>=20 =20 I'm happy to provide more information, just ask. Any and all help is = most appreciated. =20 Thanks, Jon Abbett jon...@ch... |
From: Peter N. <pn...@kr...> - 2005-08-22 20:01:57
|
Hi, Jost Boekemeier schrieb: > Hi, > > a preview version of 2.0.8 is available for download: [...] > (The above download is for windows only, on Linux/Unix > please download the code directly from the CVS > repository: cvs -z3 > -d:pserver:ano...@cv...:/cvsroot/php-java-bridge > co php-java-bridge) OK this is first time I managed to get the .war successful deployed in tomcat4. ;) I just noticed one strange thing in handling the null-object: --------- test.php5/instanceof.php --------- If using *mod_php in apache* (using a browser and point it to tests.php5/instanceof.php) while connecting either via java_socketname=/var/run/.php-java-bridge_socket or via java_server=on $list->add(null) has problems: Fatal error: Uncaught [o:"java.lang.Exception: Invoke failed: [o:"[0, one]"]->add((java.lang.Object)o:"null"). Cause: java.lang.NullPointerException"] thrown in /var/www/lokal/test/php-java-bridge/tests.php5/instanceof.php on line 16 php5-cli does not have this problem for some reason. almost same thing seems to apply to ------ examples/php+jsp/oops.php ----- But this one *neither php5-cli or mod_php* like: error: Uncaught [o:"java.lang.Exception: CreateInstance failed: new java.lang.String(([B)o:"null"). Cause: java.lang.NullPointerException"] thrown in /var/www/lokal/test/php-java-bridge/examples/php+jsp/oops.php on line 6 first one seems kind of strange to me... FYI I am using php5.0.4 Cheers, Peter |
From: Peter N. <pn...@kr...> - 2005-08-22 12:22:08
|
Hi, Peter Niederlag schrieb: [...] > I think it should be possible to set the compiler-version via EXPORT > CC=gcc-3.3 but this seems not to work, probably becaus CC is set to gcc > in the Makefile. Yes, I am a fool. :-< Makefile is created by autoconf/configure whatsoever and of course reflects the the CC,CXX environment vars I do set. Still I think I haven't noticed this before: -----------snipp---------------- configure: WARNING: YOUR GCC INSTALLATION IS BROKEN. It tries to link with the same library for -m32 and -m64 builds. This may result in a "wrong ELF class" error at runtime. Although you can work around this bug at runtime by changing the LD_LIBRARY_PATH, we recommend to re-install the gcc compiler before youcontinue to install the PHP/Java Bridge. ----------snapp------------------ Everything seems to work now using gcc3-3 and g++-3.3 as the libs(java,php5) are all compiled with gcc-3.x. Don't know if it would work with gcc-4.0. Since I use the 'make CFLAGS="-m32"' now probably I shouldn't have any problems but still I'd like to know about that message, which sounds somewhat scaring to me. Cheers, Peter |
From: Peter N. <pn...@kr...> - 2005-08-22 09:49:34
|
Hi there, as some of you might know debian is moving the testing/unstable distribution to a new default compiler(gcc 3.x -> gcc 4). So far compiling the bridge has always been a pleasure. ;) Yesterday I updated to gcc 4. Now the bridge complains: configure: WARNING: YOUR GCC INSTALLATION IS BROKEN. It tries to link with the same library for -m32 and -m64 builds. This may result in a "wrong ELF class" error at runtime. Although you can work around this bug at runtime by changing the LD_LIBRARY_PATH, we recommend to re-install the gcc compiler before youcontinue to install the PHP/Java Bridge. I think it should be possible to set the compiler-version via EXPORT CC=gcc-3.3 but this seems not to work, probably becaus CC is set to gcc in the Makefile. I know this is most likely my fault or a problem with debian, still I would appreciate if anyone of you got a hint to solve this. Thx, Peter |
From: Jost B. <jos...@ya...> - 2005-08-21 12:14:09
|
Hi, a preview version of 2.0.8 is available for download: http://prdownloads.sourceforge.net/php-java-bridge/php-java-bridge_2.0.8pre3.zip?download (The above download is for windows only, on Linux/Unix please download the code directly from the CVS repository: cvs -z3 -d:pserver:ano...@cv...:/cvsroot/php-java-bridge co php-java-bridge) For production systems please use version 2.0.7 instead. The following features were added: * JSP, PHP session sharing * GUI support * Calling PHP from java, see the examples/XML example. Changes since 2.0.8pre * Local channel re-directs work correctly now. This means that, when deployed in Apache/Tomcat, Apache/PHP and the PHP/Java Bridge 2.0.8 deliver content more than 50 times faster than version 2.0.7 and about 30% faster than tomcat's own engine via Apache/mod_jk: time for i in `seq 200`; do wget -o/dev/null -O/dev/null http://localhost:8000/JavaBridge/sessionSharing.jsp; done real 0m5.971s user 0m1.090s sys 0m0.420s time for i in `seq 200`; do wget -o/dev/null -O/dev/null http://localhost:8000/JavaBridge/sessionSharing.php; done real 0m4.351s user 0m1.140s sys 0m0.530s (RHEL3, kernel 2.4.21 on a 1.5GHZ amd32, latest versions of PHP/Java Bridge, Tomcat/mod_jk and Apache. * On windows: Starting the backend automatically should work correctly now when the path ends with a slash. * The CGI servlet has been rewritten and it delivers content much faster now. However, running PHP as a CGI from tomcat is not recommended. Please use Apache and the mod_jk connector instead of connecting tomcat directly to the internet. This is much faster and more secure. * Several other bugfixes, please see changelog. I will release the above code as 2.0.8 if I don't get bug reports within the next three weeks. Regards, Jost Boekemeier ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: Jost B. <jos...@ya...> - 2005-08-19 17:26:18
|
Hi, > The phpinfo() function ran, and displayed this for > java : > > java support Enabled > java bridge 2.0.8pre > java.log_level 2 > java.hosts 127.0.0.1:8080 > java.servlet On > java command javaw -Djava.library.path=c:\php5 It seems that local channel re-directs currently do not work at all (at least not if there is no security manager). A workaround would be to switch it off in the backend by changing SocketRunner's isAvailable() to always return false. Or to kill it: telnet to port#9567 and send a <>, it will close the port immediately. It seems that the bug is connected with a recent "fix" in the OnInitSockname (in java.c), which now ignores the command to switch it off. -- When re-directing from a HTTP tunnel to a local TCP channel, it is necessary to switch off the local "unix domain" channel. Otherwise the bridge tries to use this and fails. I think I can fix this tomorrow and update the download, it will be 2.0.8pre3. Thank you very much for the bug report! Regards, Jost Boekemeier ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: Cameron B. <ca...@br...> - 2005-08-18 18:57:20
|
I managed to get the tomcat bridge working when running test.bat. However every php script that I run within tomcat fails to find the bridge. Here is the process that I took Unzipped php-java-bridge_2.0.8pre.zip into c:\php5 Eited c:\php5\php.ini extension_dir = "c:\php5" extension = php_java.dll [java] #java.socketname java.hosts="127.0.0.1:8080" java.servlet=On Deployed JavaBridge.war into tomcat-5.5.9 Browsed http://localhost/test.php The phpinfo() function ran, and displayed this for java : java support Enabled java bridge 2.0.8pre java.log_level 2 java.hosts 127.0.0.1:8080 java.servlet On java command javaw -Djava.library.path=c:\php5 -Djava.class.path=c:\php5/JavaBridge.jar -Djava.awt.headless=true php.java.bridge.JavaBridge INET_LOCAL:9267 2 "" java status not running java server localhost And shows this at the bottom : Fatal error: php_mod_java(52): Could not connect to server: Unknown error -- Have you started the java bridge and set the java.socketname option? in C:\java\jakarta-tomcat-5.5.9\webapps\JavaBridge\test.php on line 19 I have tried editing JavaBridge/WEB-INF/web.xml to change things like override_hosts, servlet_log_level to try and get it working. Any hints ? Thanks, Cameron. |
From: Jost B. <jos...@ya...> - 2005-08-17 17:38:11
|
Hi, > installation. Next day, after the restarting of > windows, I received the > following error: > > <br /> > > <b>Fatal error</b>: php_mod_java(52): Could not > connect to server: No error Please start the backend *before* you start the web-server. How you do this is currently up to you: you could put a startup script into the autostart folder or you could use tomcat to start the backend as a service. (In version 2.0.8 the backend starts automatically if the PHP/Java Bridge was deployed as an apache module. But I would not recommend this setup, neither on unix nor on windows.) I hope it helps. If not, please create a bug report. I will add a service script to start java as a windows service for version 2.0.9. Regards, Jost Boekemeier ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: <Y.L...@ho...> - 2005-08-17 13:00:37
|
Dear Sir! =20 I have installed java-bridge for PHP in windows XP. It worked properly = after installation. Next day, after the restarting of windows, I received the following error: <br /> <b>Fatal error</b>: php_mod_java(52): Could not connect to server: No = error -- Have you started the java bridge and set the java.socketname option? in <b>C:\AccessPoint\www\temp\javatest.php</b> on line <b>6</b><br /> =20 phpInfo data: java support Enabled =20 java bridge 2.0.7 =20 java.hosts no value =20 java.servlet Off =20 java status not running =20 java server localhost =20 =20 I also tried to run script java -jar JavaBridge.jar [INET:9267 4 JavaBridge.log]. which I have found in one forum. All my attempts had no effects :-( =20 Could you help me with this problem? =20 --------------------------------------------- Best regards, Yaroslav Latushkin, Programmer, HOST Corporate Systems, LLC =20 phone: +7(343) 216-16-30 ext. 1605 fax: +7(343) 216-16-31 e-mail: Y.L...@ho... <mailto:Y.L...@ho...>=20 icq =B9 119-670-561 =20 |
From: Jost B. <jos...@ya...> - 2005-08-11 18:36:19
|
Hi, I could reproduce this problem. Please see PR1256962 for details (https://sourceforge.net/tracker/index.php?func=detail&aid=1256962&group_id=117793&atid=679233). As a workaround please copy your libraries (.jar files) into the %JAVA_HOME%\jre\lib\ext folder and re-start the servlet engine after that or please copy them to the JavaBridge\WEB-INF\lib directory (the directory already contains the JavaBridge.jar library). I have corrected this problem for version 2.0.8, please see http://prdownloads.sourceforge.net/php-java-bridge/php-java-bridge_2.0.8pre.zip?download If you extract the zip file to c:\php5 and then copy c:\php5\JavaBridge.war into the servlet engine's webapps folder, you can run the examples via http://localhost:8080/JavaBridge. I have just tested this with tomcat5 (standalone), and it works correctly now. (The excel example tests the java_require functionality) Thank you very much for reporting this bug. Regards, Jost Boekemeier ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: David J. <da...@jo...> - 2005-08-11 14:59:02
|
Hi, =20 I am new to java so please excuse me if I am asking a stupid question. My problem is I cannot access my own java class files from php. =20 My OS is Windows XP I have PHP 5.0.3 running on Apache 2.0.54 with module mod_jk2. I have deployed javabridge 2.0.7 under tomcat 5.5.9., using the excellent instructions at: =20 http://mpcon.org/apacheguide/=20 =20 I can use built in classes such as getProperty('java.version') of 'java.lang.System', but the simplest application I can think of returns the error "ClassNotFoundException: Class HelloPhp not found" =20 The PHP code: =20 <?php java_set_library_path("%CATALINA_HOME%\webapps\JavaBridge\WEB-INF\classe s\php\java\servlet"); $useless =3D new Java_class('HelloPhp'); $result =3D$useless->HelloPhp(); echo $result; ?> =20 The HelloPhp.java class code: =20 // HelloPHP.java test of JavaBridge =20 public class HelloPhp { public static String main() { return "Hello PHP" ; } } =20 I have tried placing the class HelloPhp.class file in every directory I can think of, with/without corresponding java_set_library_path('..') but to no avail. The class works from a test calling program from the system prompt, provided the CLASSPATH environmental variable is set. =20 The reason for thinking the above path is the most likely candidate is I have noticed that if I restart Tomcat I get once only the error: =20 "ReferenceClass failed: new HelloPhp. Cause: java.lang.IllegalArgumentException] thrown" however refreshing the page reverts to the above "ClassNotFoundException:" =20 Any help would be much appreciated. =20 David =20 |
From: Thomas K. <tk...@da...> - 2005-08-11 14:10:52
|
Abbett, Jonathan wrote: >> A method I use returns a "List" of objects. I, with my developer's >> omniscience, know that each object in the list is of a particular class. >> How do I cast my object to that class? I don't have very much experience with the java bridge, but as far as I know you don't need to cast java objects in php. >> The Java code I'm basing this on simply looks like: >> >> List fooList = getFooList(); >> MyClass foo = (MyClass)fooList.get(0); >> >> >> I'm stumped as to write the PHP analog. My guess: $SomeObject = java('full.package.path.to.SomeObject'); $fooList = $SomeObject->getFooList(); $foo = $fooList->get(0); _Should_ be as simple as that. I hope I could help, Thomas |
From: Alison S. <al...@ba...> - 2005-08-10 21:07:51
|
Hi, I contacted this list a couple of weeks ago about using php-java-bridge to fire Crystal Reports from Drupal. I have the following: Crystal Reports jar files Crystal Reports jsp examples Drupal Module with jsp examples semi-translated to php In general, this project is kicking my ass and my boss so has his heart set on being able to fire reports from Drupal that is has authorized me to find a paid consultant to get one example working. If you are interested in this job please email me credentials and hourly rate. Alison |
From: Abbett, J. <Jon...@ch...> - 2005-08-10 15:45:52
|
A method I use returns a "List" of objects. I, with my developer's omniscience, know that each object in the list is of a particular class. How do I cast my object to that class? The Java code I'm basing this on simply looks like: List fooList =3D getFooList(); MyClass foo =3D (MyClass)fooList.get(0); I'm stumped as to write the PHP analog. Thanks, Jon =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Jonathan Abbett Children's Hospital Informatics Program 1 Autumn Street, Fifth Floor Boston, MA 02215 617-355-8334 http://www.chip.org |
From: Jost B. <jos...@ya...> - 2005-08-09 18:18:17
|
Hi, this has been implemented in version 2.0.8. A preview is at http://prdownloads.sourceforge.net/php-java-bridge/php-java-bridge_2.0.8pre.zip?download Please see the examples/XML for an example how to call php code from java. The trick is to write a java class which calls your PHP functions. On java level you can catch the PHP exceptions and decide what to call next: interface Proc { public void f(); public void e(Exception e); class test { public void call (Proc p) { try { p.f(); } catch (Exception e) { p.e(e); } } <?php function f() { new java("java.lang.String", null); echo "never reached"; } function e($e) { echo "an exception occured on php level: $e"; } $test=new java('Proc$Test'); $test->call(java_closure()); ?> Regards, Jost Boekemeier ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: Jost B. <jos...@ya...> - 2005-08-05 18:20:05
|
Hi, a extermal class is missing, so the bridge was not able to invoke the constructor, it has returned the class instead. You should be able to locate the error message in the bridge log file. > So apparantly, as to see in the first line, $dataset > is indeed on object Objects are displayed as ...@hashCode, classes as class:<name>. But you're right that the message is not clear enough. I will change the error message for the next version. Your next question is probably what the NoClassDefFoundError means, we have an open problem report for this (it's a problem specific to the sun platform, other platforms such as ecma335 and gnu java don't have this problem). Kai has already addressed one part of the problem with his dynamic class loader which does not confuse classes loaded from different url classloaders anymore. However, the fundamental problem cannot be fixed by us, this is something that sun must handle. But it should be easy to avoid the problems if one obeys the following rules: * All interconnected classes must be accessible by the same classloader. This means that all interconnected classes must be loaded by the same java_require() call. java_require(foo); java_require(bar); does not work if foo and bar reference each other. This condition stays the same unless you stop the bridge or call java_reset(). (Reason is that even if you use java_require(foo;bar) after that, the loader has already cached the broken foo and the queries for bar jump off from there). * No class may be appear in more than java_require() statement call within the same php script. Regards, Jost Boekemeier ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: Thomas K. <tk...@da...> - 2005-08-05 14:12:41
|
Hello everybody, I'm trying to use the excellent jfree project JFreeChart (http://www.jfree.org/jfreechart/index.php) to generate a few barcharts. Unfortunately I get an error and don't know whats wrong. Here's the code I use (as an example, to provoce the error): <? java_require("jfreechart-1.0.0-rc1.jar"); $dataset = new Java("org.jfree.data.category.DefaultCategoryDataset"); print $dataset; print $dataset->hashCode(); ?> This is what I get: ----------------- snip --------------------------------------------- [class java.lang.String: First][class org.jfree.data.category.DefaultCategoryDataset: class org.jfree.data.category.DefaultCategoryDataset] Fatal error: Uncaught [class java.lang.Exception: java.lang.Exception: Invoke failed: [class org.jfree.data.category.DefaultCategoryDataset]->hashCode. Cause: java.lang.IllegalArgumentException: object is not an instance of declaring class] thrown in /mnt/data/var/www/localhost/htdocs/java.php on line 23 ----------------- snap --------------------------------------------- So apparantly, as to see in the first line, $dataset is indeed on object of the class DefaultCategorySet. But invoking a method on this object results in an error "object is not an instance of declaring class". What's wrong? Is this a bug in the bridge or did I do something wrong? Thanks Thomas |
From: Thomas K. <tk...@da...> - 2005-08-05 13:40:04
|
Hello everybody, I'm trying to use the excellent jfree project JFreeChart (http://www.jfree.org/jfreechart/index.php) to generate a few barcharts. Unfortunately I get an error and don't know whats wrong. Here's the code I use (as an example): <? java_require("jfreechart-1.0.0-rc1.jar"); $dataset = new Java("org.jfree.data.category.DefaultCategoryDataset"); print $dataset; print $dataset->hashCode(); ?> This is what I get: ----------------- snip --------------------------------------------- [class java.lang.String: First][class org.jfree.data.category.DefaultCategoryDataset: class org.jfree.data.category.DefaultCategoryDataset] Fatal error: Uncaught [class java.lang.Exception: java.lang.Exception: Invoke failed: [class org.jfree.data.category.DefaultCategoryDataset]->hashCode. Cause: java.lang.IllegalArgumentException: object is not an instance of declaring class] thrown in /mnt/data/var/www/localhost/htdocs/java.php on line 23 ----------------- snap --------------------------------------------- So apparantly, as to see in the first line, $dataset is indeed on object of the class DefaultCategorySet. But invoking a method on this object results in an error "object is not an instance of declaring class". What's wrong? Is this a bug in the bridge or did I do something wrong? Thanks Thomas |
From: Jost B. <jos...@ya...> - 2005-08-04 19:05:17
|
Hi Jonathan, > Is there a PHP 4 alternative to using PHP 5's > try/catch functionality to catch Java exceptions? Currently only java_last_exception(). But funny that you mention it, I have just thought about this while trying to do the opposite: find a way to signal an exception while running a PHP procedure invoked from java. I think there are at least two solutions, we could either add a primitive to register a "global" exception handler, something like: java_register_exception_handler(php_proc); or we could add a special primitive "java_call_with_exception_handler" which wraps the current invoke, getsetprop or create call and invokes the handler in case we receive an exception- instead of an object-handle (the protocol uses E to tag an exception object). Regards, Jost Boekemeier ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |