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
|
From: Jost B. <jos...@ya...> - 2005-09-28 17:47:15
|
Hi, > I've had to manualy install php 5.0.4. The php > binary is located in > /usr/local/php5/bin > > Running the RPM for FC, I get these two dependencies > errors. > /usr/bin/php is needed by php-java-bridge > php >= 5.0.4 is needed by php-java-bridge Everything you install yourself is ignored intentionally. Please always install from RPM for two reasons: 1. RPM keeps the dependencies in a database. If you manually install software into /usr, the RPM database content gets out of sync with the file system. 2. RPM's contain SEL contexts. Java, php and the php/java bridge rely on the correct security contexts. If you break them, you must switch off SEL entirely or provide your own contexts and relabel the entire file system. However, it is possible to compile your own local versions of apache/php and the php/java bridge into /usr/local, please see the INSTALL document (section "Install from source") for details Regards, Jost Boekemeier ___________________________________________________________ Was denken Sie über E-Mail? Wir hören auf Ihre Meinung: http://surveylink.yahoo.com/wix/p0379378.aspx |
From: Jost B. <jos...@ya...> - 2005-09-28 17:37:11
|
Hi Massimo, > Exception in thread "JavaBridge" > java.util.NoSuchElementException > at > php.java.bridge.ThreadPool.getNextRunnable > From what I gather there may be a problem with > thread synchronization in the bridge; It's a known bug in the thread pool of version 2.0.7. Its hould be fixed in 2.0.8, please see the changelog entry for getNextRunnable from 2005-08-23 for details. This problem appears only when you have very short scripts; if one sees this message in a production environment, I suggest to switch off the thread pool or to upgrade to 2.0.8. > I'm still running php-java-bridge v.2.0.7 and plan > to upgrade, but can't > see anything in the changelog that addresses a > similar problem. It's here: http://cvs.sourceforge.net/viewcvs.py/php-java-bridge/php-java-bridge/ChangeLog?r1=1.104&r2=1.105&diff_format=u Regards, Jost Boekemeier ___________________________________________________________ Was denken Sie über E-Mail? Wir hören auf Ihre Meinung: http://surveylink.yahoo.com/wix/p0379378.aspx |
From: SQUILLACE M. <msq...@so...> - 2005-09-28 10:33:09
|
Hi Jost, =20 Having at last connected a PHP script to WebSphere MQ via the php-java-bridge I've been benchmarking the connection with Apache "ab", and while the results are good performance-wise, the following error is intermittently logged: =20 Exception in thread "JavaBridge" java.util.NoSuchElementException at java.util.LinkedList.remove(LinkedList.java:644) at java.util.LinkedList.removeFirst(LinkedList.java:134) at php.java.bridge.ThreadPool.getNextRunnable(ThreadPool.java:33) at php.java.bridge.ThreadPool.access$100(ThreadPool.java:7) at php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:20) The error occurs only when I specify a concurrency level greater than 1 - in my current setup it is most evident when running 5 concurrent clients, which is not that much load. =20 From what I gather there may be a problem with thread synchronization in the bridge; what do you think? I'm still running php-java-bridge v.2.0.7 and plan to upgrade, but can't see anything in the changelog that addresses a similar problem. =20 On a side note, I observe decreasing throughput after running several benchmarks with identical parameters: the slugginess goes away when I restart the bridge ... do I need to explicitly invoke some "garbage collection" method at script's end? =20 Bye, Massimo |
From: I l <is...@ho...> - 2005-09-27 18:30:41
|
I've had to manualy install php 5.0.4. The php binary is located in /usr/local/php5/bin Running the RPM for FC, I get these two dependencies errors. /usr/bin/php is needed by php-java-bridge php >= 5.0.4 is needed by php-java-bridge It looks like its searching for php in the wrong directory. I've tried using links to those binary php files. But it still gave me the same error. I even copied the binaries to that directory. It seems like I will need to install php to the default directory, but unfortunetly I cann't. Is there anyway to tell the rpm to look for the php in the right directory? Or another way around this. A buddy of mine said install another version of php. I've looked everywhere on your site and tried searching your mailing lists with no success. Your help would be greatly appreciated. Thanks. |
From: Ben G. <be...@ja...> - 2005-09-26 17:58:51
|
Jost Boekemeier wrote: > Hi Ben, > > >>That's what I was trying to get at - if >>int<->Integer conversion works, > > > how should this work when the parameter doesn't have > any type information? > > $hash->put(3); > > should the 3 be converted into an Integer or a Long? > > Currently it's a Long (for ext/java compatibility). > So if you wanted an Integer, couldn't you just do $i = new java.lang.Integer(3); $hash->put($i); Or doesn't that work? -- Ben |
From: Jost B. <jos...@ya...> - 2005-09-26 17:52:11
|
Hi, > Just out of curiousity, what is the harm of using > java_reset() unnecessarily (i.e. in the event that > no libraries or setup files have been changed). if you use the standalone backend all your caches and all your session vars are gone. When the backend (JavaBridge.war) is running in a j2ee server, java_reset() does nothing. (j2ee servers have their own methods admin interfaces). Regards, Jost Boekemeier ___________________________________________________________ Was denken Sie über E-Mail? Wir hören auf Ihre Meinung: http://surveylink.yahoo.com/wix/p0379378.aspx |
From: Jim D. <jd...@ho...> - 2005-09-25 17:07:57
|
Done.. Thanks, Jim >From: Jost Boekemeier <jos...@ya...> >To: Jim Douglas <jd...@ho...>, >wil...@co...,php...@li... >Subject: Ant: RE: Ant: RE: Ant: [Php-java-bridge-users] Problem compiling >version 2.0.7 on Red >Date: Sun, 25 Sep 2005 13:04:46 +0200 (CEST) > >Hi Jim, > > > PHP Warning: Unknown(): Unable to load dynamic > > library './java.so' - > >can you please type the following two commands: > >echo "<?php dl('java.so'); ?>" >test.php >strace -s512 /usr/local/bin/php test.php 2>strace.log > >create a ticket for this, please see > >(http://sourceforge.net/tracker/?func=add&group_id=117793&atid=679233) > >and attach the strace.log there? > >I will check this asap. > > >Regards, >Jost Boekemeier > > > > >___________________________________________________________ >Was denken Sie über E-Mail? Wir hören auf Ihre Meinung: >http://surveylink.yahoo.com/wix/p0379378.aspx > > >------------------------------------------------------- >SF.Net email is sponsored by: >Tame your development challenges with Apache's Geronimo App Server. >Download it for free - -and be entered to win a 42" plasma tv or your very >own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php >_______________________________________________ >php-java-bridge-users mailing list >php...@li... >https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
From: Edward H. <edw...@ya...> - 2005-09-25 13:47:24
|
Hi Jost, Thanks for the advice. I managed to find and fix the bug this morning which pertains to a static variable not being set correctly as you predicted. Just out of curiousity, what is the harm of using java_reset() unnecessarily (i.e. in the event that no libraries or setup files have been changed). This is so I can bear this in mind in the future if I happen to encounter a similar problem. Thanks very much for your assistance. Ed Jost Boekemeier <jos...@ya...> wrote: Hi, > I was looking through other documentation and I saw > the function java_reset() and I tried using that > everytime I make a call to my Java class ande > everything seems to be working fine now. please do not use java_reset() in php scripts. java_reset() is a privileged procedure and should only be used by admins (after the setup or the libraries have changed for example). If possible set the log.level to 4 and check why the second call fails. If you can't find the problem yourself please create a bug report, please see http://sourceforge.net/tracker/?func=add&group_id=117793&atid=679233 Regards, Jost Boekemeier ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de --------------------------------- Yahoo! for Good Click here to donate to the Hurricane Katrina relief effort. |
From: Jost B. <jos...@ya...> - 2005-09-25 11:22:30
|
Hi Ben, > That's what I was trying to get at - if > int<->Integer conversion works, how should this work when the parameter doesn't have any type information? $hash->put(3); should the 3 be converted into an Integer or a Long? Currently it's a Long (for ext/java compatibility). Regards, Jost Boekemeier ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: Jost B. <jos...@ya...> - 2005-09-25 11:10:10
|
Hi, > I was looking through other documentation and I saw > the function java_reset() and I tried using that > everytime I make a call to my Java class ande > everything seems to be working fine now. please do not use java_reset() in php scripts. java_reset() is a privileged procedure and should only be used by admins (after the setup or the libraries have changed for example). If possible set the log.level to 4 and check why the second call fails. If you can't find the problem yourself please create a bug report, please see http://sourceforge.net/tracker/?func=add&group_id=117793&atid=679233 Regards, Jost Boekemeier ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: Jost B. <jos...@ya...> - 2005-09-25 11:04:57
|
Hi Jim, > PHP Warning: Unknown(): Unable to load dynamic > library './java.so' - can you please type the following two commands: echo "<?php dl('java.so'); ?>" >test.php strace -s512 /usr/local/bin/php test.php 2>strace.log create a ticket for this, please see (http://sourceforge.net/tracker/?func=add&group_id=117793&atid=679233) and attach the strace.log there? I will check this asap. Regards, Jost Boekemeier ___________________________________________________________ Was denken Sie über E-Mail? Wir hören auf Ihre Meinung: http://surveylink.yahoo.com/wix/p0379378.aspx |
From: Edward H. <edw...@ya...> - 2005-09-25 01:06:01
|
Hi, I was looking through other documentation and I saw the function java_reset() and I tried using that everytime I make a call to my Java class ande everything seems to be working fine now. I appreciate all the help you have given me and I think this Java-Bridge application is very helpful. Once again thanks, Ed Jost Boekemeier <jos...@ya...> wrote: Hi Edward, > This class and all variables/properties belonging to > that class will never get destroyed? the class is garbage collected when your VM has a class GC and this GC is called. In the standard configuration (64MB heap) the tests.php4/binaryData.php test triggers such a GC. This caching behaviour is intentional. Everything else (instance variables etc.) is destroyed after script execution. > This is because I have a class and when I run > JavaBridge.jar and execute the class for the first > time it always works. But subsequent calls to that > class will fail It is certainly possible to write a counter using a static variable so that a method call fails after some time. But I don't think this is a good programming practice. :) Can you please be more specific? If possible please set the java.log_level=4, create a bug report and attach the log up to the point where the problem occurs. (please see http://sourceforge.net/tracker/?func=add&group_id=117793&atid=679233) Regards, Jost Boekemeier ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de --------------------------------- Yahoo! for Good Click here to donate to the Hurricane Katrina relief effort. |
From: Jim D. <jd...@ho...> - 2005-09-24 19:43:46
|
Jost, Thanks for compiling for RH 9.0, that solves that problem. I have a problem with PHP seeing the java.so. When I run a test with, echo '<php phpinfo() ?>' | php | fgrep java, I get the folllowing error; PHP Warning: Unknown(): Unable to load dynamic library './java.so' - ./java.so: cannot open shared object file: No such file or directory in Unknown on line 0 (I tried the full path also in the php.ini, "extension=/usr/local/lib/php/ext/java.so") What I have done, 1- Tested and confirmed that I have PHP 4.4.0. It is running fine and serving up web pages. 2- I copied the java.so to the PHP install directory, /usr/local/lib/php/ext 3. I added "extension=java.so" to the php.ini 4 - I copied JavaBridge.jar /usr/opt/tomcat/webapps/WEB_INF/lib (Is this the correct directory to copy to JavaBridge.jar to?) Thanks, for the compiled code, and I really appreciate your help! Jim >From: Jost Boekemeier <jos...@ya...> >To: Jim Douglas <jd...@ho...>, >wil...@co...,php...@li... >Subject: Ant: RE: Ant: [Php-java-bridge-users] Problem compiling version >2.0.7 on RedHat 9 >Date: Mon, 19 Sep 2005 22:05:34 +0200 (CEST) > >Hi, > >[please excuse the delay] > >the java.so for RH9/php4.4 is available at: > >http://php-java-bridge.sourceforge.net/php-java-bridge_2.0.8-RH9-php4.4.tar > >It contains java.so (version 2.0.8) and JavaBridge.jar >(version 2.0.8). Please copy the java.so into the >extension directory of you php 4.4 installation and >please make sure that the php executable /usr/bin/php >is indeed the php4.4 cgi binary. > > >To compile the php-java-bridge on RH9, please follow >the "Installation from source" instructions in the >INSTALL document. binary or source RPM's cannot be >used on RH9, this rpm distribution is too old, sorry. > >In case you don't want to install autoconf 2.57, >automake 1.6.3 and libtool 1.4.3, please see the >"Compiling the bridge without autoconf" section. > > >Regards, >Jost Boekemeier > > > > > > > >___________________________________________________________ >Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier >anmelden: http://mail.yahoo.de > > >------------------------------------------------------- >SF.Net email is sponsored by: >Tame your development challenges with Apache's Geronimo App Server. >Download it for free - -and be entered to win a 42" plasma tv or your very >own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php >_______________________________________________ >php-java-bridge-users mailing list >php...@li... >https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
From: Jost B. <jos...@ya...> - 2005-09-24 13:33:33
|
Hi Edward, > This class and all variables/properties belonging to > that class will never get destroyed? the class is garbage collected when your VM has a class GC and this GC is called. In the standard configuration (64MB heap) the tests.php4/binaryData.php test triggers such a GC. This caching behaviour is intentional. Everything else (instance variables etc.) is destroyed after script execution. > This is because I have a class and when I run > JavaBridge.jar and execute the class for the first > time it always works. But subsequent calls to that > class will fail It is certainly possible to write a counter using a static variable so that a method call fails after some time. But I don't think this is a good programming practice. :) Can you please be more specific? If possible please set the java.log_level=4, create a bug report and attach the log up to the point where the problem occurs. (please see http://sourceforge.net/tracker/?func=add&group_id=117793&atid=679233) Regards, Jost Boekemeier ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: Edward H. <edw...@ya...> - 2005-09-24 01:40:07
|
Hi, I'm also wondering how instances are created and destroyed using java bridge. It seems to me (and from reading the docs) that when instances are created i.e. when u do smth like $newinstance=new java_class("java.lang.someclass"); This class and all variables/properties belonging to that class will never get destroyed? Is this correct? This is because I have a class and when I run JavaBridge.jar and execute the class for the first time it always works. But subsequent calls to that class will fail unless I shut down JavaBridge.jar (by terminating javaw.exe from Task Manager) and restart it again. And it also works when I call the java class from command prompt and calling it multiple times does not create any problem. The error that I'm getting is ArrayIndexOutofBounds Exception on one of the variables of the class. I'm just wondering if there is any difference calling java class from command prompt and calling it via the java bridge which can explain this behaviour. Thanks. --------------------------------- Yahoo! for Good Click here to donate to the Hurricane Katrina relief effort. |
From: Ben G. <be...@ja...> - 2005-09-23 16:39:17
|
Jost Boekemeier wrote: > > In general we cannot auto-convert a long to a > java.lang.Integer without altering the value. If such > a conversion is necessary I think the user must do > this, for example by calling "new > java("java.lang.Integer", $phpLongValue);" That's what I was trying to get at - if int<->Integer conversion works, then it is easy to instantiate an Integer from PHP code and pass that to your Java method. There would be no need for the "php ints are java longs" flag. -- Ben Gollmer Jatosoft LLC |
From: SQUILLACE M. <msq...@so...> - 2005-09-23 15:24:10
|
Jost, Success! Before calling the snippets I sent you it was necessary to setup WebSphere MQ environment, but since the statements I used didn't signal any problems I was confident it was all OK; moreover I got the same errors as those I sent you with or without such initialization. Now, to prepare the environment you have to set specific key/value pairs defining the server to connect, the port and the channel to use, and following the manual e.g. I assigned the value 'MY_TEST_CHANNEL' to a key 'CHANNEL_PROPERTY'. What I didn't understand was that I had to instantiate a class named MQC and susbstitute the key name with something like $mqc->CHANNEL_PROPERTY (which points internally to a string valued "channel"). As soon as I realized this and made corrections the scripts ran fine through the end, writing a message a reading it back (and quickly too!). The exceptions reported put me on the wrong path, and I don't know why they were raised ... it appears there is nothing wrong with type coercion in the bridge. Thank you very much for your help, Massimo |
From: SQUILLACE M. <msq...@so...> - 2005-09-23 12:06:31
|
Jost, > Which version of the PHP/Java Bridge do you use? The > official 2.0.7 or some code from the CVS? I just downloaded php-java-bridge_2.0.7.tar.bz2 from the site and installed. Massimo P.S: How am I supposed to set the Subject (or whatever) of my replies in order to see them threaded with the original posts in the mailing list? |
From: Jost B. <jos...@ya...> - 2005-09-23 12:01:40
|
Hi, > now I understand why didn't work. When I do "$i=1" I > make the $i a long. So, > the only way that we can handle Integer is with the > java constructor. I think it is a mistake to rely on auto-conversions, especially if the function parameter doesn't have any type information (e.g. the type is java.lang.Object). Under some circumstances PHP changes the number type from exact to inexact. If your hash table contains a Long with the value 1 and you ask for $i (when $i is a float), this will not work either. Depending on whether the proposed "php ints are java longs" flag is set or not, you will ask for a java.lang.Long object with the value 1 or for a java.lang.Integer object with the value 1. Regards, Jost Boekemeier ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: Jost B. <jos...@ya...> - 2005-09-23 10:49:22
|
Thanks Massimo. > java.lang.IllegalArgumentException: object is not an > instance of > declaring class Which version of the PHP/Java Bridge do you use? The official 2.0.7 or some code from the CVS? Regards, Jost Boekemeier ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: Jost B. <jos...@ya...> - 2005-09-23 10:46:17
|
Hi, [please excuse the delay] > 4.4.0 - at least you can always ask new users to get > latest version of > PHP to avoid bugs introduced earlier. Well, people have a reason why they use php 4.3.2, 4.3.3 or 4.4.0 or 5.0.x. Certain extensions only work in one of these versions. So if users what to use a specific version of php for which no binary exists, I usually ask them to compile from source. > I've tried to > compile PHP myself > from CVS, but failed. Which errors specifically? > I want to try mix of Java and PHP in > standalone application. I didn't think this is possible. PHP is missing features which are essential for desktop applications. For example it doesn't have threads; it relies on the web server to provide an "execution environment". There are other environments which support the PHP programming language for example a php -> CIL compiler exists for the MONO project. > Yes, sometimes. Okay. I think it is possible to split the zip file into a "documentation" zip and a zip file which contains the php_java.dll, the php.ini and a short readme. > I like things like unzip and run. Like any lazy user > I hate doing > things that could be automated I don't see how this could be automated. Some people use IIS, others prefer apache. > README is very long and contains a lot of > information. Read 25k just > to find command line options (especially if there > are not any) is a > waste of time. I thought it should be good for an > application to > react on help/unknown cmd parameters to be > user-friendly. Sorry, the parameters are documented in the INSTALL.WINDOWS document only. The README is indeed a little bit unix centric; unix users usually start the bridge via the php-java-bridge.service script or via the php-java-bridge command. If you install with "rpm -i php-java-bridge*.rpm" or by double-clicking on the .rpm, the RPM package manager will automatically set this up. AFAIK windows doesn't have such a setup program. But I am not a windows expert, though. > I don't think it is easy, esp. for me. =) What I meant was: Isn't it possible to use java_closure() for this? For example: <? class test { function toString() { $sys=new JavaClass("java.lang.System"); return "Hello java from php@" . $sys; } } $t = new test(); $javaT = java_closure($t); echo $javaT; ?> => [proxy0: "Hello java from php@100982"] The problem is that Sun's dynamic proxy doen't accept a super class, i.e. the parent class is always java.lang.Object. There are several open source implementations which change this. But in practice I think this isn't an issue. You can always delegate, e.g. use the decorator pattern. Regards, Jost Boekemeier ___________________________________________________________ Was denken Sie über E-Mail? Wir hören auf Ihre Meinung: http://surveylink.yahoo.com/wix/p0379378.aspx |
From: SQUILLACE M. <msq...@so...> - 2005-09-23 09:52:14
|
Jost, > can you please set the java.log_level to 4 and send > the complete log for the above statements. Here you are (long post): Sep 23 11:28:57 JavaBridge DEBUG: Socket connection accepted Sep 23 11:28:57 JavaBridge DEBUG: Starting bridge from Thread Pool Sep 23 11:28:57 JavaBridge DEBUG: php.java.bridge.JavaBridge@1632c2d START: JavaBridge.run() Sep 23 11:28:57 JavaBridge DEBUG: php.java.bridge.JavaBridge@1632c2d Request from client with uid/gid -1/-1 Sep 23 11:28:57 JavaBridge DEBUG: php.java.bridge.JavaBridge@1632c2d --> <C v=3D"com.ibm.mq.MQQueueManager" p=3D"I" i=3D"147953764" > Sep 23 11:28:57 JavaBridge DEBUG: php.java.bridge.JavaBridge@1632c2d --> </C> Sep 23 11:28:57 JavaBridge DEBUG: php.java.bridge.JavaBridge@1632c2d <-- <O v=3D"1" i=3D"147953764"/> Sep 23 11:28:57 JavaBridge DEBUG: php.java.bridge.JavaBridge@1632c2d --> <C v=3D"com.ibm.mq.MQC" p=3D"C" i=3D"147971236" /> Sep 23 11:28:57 JavaBridge DEBUG: php.java.bridge.JavaBridge@1632c2d --> </C> Sep 23 11:28:57 JavaBridge DEBUG: php.java.bridge.JavaBridge@1632c2d <-- <O v=3D"2" i=3D"147971236"/> Sep 23 11:28:57 JavaBridge DEBUG: php.java.bridge.JavaBridge@1632c2d --> <I v=3D"2" m=3D"MQOO_INPUT_AS_Q_DEF" p=3D"P" i=3D"147973572" /> Sep 23 11:28:57 JavaBridge DEBUG: php.java.bridge.JavaBridge@1632c2d --> </I> Sep 23 11:28:57 JavaBridge DEBUG: php.java.bridge.JavaBridge@1632c2d <-- <L v=3D"1" i=3D"147973572"/> Sep 23 11:28:57 JavaBridge DEBUG: php.java.bridge.JavaBridge@1632c2d --> <I v=3D"2" m=3D"MQOO_OUTPUT" p=3D"P" i=3D"147973604" /> Sep 23 11:28:57 JavaBridge DEBUG: php.java.bridge.JavaBridge@1632c2d --> </I> Sep 23 11:28:57 JavaBridge DEBUG: php.java.bridge.JavaBridge@1632c2d <-- <L v=3D"16" i=3D"147973604"/> Sep 23 11:28:57 JavaBridge DEBUG: php.java.bridge.JavaBridge@1632c2d --> <I v=3D"1" m=3D"accessQueue" p=3D"I" i=3D"147974004" /> Sep 23 11:28:57 JavaBridge DEBUG: php.java.bridge.JavaBridge@1632c2d --> <S v=3D"SYSTEM.DEFAULT.LOCAL.QUEUE" /> Sep 23 11:28:57 JavaBridge DEBUG: php.java.bridge.JavaBridge@1632c2d --> <L v=3D"17" /> Sep 23 11:28:57 JavaBridge DEBUG: php.java.bridge.JavaBridge@1632c2d --> </I> java.lang.IllegalArgumentException: object is not an instance of declaring class at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at php.java.bridge.JavaBridge.Invoke(JavaBridge.java:978) 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) Sep 23 11:28:57 JavaBridge DEBUG: php.java.bridge.JavaBridge@1632c2d Invoked accessQueue on [Object 13582581 - Class: java.lang.Class:ID20432397:LOADER-ID0] Expected Arguments for this Method: (0) java.lang.String:ID11240763:LOADER-ID0 (1) int:ID12067688:LOADER-ID0 Plain Arguments for this Method: (0) [Object 18647665 - Class: java.lang.String:ID11240763:LOADER-ID0] (1) [Object 12926414 - Class: java.lang.Long:ID25253977:LOADER-ID0] Coerced Arguments for this Method: (0) [Object 18647665 - Class: java.lang.String:ID11240763:LOADER-ID0] (1) [Object 22862399 - Class: java.lang.Integer:ID16554308:LOADER-ID0] Sep 23 11:28:57 JavaBridge DEBUG: php.java.bridge.JavaBridge@1632c2d <-- <E v=3D"3" m=3D"java.lang.Exception: Invoke failed: [class com.ibm.mq.MQQueueManager]->accessQueue(class java.lang.String, class java.lang.Long). Cause: java.lang.IllegalArgumentException: object is not an instance of declaring class" i=3D"147974004"/> Sep 23 11:28:57 JavaBridge DEBUG: php.java.bridge.JavaBridge@1632c2d --> <I v=3D"0" m=3D"ObjectToString" p=3D"I" i=3D"147973636" /> Sep 23 11:28:57 JavaBridge DEBUG: php.java.bridge.JavaBridge@1632c2d --> <O v=3D"3" /> Sep 23 11:28:57 JavaBridge DEBUG: php.java.bridge.JavaBridge@1632c2d --> </I> Sep 23 11:28:57 JavaBridge DEBUG: php.java.bridge.JavaBridge@1632c2d <-- <S v=3D"[class java.lang.Exception: java.lang.Exception: Invoke failed: [class com.ibm.mq.MQQueueManager]->accessQueue(class java.lang.String, class java.lang.Long). Cause: java.lang.IllegalArgumentException: object is not an instance of declaring class]" i=3D... Sep 23 11:28:57 JavaBridge DEBUG: END: JavaBridge.run() In order to set java.log_level to 4 I had to restart the php-java-bridge (I also restarted Apache just in case) and, as you can see from the above, now the exception is slightly different ("object is not an instance of declaring class" instead of "java.lang.ClassCastException"); could be because of my previous tests, sure, but makes me think ... if script 1 modifies the global environment of the bridge scripts 2 and following are all influenced ... what if script 1 is buggy? > Please also send the *exact* version of the JVM you > use. java.version: 1.5.0_01 This info is from the output of a PHP script listing all the java properties; here is the complete output, should you need it: java.runtime.name: Java(TM) 2 Runtime Environment, Standard Edition sun.boot.library.path: /opt/tomcat/jdk-1.5/jre/lib/i386 java.vm.version: 1.5.0_01-b08 java.vm.vendor: Sun Microsystems Inc. java.vendor.url: http://java.sun.com/ path.separator: : java.vm.name: Java HotSpot(TM) Server VM file.encoding.pkg: sun.io user.country: US sun.os.patch.level: unknown java.vm.specification.name: Java Virtual Machine Specification user.dir: / java.runtime.version: 1.5.0_01-b08 java.awt.graphicsenv: sun.awt.X11GraphicsEnvironment java.endorsed.dirs: /opt/tomcat/jdk-1.5/jre/lib/endorsed os.arch: i386 java.io.tmpdir: /tmp line.separator: java.vm.specification.vendor: Sun Microsystems Inc. os.name: Linux sun.jnu.encoding: UTF-8 java.library.path: /opt/www/lib/php/extensions/no-debug-non-zts-20041030 java.specification.name: Java Platform API Specification java.class.version: 49.0 sun.management.compiler: HotSpot Server Compiler os.version: 2.4.21-20.ELsmp user.home: /root user.timezone: Europe/Rome java.awt.printerjob: sun.print.PSPrinterJob file.encoding: UTF-8 java.specification.version: 1.5 user.name: root java.class.path: /opt/www/lib/php/extensions/no-debug-non-zts-20041030/JavaBridge.jar java.vm.specification.version: 1.0 sun.arch.data.model: 32 java.home: /opt/tomcat/jdk-1.5/jre java.specification.vendor: Sun Microsystems Inc. user.language: en java.vm.info: mixed mode java.version: 1.5.0_01 java.ext.dirs: /opt/tomcat/jdk-1.5/jre/lib/ext sun.boot.class.path: /opt/tomcat/jdk-1.5/jre/lib/rt.jar:/opt/tomcat/jdk-1.5/jre/lib/i18n.jar: /opt/tomcat/jdk-1.5/jre/lib/sunrsasign.jar:/opt/tomcat/jdk-1.5/jre/lib/j sse.jar:/opt/tomcat/jdk-1.5/jre/lib/jce.jar:/opt/tomcat/jdk-1.5/jre/lib/ charsets.jar:/opt/tomcat/jdk-1.5/jre/classes java.vendor: Sun Microsystems Inc. java.awt.headless: true file.separator: / java.vendor.url.bug: http://java.sun.com/cgi-bin/bugreport.cgi sun.cpu.endian: little sun.io.unicode.encoding: UnicodeLittle sun.cpu.isalist: Regards, Massimo |
From: Nicolas G. <nic...@gm...> - 2005-09-22 21:42:57
|
Yes, you're right. I've reviewing all the code again.the difference was this: In the first code I do this: $i=3Dnew java("java.lang.Integer",1); $i=3D1; $Cliente=3D$h->get($i); echo "Cliente:".$Cliente->toString(); see that line in red, I didn't post it in the previous mail :( now I understand why didn't work. When I do "$i=3D1" I make the $i a long. = So, the only way that we can handle Integer is with the java constructor. On 9/22/05, Abbett, Jonathan <Jon...@ch...> wrote: > > Very interesting. > > I thought in your initial e-mail you said that using new java(" > java.lang.Integer", 1) gave you the same fatal error? > > > Also: > > > > $i=3Dnew java("java.lang.Integer",1); > > $Cliente=3D$h->get($i); > > echo "Cliente:".$Cliente->toString(); > > > > > > both return : > > > > Fatal error: Call to a member function toString() on a non-object. > > > Did something else change in your implementation as well? > > (make sure you send your responses to the listserver, not just me!) > > Best, > Jon > > ________________________________________ > From: Nicolas Granelli [mailto:nic...@gm...] > Sent: Thursday, September 22, 2005 4:02 PM > To: Abbett, Jonathan > Subject: Re: [Php-java-bridge-users] HashMap->get() > > the $h is not null, because $h->size() return the correct value. > > I've tried with: > > $i=3Dnew java("java.lang.Integer", 1); > $Cliente=3D$h->get($i); > > instead of: > > $Cliente=3D$h->get(1); > > and you know what? works just fine!!!! > > > The problem was that the "1" was interpretated as a java Long, not an > Integer. I get this solution from the other thread: "Primitives Types". > > Thanks a lot. > This projects is very very good :) > > On 9/21/05, Abbett, Jonathan <Jon...@ch...> > wrote: > Based on the error, it seems like $h is null. Whatever is providing you > with the HashMap object needs to be looked at more closely... I doubt it'= s a > problem with the PHP-Java bridge. > --Jon > > > ________________________________________ > From: php...@li... [mailto: > php...@li...] On Behalf Of Nicolas > Granelli > Sent: Tuesday, September 20, 2005 7:04 PM > To: php-java-bridge > Subject: [Php-java-bridge-users] HashMap->get() > > I can't get to work the get method of a HashMap, that I get from Java (i'= m > not creating from php) > > I try: > > $Cliente=3D$h->get(1); //where $h is the HashMap > > > Also: > > $i=3Dnew java("java.lang.Integer",1); > $Cliente=3D$h->get($i); > echo "Cliente:".$Cliente->toString(); > > > both return : > > Fatal error: Call to a member function toString() on a non-object. > > > |
From: Bharath T. <bh...@mv...> - 2005-09-22 19:45:42
|
Hi Jost Yes, HibRepository.java is my class. Let me double check on the config properties -----Original Message----- From: Jost Boekemeier [mailto:jos...@ya...]=20 Sent: Thursday, September 22, 2005 12:19 PM To: Bharath Thirunavukkarasu; php...@li... Subject: Ant: [Php-java-bridge-users] exception when using a method that takes a boolean Hi, >Caused by: >java.lang.NullPointerException at >com.apostek.service.system.repository.impl.hibernate.HibRepository.getS essionContext(HibRepository.java:176) at this sounds as if some config properties are missing. Is HibRepository.java one of your classes? Regards, Jost Boekemeier =09 =09 =09 ___________________________________________________________=20 Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: Ben G. <be...@ja...> - 2005-09-22 18:44:10
|
SQUILLACE MASSIMO wrote: > It requires an int. In one of several attempts I called the method > with an object of class java.lang.Integer and the error message > simply became: > > Fatal error: Uncaught [class java.lang.Exception: > java.lang.Exception: Invoke failed: [class > com.ibm.mq.MQQueueManager]->accessQueue(class java.lang.String, class > java.lang.Integer). Cause: java.lang.IllegalArgumentException: > java.lang.ClassCastException@1a786c3] Shouldn't java autobox/autounbox Integer to int and vice versa? It will if you are using java 1.5 at least. -- Ben Gollmer Jatosoft LLC |