|
From: <php...@li...> - 2007-05-02 08:57:48
|
I am using php/java bridge 3.1.8. I am having the interesting case that in
my PHP code I do a
$classpath='...';
java_require($classpath);
try {
$var=new Java('class.name.here'); // the constructor has no
paramete
} catch(JavaException $exeption) {
throw new Exception('Java-exception creating object of class
"class.name.here": '.$exeption);
}
if ($var) {
// using the object...
} else {
echo 'got a null object... :-( ';
}
Initially I was getting misc. ClassNotFound-Exceptions until I got my
classpath right. The classpath seems to be OK now, but now I am NOT getting
any JavaException but I get back a null-object, i.e. I am falling into the
echo ... statement in the above snippet.
How can I figure out, what's going wrong here and why???
Michael
|
|
From: <php...@li...> - 2007-05-02 09:41:21
|
Hi,
you're right that new Java(...) cannot return NULL.
> How can I figure out, what's going wrong here and
> why???
You can look at the protocol level. Either set the log
level to 4 or above or, if you use linux, type:
strace -s 1024 php yourPhpScript.php >error.log
You will see something like:
--> <C p=... v=...>...</C>
<-- <O v=.../>
Which PHP version do you use, btw?
Regards,
Jost Boekemeier
--- php...@li...
schrieb:
>
> I am using php/java bridge 3.1.8. I am having the
> interesting case that in
> my PHP code I do a
>
> $classpath='...';
> java_require($classpath);
> try {
> $var=new Java('class.name.here'); //
> the constructor has no
> paramete
> } catch(JavaException $exeption) {
> throw new Exception('Java-exception
> creating object of class
> "class.name.here": '.$exeption);
> }
> if ($var) {
> // using the object...
> } else {
> echo 'got a null object... :-( ';
> }
>
> Initially I was getting misc.
> ClassNotFound-Exceptions until I got my
> classpath right. The classpath seems to be OK now,
> but now I am NOT getting
> any JavaException but I get back a null-object, i.e.
> I am falling into the
> echo ... statement in the above snippet.
>
> How can I figure out, what's going wrong here and
> why???
>
> Michael
>
>
>
-------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2
> express and take
> control of your XML. No limits. Just data. Click to
> get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> php-java-bridge-users mailing list
> php...@li...
>
https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
>
Heute schon einen Blick in die Zukunft von E-Mails wagen? Versuchen Sie´s mit dem neuen Yahoo! Mail. www.yahoo.de/mail
|
|
From: <php...@li...> - 2007-05-02 12:04:08
|
Hi, Please open a ticket, please use http://sourceforge.net/tracker/?func=add&group_id=117793&atid=679233 and attach the log of the bridge there. We'll check this issue asap. Regards, Jost Boekemeier --- php...@li... schrieb: > Hi, > > you're right that new Java(...) cannot return NULL. > > > How can I figure out, what's going wrong here and > > why??? > > You can look at the protocol level. Either set the > log > level to 4 or above or, if you use linux, type: > > strace -s 1024 php yourPhpScript.php >error.log > > You will see something like: > > --> <C p=... v=...>...</C> > <-- <O v=.../> > > > Which PHP version do you use, btw? > > > Regards, > Jost Boekemeier > > > > --- php...@li... > schrieb: > > > > > I am using php/java bridge 3.1.8. I am having the > > interesting case that in > > my PHP code I do a > > > > $classpath='...'; > > java_require($classpath); > > try { > > $var=new Java('class.name.here'); // > > the constructor has no > > paramete > > } catch(JavaException $exeption) { > > throw new Exception('Java-exception > > creating object of class > > "class.name.here": '.$exeption); > > } > > if ($var) { > > // using the object... > > } else { > > echo 'got a null object... :-( '; > > } > > > > Initially I was getting misc. > > ClassNotFound-Exceptions until I got my > > classpath right. The classpath seems to be OK now, > > but now I am NOT getting > > any JavaException but I get back a null-object, > i.e. > > I am falling into the > > echo ... statement in the above snippet. > > > > How can I figure out, what's going wrong here and > > why??? > > > > Michael > > > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 > > express and take > > control of your XML. No limits. Just data. Click > to > > get it now. > > http://sourceforge.net/powerbar/db2/ > > _______________________________________________ > > php-java-bridge-users mailing list > > php...@li... > > > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > > > > > > Heute schon einen Blick in die Zukunft von > E-Mails wagen? Versuchen Sie´s mit dem neuen Yahoo! > Mail. www.yahoo.de/mail > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 > express and take > control of your XML. No limits. Just data. Click to > get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > __________________________________ Yahoo! Clever - Der einfachste Weg, Fragen zu stellen und Wissenswertes mit Anderen zu teilen. www.yahoo.de/clever |
|
From: <php...@li...> - 2007-05-03 06:06:27
|
Hi
For my application, most of the methods use generic as a parameter or
return value (e.g. List<Foo>). Does the bridge support generic systax.
If it does, could I have a link to the document?
Could the syntax be like?
new java("java.util.List<String>");
|
|
From: <php...@li...> - 2007-05-03 10:20:19
|
Hi,
> For my application, most of the methods use
> generic as a parameter or
Yes, generics (implemented as erasures) are no problem
for the bridge. Please see our FAQ for details. Real
generics, as proposed by the Rice people (which could
be the base of a proper java module system) need some
adjustment within the bridge code.
> Does the bridge
> support generic systax.
You probably mean "does the bridge support java
generics"? Yes, it does.
Does it support a generic syntax? No. Java only
supports generics on its surface, the byte code below
is still the same as in java 1.4.
Implementing a syntax transformer (something like
Scheme's define-syntax) for PHP is outside the scope
of the PHP/Java Bridge.
> Could the syntax be like?
> new java("java.util.List<String>");
The syntax is:
new java("java.util.List");
Regards,
Jost Boekemeier
--- php...@li...
schrieb:
> Hi
> For my application, most of the methods use
> generic as a parameter or
> return value (e.g. List<Foo>). Does the bridge
> support generic systax.
> If it does, could I have a link to the document?
>
> Could the syntax be like?
> new java("java.util.List<String>");
>
>
-------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2
> express and take
> control of your XML. No limits. Just data. Click to
> get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> php-java-bridge-users mailing list
> php...@li...
>
https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
>
__________________________________ Kennt man wirklich jeden über 3 Ecken? Die Antworten gibt's bei Yahoo! Clever. www.yahoo.de/clever
|
|
From: <php...@li...> - 2007-05-03 11:21:51
|
> Which PHP version do you use, btw?
I mentioned that in the very first line of my append: 3.1.8.
Michael :-)
=
From: php...@li... =
=
To: php...@li... =
=
Date: 02.05.2007 11:42 =
=
Subject: Re: [Php-java-bridge-users] Getting back null-object from=
new Java(...) - how to debug this?
=
Hi,
you're right that new Java(...) cannot return NULL.
> How can I figure out, what's going wrong here and
> why???
You can look at the protocol level. Either set the log
level to 4 or above or, if you use linux, type:
strace -s 1024 php yourPhpScript.php >error.log
You will see something like:
--> <C p=3D... v=3D...>...</C>
<-- <O v=3D.../>
Which PHP version do you use, btw?
Regards,
Jost Boekemeier
--- php...@li...
schrieb:
>
> I am using php/java bridge 3.1.8. I am having the
> interesting case that in
> my PHP code I do a
>
> $classpath=3D'...';
> java_require($classpath);
> try {
> $var=3Dnew Java('class.name.here'); //
> the constructor has no
> paramete
> } catch(JavaException $exeption) {
> throw new Exception('Java-exception
> creating object of class
> "class.name.here": '.$exeption);
> }
> if ($var) {
> // using the object...
> } else {
> echo 'got a null object... :-( ';
> }
>
> Initially I was getting misc.
> ClassNotFound-Exceptions until I got my
> classpath right. The classpath seems to be OK now,
> but now I am NOT getting
> any JavaException but I get back a null-object, i.e.
> I am falling into the
> echo ... statement in the above snippet.
>
> How can I figure out, what's going wrong here and
> why???
>
> Michael
>
>
>
-----------------------------------------------------------------------=
--
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2
> express and take
> control of your XML. No limits. Just data. Click to
> get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> php-java-bridge-users mailing list
> php...@li...
>
https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
>
Heute schon einen Blick in die Zukunft von E-Mails wagen? Versuch=
en
Sie=B4s mit dem neuen Yahoo! Mail. www.yahoo.de/mail
-----------------------------------------------------------------------=
--
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
php-java-bridge-users mailing list
php...@li...
https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
=
|
|
From: <php...@li...> - 2007-05-04 08:46:48
|
Hi Michael,
> > Which PHP version do you use, btw?
>
> I mentioned that in the very first line of my
> append: 3.1.8.
Are you sure? IMHO the PHP/Java Bridge only supports
PHP 4.3.2 and above.
Or do you use some other PHP implementation?
Regards,
Jost Boekemeier
__________________________________ Yahoo! Clever - Der einfachste Weg, Fragen zu stellen und Wissenswertes mit Anderen zu teilen. www.yahoo.de/clever
|
|
From: <php...@li...> - 2007-05-04 12:09:16
|
Ooops - sorry - my error: you had asked for the PHP version not the PHP/Java-bridge version: I am using PHP 5.1.6. Michael php...@li... wrote on 04.05.2007 10:46:43: > Hi Michael, > > > > Which PHP version do you use, btw? > > > > I mentioned that in the very first line of my > > append: 3.1.8. > > Are you sure? IMHO the PHP/Java Bridge only supports > PHP 4.3.2 and above. > > Or do you use some other PHP implementation? > > > Regards, > Jost Boekemeier > > > > __________________________________ Yahoo! Clever - Der > einfachste Weg, Fragen zu stellen und Wissenswertes mit Anderen zu teilen. > www.yahoo.de/clever > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
|
From: <php...@li...> - 2007-05-03 15:28:30
|
Sorry, but that instruction was to terse for me. How/where exactly do I set that protocol level so that I can monitor what is going on? I am running the PHP/Java bridge 1.3.8 on XAMPP v1.5.4a on a Windows XP box and I enabled the PHP/Java bridge by placing the files "WEB-INF\lib\JavaBridge.jar" and "WEB-INF\cgi\java-x86-windows.dll" (extracted from the file "JavaBridge.war") into C:\Program Files\xampp\php\ext (the latter under the name "php_java.dll" and adding a line "extension=php_java.dll" to php.ini). That's at least how I learned to install and enable the php/java bridge... Michael php...@li... wrote on 02.05.2007 11:41:14: > Hi, > > you're right that new Java(...) cannot return NULL. > > > How can I figure out, what's going wrong here and > > why??? > > You can look at the protocol level. Either set the log > level to 4 or above or, if you use linux, type: > > strace -s 1024 php yourPhpScript.php >error.log > > You will see something like: > > --> <C p=... v=...>...</C> > <-- <O v=.../> > > > Which PHP version do you use, btw? > > > Regards, > Jost Boekemeier |
|
From: <php...@li...> - 2007-05-03 15:47:05
|
php...@li... wrote on 03.05.2007 17:27:58: > Sorry, but that instruction was to terse for me. How/where exactly do I set > that protocol level so that I can monitor what is going on? > ... OK - I figured this out myself, how to enable the logging: The result looks as follows: ------------------------------------------ ... May 03 17:41:28 JavaBridge DEBUG: 72a872a8@36143614 START: JavaBridge.run() May 03 17:41:28 JavaBridge DEBUG: 72a872a8@36143614 Request from client with uid/gid -1/-1 May 03 17:41:28 JavaBridge DEBUG: 72a872a8@36143614 --> <I v="0" m="updateJarLibraryPath" p="I" i="67f0070" > May 03 17:41:28 JavaBridge DEBUG: 72a872a8@36143614 --> <S v="C:\Programs\xampp\htdocs\demo\lib\nci.jar" /> May 03 17:41:28 JavaBridge DEBUG: 72a872a8@36143614 --> <S v="C:\Programs\xampp\php\ext\" /> May 03 17:41:28 JavaBridge DEBUG: 72a872a8@36143614 --> </I> May 03 17:41:28 JavaBridge DEBUG: 72a872a8@36143614 <-- <N i="67f0070"/> May 03 17:41:28 JavaBridge DEBUG: 72a872a8@36143614 --> <C v="test.NCI" p="I" i="67f0070" /> May 03 17:41:28 JavaBridge DEBUG: 72a872a8@36143614 --> </C> NCI-ctor() May 03 17:41:28 JavaBridge DEBUG: 72a872a8@36143614 <-- <O v="1" p="O" i="67f0070"/> May 03 17:41:28 JavaBridge DEBUG: 72a872a8@36143614 --> <I v="0" m="castToBoolean" p="I" i="61bf1c4" /> May 03 17:41:28 JavaBridge DEBUG: 72a872a8@36143614 --> <O v="1" /> May 03 17:41:28 JavaBridge DEBUG: 72a872a8@36143614 --> </I> May 03 17:41:28 JavaBridge DEBUG: 72a872a8@36143614 <-- <B v="T" i="61bf1c4"/> May 03 17:41:28 JavaBridge DEBUG: 72a872a8@36143614 --> <U v="1" /> May 03 17:41:28 JavaBridge DEBUG: 72a872a8@36143614 --> <F p="A" /> May 03 17:41:28 JavaBridge DEBUG: 72a872a8@36143614 <-- <F p="A"/> ------------------------------------------ OK - and what exactly does that now tell us??? Michael (puzzled...) |
|
From: <php...@li...> - 2007-05-03 22:28:45
|
Continuing to investigate on this new Java('...') call that returns a null
I pushed the log-level even higher and I am now getting this log from the
PHP/Java bridge:
-------------------------------------------------
May 04 00:03:44 JavaBridge INFO : JavaBridge version : 3.1.8
May 04 00:03:44 JavaBridge INFO : JavaBridge logFile :
C:\temp\php-java-bridge.log
May 04 00:03:44 JavaBridge INFO : JavaBridge default logLevel: 5
May 04 00:03:44 JavaBridge INFO : JavaBridge socket :
INET_LOCAL:9270
May 04 00:03:44 JavaBridge INFO : JavaBridge thread pool size: 20
May 04 00:03:44 JavaBridge DEBUG: Starting to accept Socket connections
May 04 00:03:46 JavaBridge DEBUG: Socket connection accepted
May 04 00:03:46 JavaBridge DEBUG: Starting bridge from Thread Pool
May 04 00:03:46 JavaBridge DEBUG: 6fee6fee@33563356 START: JavaBridge.run()
May 04 00:03:46 JavaBridge DEBUG: 6fee6fee@33563356 Request from client
with uid/gid -1/-1
May 04 00:03:46 JavaBridge DEBUG: 6fee6fee@33563356 --> <I v="0"
m="updateJarLibraryPath" p="I" i="6be6668" >
May 04 00:03:46 JavaBridge DEBUG: 6fee6fee@33563356 --> <S
v="C:\Programs\xampp\htdocs\demo\lib\nci.jar" />
May 04 00:03:46 JavaBridge DEBUG: 6fee6fee@33563356 --> <S
v="C:\Programs\xampp\php\ext\" />
May 04 00:03:46 JavaBridge DEBUG: 6fee6fee@33563356 --> </I>
May 04 00:03:46 JavaBridge DEBUG:
Invoking [Object 1877897198 - Class:
php.java.bridge.JavaBridge:ID1080574056:LOADER-ID382211784].updateJarLibraryPath([Object
791555886 - Class: java.lang.String:ID51184397:LOADER-ID0],[Object
876229690 - Class: java.lang.String:ID51184397:LOADER-ID0]);
May 04 00:03:47 JavaBridge DEBUG: Added LOADER-ID1560567044
OrigPath: ;C:\Programs\xampp\htdocs\demo\lib\nci.jar
Translated: file:C:\Programs\xampp\htdocs\demo\lib\nci.jar
May 04 00:03:47 JavaBridge DEBUG:
Result [Object null]
May 04 00:03:47 JavaBridge DEBUG: 6fee6fee@33563356 <-- <N i="6be6668"/>
May 04 00:03:47 JavaBridge DEBUG: 6fee6fee@33563356 --> <C v="demo.NCI"
p="I" i="6be6668" />
May 04 00:03:47 JavaBridge DEBUG: 6fee6fee@33563356 --> </C>
May 04 00:03:47 JavaBridge DEBUG: trying to load class: demo.NCI from:
LOADER-ID1560567044
May 04 00:03:47 JavaBridge DEBUG: trying to load class: java.lang.Object
from: LOADER-ID1560567044
May 04 00:03:47 JavaBridge DEBUG: trying to load class: org.w3c.dom.Node
from: LOADER-ID1560567044
May 04 00:03:47 JavaBridge DEBUG: trying to load class: java.lang.String
from: LOADER-ID1560567044
May 04 00:03:47 JavaBridge DEBUG: trying to load class: java.lang.Throwable
from: LOADER-ID1560567044
May 04 00:03:47 JavaBridge DEBUG: trying to load class: java.lang.Exception
from: LOADER-ID1560567044
May 04 00:03:47 JavaBridge DEBUG: trying to load class:
java.lang.reflect.Method from: LOADER-ID1560567044
May 04 00:03:47 JavaBridge DEBUG: trying to load class:
org.apache.muse.ws.notification.NotificationMessage from:
LOADER-ID1560567044
May 04 00:03:47 JavaBridge DEBUG: trying to load class:
org.apache.muse.util.xml.XmlSerializable from: LOADER-ID1560567044
May 04 00:03:47 JavaBridge DEBUG: trying to load class:
demo.NCI$UsageException from: LOADER-ID1560567044
May 04 00:03:47 JavaBridge DEBUG: trying to load class:
java.util.MissingResourceException from: LOADER-ID1560567044
May 04 00:03:47 JavaBridge DEBUG: trying to load class:
policies.MyServiceProxy from: LOADER-ID1560567044
May 04 00:03:47 JavaBridge DEBUG: trying to load class:
org.apache.muse.ws.notification.remote.NotificationConsumerClient from:
LOADER-ID1560567044
May 04 00:03:47 JavaBridge DEBUG: trying to load class:
org.apache.muse.ws.resource.remote.WsResourceClient from:
LOADER-ID1560567044
May 04 00:03:47 JavaBridge DEBUG: trying to load class:
org.apache.muse.core.AbstractResourceClient from: LOADER-ID1560567044
May 04 00:03:47 JavaBridge DEBUG: trying to load class:
org.apache.muse.util.Traceable from: LOADER-ID1560567044
May 04 00:03:47 JavaBridge DEBUG: trying to load class:
org.apache.muse.ws.addressing.soap.SoapMonitor from: LOADER-ID1560567044
May 04 00:03:47 JavaBridge DEBUG: trying to load class: policies.MyService
from: LOADER-ID1560567044
May 04 00:03:47 JavaBridge DEBUG: trying to load class: java.lang.Class
from: LOADER-ID1560567044
May 04 00:03:47 JavaBridge DEBUG: trying to load class:
java.util.ResourceBundle from: LOADER-ID1560567044
May 04 00:03:47 JavaBridge DEBUG: trying to load class: demo.NCI from:
LOADER-ID1560567044
May 04 00:03:47 JavaBridge DEBUG: trying to load class: demo.NCI_en from:
LOADER-ID1560567044
May 04 00:03:47 JavaBridge DEBUG: trying to load class: demo.NCI_en_US
from: LOADER-ID1560567044
May 04 00:03:47 JavaBridge DEBUG: trying to load class:
java.lang.StringBuilder from: LOADER-ID1560567044
May 04 00:03:47 JavaBridge DEBUG: trying to load class: java.lang.Boolean
from: LOADER-ID1560567044
May 04 00:03:47 JavaBridge DEBUG: trying to load class: java.lang.System
from: LOADER-ID1560567044
May 04 00:03:47 JavaBridge DEBUG: trying to load class: java.io.PrintStream
from: LOADER-ID1560567044
NCI-ctor()
May 04 00:03:47 JavaBridge DEBUG:
Invoking [Object 1472616390 - Class:
demo.NCI:ID1344884777:LOADER-ID1560567044].demo.NCI();
May 04 00:03:47 JavaBridge DEBUG: 6fee6fee@33563356 <-- <O v="1" p="O"
i="6be6668"/>
May 04 00:03:47 JavaBridge DEBUG: 6fee6fee@33563356 --> <I v="0"
m="castToBoolean" p="I" i="63bf1c4" />
May 04 00:03:47 JavaBridge DEBUG: 6fee6fee@33563356 --> <O v="1" />
May 04 00:03:47 JavaBridge DEBUG: 6fee6fee@33563356 --> </I>
May 04 00:03:47 JavaBridge DEBUG:
Invoking [Object 1877897198 - Class:
php.java.bridge.JavaBridge:ID1080574056:LOADER-ID382211784].castToBoolean([Object
1472616390 - Class: demo.NCI:ID1344884777:LOADER-ID1560567044]);
May 04 00:03:47 JavaBridge DEBUG:
Result [Object 1472616390 - Class:
demo.NCI:ID1344884777:LOADER-ID1560567044]
May 04 00:03:47 JavaBridge DEBUG: 6fee6fee@33563356 <-- <B v="T"
i="63bf1c4"/>
May 04 00:03:47 JavaBridge DEBUG: 6fee6fee@33563356 --> <U v="1" />
May 04 00:03:47 JavaBridge DEBUG: 6fee6fee@33563356 --> <F p="A" />
May 04 00:03:47 JavaBridge DEBUG: end: Thread[JavaBridge#1,5,JavaBridge#1]
May 04 00:03:47 JavaBridge DEBUG: 6fee6fee@33563356 <-- <F p="A"/>
May 04 00:05:07 JavaBridge DEBUG: 6fee6fee@33563356 --> <I v="0"
m="updateJarLibraryPath" p="I" i="6bdd710" >
May 04 00:05:07 JavaBridge DEBUG: 6fee6fee@33563356 --> <S
v="C:\Programs\xampp\htdocs\demo\lib\nci.jar" />
May 04 00:05:07 JavaBridge DEBUG: 6fee6fee@33563356 --> <S
v="C:\Programs\xampp\php\ext\" />
May 04 00:05:07 JavaBridge DEBUG: 6fee6fee@33563356 --> </I>
May 04 00:05:07 JavaBridge DEBUG:
Invoking [Object 1877897198 - Class:
php.java.bridge.JavaBridge:ID1080574056:LOADER-ID382211784].updateJarLibraryPath([Object
1595957024 - Class: java.lang.String:ID51184397:LOADER-ID0],[Object
1680630828 - Class: java.lang.String:ID51184397:LOADER-ID0]);
May 04 00:05:07 JavaBridge DEBUG:
Result [Object null]
May 04 00:05:07 JavaBridge DEBUG: 6fee6fee@33563356 <-- <N i="6bdd710"/>
May 04 00:05:07 JavaBridge DEBUG: 6fee6fee@33563356 --> <C v="demo.NCI"
p="I" i="6bdd710" />
May 04 00:05:07 JavaBridge DEBUG: 6fee6fee@33563356 --> </C>
NCI-ctor()
May 04 00:05:07 JavaBridge DEBUG:
Invoking [Object 2059172540 - Class:
demo.NCI:ID1344884777:LOADER-ID1560567044].demo.NCI();
May 04 00:05:07 JavaBridge DEBUG: 6fee6fee@33563356 <-- <O v="1" p="O"
i="6bdd710"/>
May 04 00:05:07 JavaBridge DEBUG: 6fee6fee@33563356 --> <I v="0"
m="castToBoolean" p="I" i="63bf1c4" />
May 04 00:05:07 JavaBridge DEBUG: 6fee6fee@33563356 --> <O v="1" />
May 04 00:05:07 JavaBridge DEBUG: 6fee6fee@33563356 --> </I>
May 04 00:05:07 JavaBridge DEBUG:
Invoking [Object 1877897198 - Class:
php.java.bridge.JavaBridge:ID1080574056:LOADER-ID382211784].castToBoolean([Object
2059172540 - Class: demo.NCI:ID1344884777:LOADER-ID1560567044]);
May 04 00:05:07 JavaBridge DEBUG:
Result [Object 2059172540 - Class:
demo.NCI:ID1344884777:LOADER-ID1560567044]
May 04 00:05:07 JavaBridge DEBUG: 6fee6fee@33563356 <-- <B v="T"
i="63bf1c4"/>
May 04 00:05:07 JavaBridge DEBUG: 6fee6fee@33563356 --> <U v="1" />
May 04 00:05:07 JavaBridge DEBUG: 6fee6fee@33563356 --> <F p="A" />
May 04 00:05:07 JavaBridge DEBUG: end: Thread[JavaBridge#1,5,JavaBridge#1]
May 04 00:05:07 JavaBridge DEBUG: 6fee6fee@33563356 <-- <F p="A"/>
-------------------------------------------------
The "NCI-ctor()" line (about 20th from bottom) comes from the constructor,
which reads:
...
public NCI() {
System.out.println("NCI-ctor()");
}
...
and since it's the only thing the constructor does, I would assume that it
also completes.
That means, it is the returning of the object that must fail, or how could
I otherwise get a null back from the constructor?
But the line
...
Result [Object 2059172540 - Class:
demo.NCI:ID1344884777:LOADER-ID1560567044]
...
(seventh line from the bottom) suggests that there actually IS some object
returned, so why does the PHP-code then obtain a null???
Really puzzled!
Michael
|
|
From: <php...@li...> - 2007-05-04 09:02:01
|
--> <C v="demo.NCI" p="I" i="6be6668" />
--> </C>
<-- <O v="1" p="O" i="6be6668"/>
--> <I v="0" m="castToBoolean" p="I" i="63bf1c4" />
--> <O v="1" />
--> </I>
According to the protocol you use the following code:
$obj = (boolean) new java("demo.NCI");
The result of the cast is true.
<-- <B v="T" i="63bf1c4"/>
At least on protocol level there's nothing wrong with
your code; you've casted the result object to a PHP
boolean value.
I don't know where the boolean cast comes from and why
you or the PHP interpreter confuses the PHP boolean
value with a PHP null object.
Which PHP version do you use? And how exactly does the
code look like? Note that PHP sometimes uses implicit
casts, depending on the context, for example "$obj"
implicitly casts $obj to a PHP string value.
Regards,
Jost Boekemeier
__________________________________ Yahoo! Clever: Sie haben Fragen? Yahoo! Nutzer antworten Ihnen. www.yahoo.de/clever
|
|
From: <php...@li...> - 2007-05-04 12:13:15
|
Gee (blush) - how embarrassing: I had been looking at this code snippet at
least a hundred times now and in the end it turned out, that my condition
actually read
if (!$var) { ...
instead of:
if ($var) { ...
Somehow my eyes and brain always ignored to see that '!' between the '('
and the '$'
It's all up and settled now! Sorry for the bandwidth abused,
Michael
|
|
From: <php...@li...> - 2007-05-06 23:00:54
|
Hi, What is a proper way to set (incoporate) my application log4j.properties file in java bridge? As I know log4j properties are set just once; since it was set by java bridge, it ignored my own log4.properties. =20 Could I use eclipse to debug my code and inspect the values at the point where the bridge invoking a method in my app? Currently, my backend is a standalone app. Thanks for your time |
|
From: <php...@li...> - 2007-05-13 12:39:46
|
Hi,
[please excuse the delay]
> What is a proper way to set (incoporate) my
> application
> log4j.properties file in java bridge? As I know
I assume "log4j.properties" is some kind of
configuration file for the "log4j" java library. Such
config files belong to a dedicated config directory
(please see your J2EE server for details) or into the
classpath, for example php.java.bridge.base/lib
(usually: $HOME/lib).
> Could I use eclipse to debug my code and inspect the
> values at the point
> where the bridge invoking a method in my app?
Yes. The PHP/Java Bridge has been developed this way.
Regards,
Jost Boekemeier
Heute schon einen Blick in die Zukunft von E-Mails wagen? Versuchen Sie´s mit dem neuen Yahoo! Mail. www.yahoo.de/mail
|
|
From: <php...@li...> - 2007-05-13 15:02:59
|
I am running standalone backend on an XP platform. This is how I start =
the standalone bridge
C:\wamp\php\ext>java -Dconfig.file=3Doc25app.conf =
-Djava.library.path=3Dc:/wamp/php/ext/ =
-Djava.class.path=3Dc:/wamp/php/ext/JavaBridge.jar -Djav
a.awt.headless=3Dtrue -Dphp.java.bridge.base=3Dc:/wamp/php/ext/ =
php.java.bridge.Standalone INET_LOCAL:0 5 C:\wamp\logs\bridge.log
and This is what I see in the console
@9267
JavaBridge log: C:\wamp\logs\bridge.log
My log4j.properties was in in the classpath, but I still did not see any =
log in the console. I also coded System.out.println() and did not see =
any msg in the console.
I searched and found one of your post in the archive mail, I wonder =
whether this is the same case. Thanks
-------------------------------------------------------
> Also, once deploying the package it seems that
> logging from that point
> becomes disabled, e.g. no further server messages
> are shown - is this a
> default behaviour within the app itself?
The JavaBridge.war contains a log4j.jar library. This
library is responsible for this behaviour. I will
remove log4j from the war file.
Regards,
Jost Boekemeier
--------------------------------------------------------
=20
-----Original Message-----
From: php...@li... =
[mailto:php...@li...] On Behalf =
Of php...@li...
Sent: Sunday, May 13, 2007 5:40 AM
To: php...@li...
Subject: Re: [Php-java-bridge-users] Log4j.properties setting and =
eclipsedebugging
Hi,
[please excuse the delay]
> What is a proper way to set (incoporate) my
> application
> log4j.properties file in java bridge? As I know
I assume "log4j.properties" is some kind of
configuration file for the "log4j" java library. Such
config files belong to a dedicated config directory
(please see your J2EE server for details) or into the
classpath, for example php.java.bridge.base/lib
(usually: $HOME/lib).
> Could I use eclipse to debug my code and inspect the
> values at the point
> where the bridge invoking a method in my app?
Yes. The PHP/Java Bridge has been developed this way.
Regards,
Jost Boekemeier
Heute schon einen Blick in die Zukunft von E-Mails wagen? =
Versuchen Sie=B4s mit dem neuen Yahoo! Mail. www.yahoo.de/mail
-------------------------------------------------------------------------=
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
php-java-bridge-users mailing list
php...@li...
https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
|
|
From: <php...@li...> - 2007-05-13 17:07:22
|
I found System.out.close() in the Standalone.java. It explained why I =
could not see my own System.out.println(). I also found my log file :-) =
hidden under the ../ext
-----Original Message-----
From: php...@li... =
[mailto:php...@li...] On Behalf =
Of php...@li...
Sent: Sunday, May 13, 2007 8:03 AM
To: php...@li...
Subject: Re: [Php-java-bridge-users] Log4j.properties setting =
andeclipsedebugging
I am running standalone backend on an XP platform. This is how I start =
the standalone bridge
C:\wamp\php\ext>java -Dconfig.file=3Doc25app.conf =
-Djava.library.path=3Dc:/wamp/php/ext/ =
-Djava.class.path=3Dc:/wamp/php/ext/JavaBridge.jar -Djav
a.awt.headless=3Dtrue -Dphp.java.bridge.base=3Dc:/wamp/php/ext/ =
php.java.bridge.Standalone INET_LOCAL:0 5 C:\wamp\logs\bridge.log
and This is what I see in the console
@9267
JavaBridge log: C:\wamp\logs\bridge.log
My log4j.properties was in in the classpath, but I still did not see any =
log in the console. I also coded System.out.println() and did not see =
any msg in the console.
I searched and found one of your post in the archive mail, I wonder =
whether this is the same case. Thanks
-------------------------------------------------------
> Also, once deploying the package it seems that
> logging from that point
> becomes disabled, e.g. no further server messages
> are shown - is this a
> default behaviour within the app itself?
The JavaBridge.war contains a log4j.jar library. This
library is responsible for this behaviour. I will
remove log4j from the war file.
Regards,
Jost Boekemeier
--------------------------------------------------------
=20
-----Original Message-----
From: php...@li... =
[mailto:php...@li...] On Behalf =
Of php...@li...
Sent: Sunday, May 13, 2007 5:40 AM
To: php...@li...
Subject: Re: [Php-java-bridge-users] Log4j.properties setting and =
eclipsedebugging
Hi,
[please excuse the delay]
> What is a proper way to set (incoporate) my
> application
> log4j.properties file in java bridge? As I know
I assume "log4j.properties" is some kind of
configuration file for the "log4j" java library. Such
config files belong to a dedicated config directory
(please see your J2EE server for details) or into the
classpath, for example php.java.bridge.base/lib
(usually: $HOME/lib).
> Could I use eclipse to debug my code and inspect the
> values at the point
> where the bridge invoking a method in my app?
Yes. The PHP/Java Bridge has been developed this way.
Regards,
Jost Boekemeier
Heute schon einen Blick in die Zukunft von E-Mails wagen? =
Versuchen Sie=B4s mit dem neuen Yahoo! Mail. www.yahoo.de/mail
-------------------------------------------------------------------------=
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
php-java-bridge-users mailing list
php...@li...
https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
-------------------------------------------------------------------------=
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
php-java-bridge-users mailing list
php...@li...
https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
|
|
From: <php...@li...> - 2007-05-14 01:08:27
|
After recompiling and install java bridge on my linux box, I no longer find the entry max_execution_time in the php.ini file. When visiting phpinfo.php, I do see the value of max_execution_time, default to 30 seconds, which meant phpinfo.php has picked up this value somewhere. Which file should I use to set value for max_execution_time? =20 |
|
From: <php...@li...> - 2007-05-15 11:02:16
|
Hi,
> After recompiling and install java bridge on my
> linux box, I no longer
> find the entry max_execution_time in the php.ini
> file.
well, the PHP/Java Bridge doesn't change your php.ini
file.
If entries have changed, you must have changed them
yourself (probably through some scripts). -- The
source distribution contains a install.sh script,
which checks if your PHP installation supports a
config scan dir, and if it doesn't, it asks you if it
should write a new config file. It saves the old one
of course.
In any case, this isn't a problem with the PHP/Java
Bridge or its setup.
Regards,
Jost Boekemeier
Heute schon einen Blick in die Zukunft von E-Mails wagen? Versuchen Sie´s mit dem neuen Yahoo! Mail. www.yahoo.de/mail
|
|
From: <php...@li...> - 2007-05-15 18:06:15
|
Jost,
You're quite right. Thanks for replying to my question. =20
Regards,
Joe
-----Original Message-----
From: php...@li... =
[mailto:php...@li...] On Behalf =
Of php...@li...
Sent: Tuesday, May 15, 2007 4:02 AM
To: php...@li...
Subject: Re: [Php-java-bridge-users] setting php max_execution_time
Hi,
> After recompiling and install java bridge on my
> linux box, I no longer
> find the entry max_execution_time in the php.ini
> file. =20
well, the PHP/Java Bridge doesn't change your php.ini
file.=20
If entries have changed, you must have changed them
yourself (probably through some scripts). -- The
source distribution contains a install.sh script,
which checks if your PHP installation supports a
config scan dir, and if it doesn't, it asks you if it
should write a new config file. It saves the old one
of course.
In any case, this isn't a problem with the PHP/Java
Bridge or its setup.
Regards,
Jost Boekemeier
Heute schon einen Blick in die Zukunft von E-Mails wagen? =
Versuchen Sie=B4s mit dem neuen Yahoo! Mail. www.yahoo.de/mail
-------------------------------------------------------------------------=
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
php-java-bridge-users mailing list
php...@li...
https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
|