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
(1) |
3
(3) |
|
4
|
5
|
6
(6) |
7
(6) |
8
|
9
(1) |
10
(3) |
|
11
(1) |
12
(1) |
13
(4) |
14
(4) |
15
|
16
|
17
(8) |
|
18
(1) |
19
(4) |
20
(13) |
21
(6) |
22
(8) |
23
(7) |
24
(3) |
|
25
(6) |
26
(2) |
27
(1) |
28
(4) |
29
(7) |
30
(11) |
|
|
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 |
|
From: Jost B. <jos...@ya...> - 2005-09-22 16:18:58
|
Hi, >Caused by: >java.lang.NullPointerException at >com.apostek.service.system.repository.impl.hibernate.HibRepository.getSessionContext(HibRepository.java:176) at this sounds as if some config properties are missing. Is HibRepository.java one of your classes? 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-22 16:08:37
|
Hi,
> <?php
> $qMgr = new Java('com.ibm.mq.MQQueueManager');
> $mqc = new JavaClass('com.ibm.mq.MQC');
> $openOptions = $mqc->MQOO_INPUT_AS_Q_DEF |
> $mqc->MQOO_OUTPUT;
> $sdlq =
> $qMgr->accessQueue('SYSTEM.DEFAULT.LOCAL.QUEUE',
> $openOptions);
can you please set the java.log_level to 4 and send
the complete log for the above statements.
Please also send the *exact* version of the JVM you
use.
I have tested on two different machines, Solaris with
JRE1.5.0 and Linux with blackdown java 1.4.1. The
above code works on all of them. (I have tested with
php/java bridge 2.0.8, but that shouldn't make a
difference. The coerce code hasn't changed since
version 2.0.7).
Regards,
Jost Boekemeier
___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de
|
|
From: SQUILLACE M. <msq...@so...> - 2005-09-22 13:15:43
|
Jost,
> What about extending java_require() so that it can
> load jar files from a given directory?
That would be great, and more so if one could mix directories and single
jar files in the same call!
...
> If it requires an int then I think we wouldn't see the
ClassCastException.
> php ints (which are actually longs) are transferred as <L
v=3D"longval"/>.
> coerce can convert the longval into a int, but it cannot convert
> it into a java.lang.Integer.
...
> 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);"
I'm sure you are right, but still don't understand what I am supposed to
do ... here are a few snippets and their outcome.
1) Let's start with a method invocation where all required parameters
are missing:
<?php
$qMgr =3D new Java('com.ibm.mq.MQQueueManager');
$sdlq =3D $qMgr->accessQueue();
?>
Script output:
=20
Fatal error: Uncaught [class java.lang.Exception:
java.lang.Exception:
Invoke failed: [class com.ibm.mq.MQQueueManager]->accessQueue. Cause:
java.lang.NoSuchMethodException: accessQueue(). Candidates: [public=20
synchronized com.ibm.mq.MQQueue com.ibm.mq.MQQueueManager.accessQueue
=20
java.lang.String,int,java.lang.String,java.lang.String,java.lang.String)
throws com.ibm.mq.MQException, public synchronized com.ibm.mq.MQQueue
com.ibm.mq.MQQueueManager.accessQueue(java.lang.String,int) throws=20
com.ibm.mq.MQException]]
thrown in /opt/phpexe/jbridge/mqt.php on line 3
/var/log/php-java-bridge.log:
Java.lang.NoSuchMethodException: accessQueue(). Candidates: [public=20
synchronized com.ibm.mq.MQQueue com.ibm.mq.MQQueueManager.accessQueue
=20
java.lang.String,int,java.lang.String,java.lang.String,java.lang.String)
throws com.ibm.mq.MQException, public synchronized com.ibm.mq.MQQueue
com.ibm.mq.MQQueueManager.accessQueue(java.lang.String,int) throws=20
com.ibm.mq.MQException]=20
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)
2) What I think the snippet should look like:
<?php
$qMgr =3D new Java('com.ibm.mq.MQQueueManager');
$mqc =3D new JavaClass('com.ibm.mq.MQC');
$openOptions =3D $mqc->MQOO_INPUT_AS_Q_DEF | $mqc->MQOO_OUTPUT;
// gettype($openOptions) returns 'integer' at this point (value:17)
$sdlq =3D $qMgr->accessQueue('SYSTEM.DEFAULT.LOCAL.QUEUE',
$openOptions);
?>
Script output:
=20
Fatal error: Uncaught [class java.lang.Exception:
java.lang.Exception:=20
Invoke failed: [class com.ibm.mq.MQQueueManager]->accessQueue(class
java.lang.String,
class java.lang.Long). Cause: java.lang.IllegalArgumentException:=20
java.lang.ClassCastException@181edf4]
thrown in /opt/phpexe/jbridge/mqt.php on line 6
/var/log/php-java-bridge.log:
java.lang.IllegalArgumentException:
java.lang.ClassCastException@12d3205
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
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)
3) Let's try with a java.lang.Integer:
<?php
$qMgr =3D new Java('com.ibm.mq.MQQueueManager');
$mqc =3D new JavaClass('com.ibm.mq.MQC');
$openOptions =3D $mqc->MQOO_INPUT_AS_Q_DEF | $mqc->MQOO_OUTPUT;
// gettype($openOptions) returns 'integer' at this point (value:17)
$inte =3D new Java('java.lang.Integer', $openOptions);
$sdlq =3D $qMgr->accessQueue('SYSTEM.DEFAULT.LOCAL.QUEUE', $inte);
?>
Script output:
=20
Fatal error: Uncaught [class java.lang.Exception:
java.lang.Exception:
Invoke failed: [class com.ibm.mq.MQQueueManager]->accessQueue(class
java.lang.String,=20
class java.lang.Integer). Cause: java.lang.IllegalArgumentException:=20
java.lang.ClassCastException@2f1921]
thrown in /opt/phpexe/jbridge/mqt.php on line 7
/var/log/php-java-bridge.log:
java.lang.IllegalArgumentException:
java.lang.ClassCastException@2f1921
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
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)
In the "candidates" list from the first snippet there is a=20
com.ibm.mq.MQQueueManager.accessQueue(java.lang.String,int)
confirming what one can read from the documentation, where the method is
defined like this:
public synchronized MQQueue accessQueue(String queueName, int
openOptions)
IMHO it really looks like the method is expecting an int for the second
parameter.
If coerce converts the longvals to int, why the error in the second
snippet?
If the method expected a java.lang.Integer instead, why the error in the
last snippet?
Massimo
|
|
From: SQUILLACE M. <msq...@so...> - 2005-09-22 10:16:07
|
Ben, > Shouldn't java autobox/autounbox Integer to int and vice versa? > It will if you are using java 1.5 at least. I have a working PHP script that lists all the Java properties of the VM, and reports: ... java.vm.version: 1.5.0_01-b08 ... Massimo |
|
From: Bharath T. <bh...@mv...> - 2005-09-22 06:22:33
|
When trying to access a java method with a Boolean param=20
$jcl_sysController =3D new JavaClass("com.xxx.service.SysController");
$jobj_serviceManager =3D $jcl_sysController->getInstance();
=20
$jobj_repository =3D $jobj_serviceManager->getRepository();
$jobj_memberService =3D $jobj_serviceManager->getMemberService();
=20
$jobj_repository->begin(false);
I get this exception
java stack trace: [o(ByteArrayOutputStream):"java.lang.Exception: Invoke
failed:
[o(HibRepository):"com.xxx.service.system.repository.impl.hibernate.HibR
epository@1006d75"]->begin((boolean)o(Boolean):"false"). Cause:
java.lang.NullPointerException at
php.java.bridge.JavaBridge.setException(JavaBridge.java:560) at
php.java.bridge.JavaBridge.Invoke(JavaBridge.java:1175) at
php.java.bridge.Request.handleRequest(Request.java:204) at
php.java.bridge.Request.handleRequests(Request.java:221) at
php.java.bridge.JavaBridge.run(JavaBridge.java:233) at
php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:20) Caused by:
java.lang.NullPointerException at
com.apostek.service.system.repository.impl.hibernate.HibRepository.getSe
ssionContext(HibRepository.java:176) at
com.xxx.service.system.repository.impl.AbstractRepository.begin(Abstract
Repository.java:53) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at
java.lang.reflect.Method.invoke(Unknown Source) at
php.java.bridge.JavaBridge.Invoke(JavaBridge.java:1137) ... 4 more "]
Couldn't figure out why?
Any idea
Regards
Bharath
|
|
From: Jost B. <jos...@ya...> - 2005-09-21 18:28:22
|
Hi,
> I believe one should java_require() ALL the
> WebSphere MQ jars in each
> PHP script
What about extending java_require() so that it can
load jar files from a given directory?
In the meantime it might be possible to call
initClassLoader("dir") overriding the default
phpConfigDir. Please see
http://cvs.sourceforge.net/viewcvs.py/*checkout*/php-java-bridge/php-java-bridge/server/doc/php/java/bridge/DynamicJavaBridgeClassLoader.html#initClassLoader(java.lang.String)
> >> Apparently the bridge keeps converting the second
> >> argument (an integer)
> >> to java.lang.Long while the method mandates an
> int.
> It requires an int.
[...]
> accessQueue(class
> java.lang.String, class java.lang.Integer). Cause:
> java.lang.IllegalArgumentException:
> java.lang.ClassCastException@1a786c3]
If it requires an int then I think we wouldn't see the
ClassCastException. php ints (which are actually
longs) are transferred as <L v="longval"/>. coerce can
convert the longval into a int, but it cannot convert
it into a java.lang.Integer.
> implemented; reading the JSR 223 conversely shows it
> should be, since
> the bridge has to "adapt" the script request to the
> "most closely
> matching" method argument list.
"If members matching the name, type and arguments
specified in the script are found, the arguments may
be converted to the exact types in the best matching
member's signature and the member may be invoked."
As I understand 3.3.4 we may decide if we call the
method and we may or may not coerce the argument to
the required type. IMHO the above sentence does not
say that we must not call the method (and throw a
NoSuchMethodException) if the arguments cannot be
coerced.
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);"
Regards,
Jost Boekemeier
___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de
|