You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(6) |
Oct
(6) |
Nov
(8) |
Dec
(2) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
(19) |
Feb
(15) |
Mar
(10) |
Apr
(8) |
May
(7) |
Jun
(9) |
Jul
(13) |
Aug
(31) |
Sep
(111) |
Oct
(52) |
Nov
(72) |
Dec
(42) |
| 2006 |
Jan
(21) |
Feb
(32) |
Mar
(33) |
Apr
(24) |
May
(15) |
Jun
(40) |
Jul
(32) |
Aug
(19) |
Sep
(38) |
Oct
(37) |
Nov
(63) |
Dec
(37) |
| 2007 |
Jan
(18) |
Feb
(39) |
Mar
(69) |
Apr
(49) |
May
(71) |
Jun
(59) |
Jul
(71) |
Aug
(85) |
Sep
(46) |
Oct
(14) |
Nov
(25) |
Dec
(56) |
| 2008 |
Jan
(24) |
Feb
(77) |
Mar
(104) |
Apr
(44) |
May
(41) |
Jun
(11) |
Jul
(31) |
Aug
(59) |
Sep
(44) |
Oct
(86) |
Nov
(66) |
Dec
(93) |
| 2009 |
Jan
(88) |
Feb
(41) |
Mar
(49) |
Apr
(135) |
May
(22) |
Jun
(31) |
Jul
(60) |
Aug
(71) |
Sep
(76) |
Oct
(18) |
Nov
(52) |
Dec
(20) |
| 2010 |
Jan
(8) |
Feb
(50) |
Mar
(35) |
Apr
(48) |
May
(46) |
Jun
(84) |
Jul
(38) |
Aug
(61) |
Sep
(51) |
Oct
(31) |
Nov
(17) |
Dec
(18) |
| 2011 |
Jan
(51) |
Feb
(14) |
Mar
(17) |
Apr
(23) |
May
(15) |
Jun
(11) |
Jul
(5) |
Aug
(5) |
Sep
(15) |
Oct
(8) |
Nov
(5) |
Dec
(25) |
| 2012 |
Jan
(2) |
Feb
(4) |
Mar
(6) |
Apr
(9) |
May
(27) |
Jun
(32) |
Jul
(36) |
Aug
(10) |
Sep
(16) |
Oct
(3) |
Nov
(13) |
Dec
(7) |
| 2013 |
Jan
(1) |
Feb
(4) |
Mar
|
Apr
(1) |
May
|
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(4) |
Oct
(2) |
Nov
(1) |
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
(2) |
Apr
(1) |
May
(2) |
Jun
(9) |
Jul
(5) |
Aug
(2) |
Sep
(4) |
Oct
|
Nov
|
Dec
|
| 2015 |
Jan
(3) |
Feb
(2) |
Mar
(4) |
Apr
(3) |
May
(1) |
Jun
(2) |
Jul
|
Aug
(2) |
Sep
(5) |
Oct
(1) |
Nov
|
Dec
|
| 2016 |
Jan
|
Feb
(5) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(5) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
| 2017 |
Jan
(6) |
Feb
|
Mar
|
Apr
(10) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(1) |
Dec
|
| 2018 |
Jan
(2) |
Feb
(5) |
Mar
|
Apr
|
May
(1) |
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
| 2021 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2023 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
1
|
|
2
|
3
(2) |
4
(17) |
5
(5) |
6
(7) |
7
(11) |
8
(11) |
|
9
(3) |
10
(3) |
11
(9) |
12
(6) |
13
(11) |
14
(3) |
15
(2) |
|
16
(1) |
17
(4) |
18
|
19
|
20
(2) |
21
(2) |
22
(3) |
|
23
|
24
|
25
|
26
|
27
(1) |
28
(1) |
29
|
|
30
|
31
|
|
|
|
|
|
|
From: <php...@li...> - 2008-03-13 17:27:23
|
Hi,
> So it seems it is failing because of memory issues, right? Is there a
> way to configure the amount of memory for the JavaBridge?
No. :)
The JavaBridge is a normal J2EE application, which cannot control the amount of memory available
to Java. But the J2EE server or servlet engine can.
For tomcat the option is (example for Linux):
export JAVA_OPTS="-Xmx512M"
Regards,
Jost Boekemeier
Lesen Sie Ihre E-Mails jetzt einfach von unterwegs.
www.yahoo.de/go
|
|
From: <php...@li...> - 2008-03-13 16:03:13
|
Hi, I have been doing some stress-testing, sending simultaneously some large files (2MB) to our Back-End through the JavaBridge, but they are failing. Some of the errors I get back are: protocol error: , Invalid document end at col 4. Check the back end log for details. or protocol error: , Invalid document end at col 10. Check the back end log for details. In other cases it shows various errors like: --------- Notice: fwrite() [function.fwrite]: send of 8192 bytes failed with errno=10053 An established connection was aborted by the software in your host machine. in Java.inc on line 815 protocol error: , Invalid document end at col 4. Check the back end log for details. Notice: fwrite() [function.fwrite]: send of 11 bytes failed with errno=10053 An established connection was aborted by the software in your host machine. in Java.inc on line 815 --------- Looking at the JavaBridge log file, it shows: -------- Mar 13 15:54:37 VMBridge FATAL: An error occured: java.lang.OutOfMemoryError: Java heap space java.lang.OutOfMemoryError: Java heap space at java.lang.StringCoding$StringEncoder.encode(Unknown Source) at java.lang.StringCoding.encode(Unknown Source) at java.lang.String.getBytes(Unknown Source) at php.java.bridge.FileLogger.log(FileLogger.java:70) at php.java.bridge.FileLogger.log(FileLogger.java:109) at php.java.bridge.Util.println(Util.java:358) at php.java.bridge.JavaBridge.logDebug(JavaBridge.java:360) at php.java.bridge.Parser.CALL_BEGIN(Parser.java:132) at php.java.bridge.Parser.parse(Parser.java:195) at php.java.bridge.Request.handleRequest(Request.java:377) at php.java.bridge.Request.handleRequests(Request.java:485) at php.java.bridge.http.ContextRunner.run(ContextRunner.java:140) at php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:60) -------- So it seems it is failing because of memory issues, right? Is there a way to configure the amount of memory for the JavaBridge? Thanks! Antonio |
|
From: <php...@li...> - 2008-03-13 15:29:01
|
How do I find out if I have mode_php or not? In my apache's httpd.conf file I found only the following reference about PHP:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
My hosting provider's control mentioned following applications installed:
jre Java(TM) 2 Runtime Environment for CentOs 4 (for AMD64/Intel EM64T) EZ Template jsdk Java 2 SDK for CentOs 4 (for AMD64/Intel EM64T) EZ Template mod_perl Mod_perl for CentOs 4 (for AMD64/Intel EM64T) EZ Template mod_ssl Mod_ssl for CentOs 4 (for AMD64/Intel EM64T) template php PHP for CentOs 4 (for AMD64/Intel EM64T) EZ Template plesk8 plesk8 for centos-4-x86_64 Virtuozzo template plesk8-api plesk8-api for centos-4-x86_64 Virtuozzo template plesk8-backup plesk8-backup for centos-4-x86_64 Virtuozzo template plesk8-battlefield plesk8-battlefield for centos-4-x86_64 Virtuozzo template plesk8-bf2 plesk8-bf2 for centos-4-x86_64 Virtuozzo template plesk8-cs-gs plesk8-cs-gs for centos-4-x86_64 Virtuozzo template plesk8-de-DE-locale plesk8-de-DE-locale for centos-4-x86_64 Virtuozzo template plesk8-fcgid plesk8-fcgid for centos-4-x86_64 Virtuozzo template plesk8-ja-JP-locale plesk8-ja-JP-locale for centos-4-x86_64
Virtuozzo template plesk8-mailman plesk8-mailman for centos-4-x86_64 Virtuozzo template plesk8-miva plesk8-miva for centos-4-x86_64 Virtuozzo template plesk8-modules plesk8-modules for centos-4-x86_64 Virtuozzo template plesk8-ppwse plesk8-ppwse for centos-4-x86_64 Virtuozzo template plesk8-psa-fileserver plesk8-psa-fileserver for centos-4-x86_64 Virtuozzo template plesk8-psa-firewall plesk8-psa-firewall for centos-4-x86_64 Virtuozzo template plesk8-psa-vpn plesk8-psa-vpn for centos-4-x86_64 Virtuozzo template plesk8-spamassassin plesk8-spamassassin for centos-4-x86_64 Virtuozzo template plesk8-vault plesk8-vault for centos-4-x86_64 Virtuozzo template yum YUM for CentOS template
Do I have mod_php?
Nimesh
php...@li... wrote:
Hi,
> I have apache HTTPD sever that serve static HTML and PHP.
> I have Tomcat that serve Servlet Request (Java Application).
=> INSTALL.J2EE
> Apache talks to Tomcat through JK Connector.
Either remove mod_php or remove mod_jk. You cannot have both.
Regards,
Jost Boekemeier
Machen Sie Yahoo! zu Ihrer Startseite. Los geht's:
http://de.yahoo.com/set
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
php-java-bridge-users mailing list
php...@li...
https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
---------------------------------
Forgot the famous last words? Access your message archive online. Click here.
|
|
From: <php...@li...> - 2008-03-13 14:41:55
|
Hi Jost, I set public $__cancelProxyCreationTag = 0; on line 1824; but it did not fix the error. I still see: -------------- Strict Standards: Creating default object from empty value in lib\Java.inc on line 1943 -------------- I think the problem is $result. Shouldn't line 1943: $result->__cancelProxyCreationTag = ++$client->cancelProxyCreationTag; rather be: 1943: $this->__cancelProxyCreationTag = ++$client->cancelProxyCreationTag; ? Regards, Antonio On Wed, Mar 12, 2008 at 11:37 AM, <php...@li...> wrote: > Hi, > > thank you very much for your suggestions. In the next release we'll initialize > > $__cancelProxyCreationTag > > to 0. > > Regards, > Jost Boekemeier > > > > > Lesen Sie Ihre E-Mails jetzt einfach von unterwegs. > www.yahoo.de/go > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |
|
From: <php...@li...> - 2008-03-13 09:21:21
|
Hi,
> $d2rqF=$session->get("d2rq");
> if(!$d2rqF)
the !$varName works only for PHP values. Please see your PHP documentation for details.
According to the PHP documentation you should use is_null().
Note that is_null() cannot test whether or not the containing object is the Java NULL object or
not. You must convert the Java object into a PHP value first, for example with java_values() or
with a (string) cast.
Regards,
Jost Boekemeier
Lesen Sie Ihre E-Mails jetzt einfach von unterwegs.
www.yahoo.de/go
|
|
From: <php...@li...> - 2008-03-12 20:39:14
|
Hi,
How can I check if instance of java object as java session variable exists.
I have tried something like this:
$session=java_session();
$d2rqF=$session->get("d2rq");
if(!$d2rqF)
{
$message=" d2rqFact does not exists";
print_test_string($message, $table, $id);
}else{
$message="d2rqFact already exists";
print_test_string($message, $table, $id);
}
But, I'm always get message "d2rqFact already exists" even if this variable is never created.
d2rq is an instance of Java object and I want to check if it is already created. If yes I will use it otherwise I will create it.
Thanks,
Zoran
---------------------------------
Never miss a thing. Make Yahoo your homepage.
|
|
From: <php...@li...> - 2008-03-12 17:48:45
|
Hi,
> I have apache HTTPD sever that serve static HTML and PHP.
> I have Tomcat that serve Servlet Request (Java Application).
=> INSTALL.J2EE
> Apache talks to Tomcat through JK Connector.
Either remove mod_php or remove mod_jk. You cannot have both.
Regards,
Jost Boekemeier
Machen Sie Yahoo! zu Ihrer Startseite. Los geht's:
http://de.yahoo.com/set
|
|
From: <php...@li...> - 2008-03-12 16:17:59
|
I have apache HTTPD sever that serve static HTML and PHP.
I have Tomcat that serve Servlet Request (Java Application).
Apache talks to Tomcat through JK Connector.
I want to share Java session in PHP code.
I have RH Linux OS.
How should I set up my JavaBridge. What document do I need to refere from INSTALL.J2EE, INSTALL.J2SE, INSTALL.LINUX, JAVA.STANDALONE, and MONO.STANDALONE.
Please help me.
Thanks
Nimesh
---------------------------------
Forgot the famous last words? Access your message archive online. Click here.
|
|
From: <php...@li...> - 2008-03-12 11:42:46
|
Hi, according to php.net, support for PHP4 has been discontinued. Altough PHP/Java Bridge version 4.x is still available for download, we cannot support this anymore. What about using some other software instead, for example XML-RPC? Regards, Jost Boekemeier Lesen Sie Ihre E-Mails jetzt einfach von unterwegs. www.yahoo.de/go |
|
From: <php...@li...> - 2008-03-12 11:37:28
|
Hi,
thank you very much for your suggestions. In the next release we'll initialize
$__cancelProxyCreationTag
to 0.
Regards,
Jost Boekemeier
Lesen Sie Ihre E-Mails jetzt einfach von unterwegs.
www.yahoo.de/go
|
|
From: <php...@li...> - 2008-03-12 05:23:21
|
Antonio, Thanks for answering my post. My hosting provider would not upgrade PHP 4 to PHP 5 because according to them it may break their Control Panel software. I would not mind to use old version of JavaBridge, but I would appreciate if someone would help me to pick the right version of JavaBridge considering I have PHP 4.3.9, JRE 1.4.2, and RH Linux. I hope to hear soon from some one. Thanks Nimesh php...@li... wrote: > I am confused as what version of bridge I need to use. > OS :Linux > JRE: 1.4.2 > PHP 4.3.9 Nimesh: I would really recommend you to upgrade to PHP 5.2.5; as far as I know the JavaBridge no longer supports PHP 4. You would have to use a very old version of the Bridge. Antonio ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users --------------------------------- Now you can chat without downloading messenger. Click here to know how. |
|
From: <php...@li...> - 2008-03-11 18:17:33
|
> I am confused as what version of bridge I need to use. > OS :Linux > JRE: 1.4.2 > PHP 4.3.9 Nimesh: I would really recommend you to upgrade to PHP 5.2.5; as far as I know the JavaBridge no longer supports PHP 4. You would have to use a very old version of the Bridge. Antonio |
|
From: <php...@li...> - 2008-03-11 18:15:35
|
Using JavaBridge 5.2.0. I got the following warning: Strict Standards: Creating default object from empty value in lib\Java.inc on line 1943 Any suggestions? Thanks! Antonio |
|
From: <php...@li...> - 2008-03-11 17:34:28
|
I am confused as what version of bridge I need to use.
OS :Linux
JRE: 1.4.2
PHP 4.3.9
I want to use bridge to share java session in PHP. I want to share java objects in PHP. I have Apache httpd server that would serve static HTML and PHP files. I also have Tomcat running, Apache talks to Tomcat through JK Connector. PHP files are not served by tomcat.
Also point me to a decument that would help me to use bridge for above situation.
I look forward for help.
Thanks
Nimesh
---------------------------------
Chat on a cool, new interface. No download required. Click here.
|
|
From: <php...@li...> - 2008-03-11 11:42:22
|
Hi, Hmm, ok, I will have look at this. Thanks for the suggestion :) Rgds Tom -- # !! brOl_oUilLe --> |
|
From: <php...@li...> - 2008-03-11 11:27:11
|
Hi,
Java has certain mechanisms which allow one to discover objects. Since all object trees are at
least referenced by a thread (otherwise they'd be garbage collected), I'm sure you find a way how
to create / discover your object graphs.
Unfortunately this is outside of the scope of the PHP/Java Bridge, but you'll find more
information in a Java related forum.
Regards,
Jost Boekemeier
Machen Sie Yahoo! zu Ihrer Startseite. Los geht's:
http://de.yahoo.com/set
|
|
From: <php...@li...> - 2008-03-11 10:29:58
|
Thanx for your suggestions! On Tue, Mar 11, 2008 at 3:35 PM, < php...@li...> wrote: > Hi, > > > Any pointers in this direction... > > I don't care. > > > This is a php.ini setting. But if you change PHP's default value, you'll > get the next exception > because your HTTP server times out the connection. And if you adjust your > HTTP server, your > browser might cut the connection. > > Instead of raising the default value, I would rather check why your script > doesn't terminate > within 30 seconds. > > > Regards, > Jost Boekemeier > > > > Lesen Sie Ihre E-Mails jetzt einfach von unterwegs. > www.yahoo.de/go > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |
|
From: <php...@li...> - 2008-03-11 10:29:18
|
Hi, I'm back with my problems :) Let's consider my launched application. There is the 'main' function which is 'static' and which creates other objects, from other classes, to be used. Of course these objects are not necessarily attributes of the main class, o/w they would be 'static' as well, wouldn't they? Is there a way to get access to these objects if they are instanciated in the main itself? rgds, Tom -- # !! brOl_oUilLe --> |
|
From: <php...@li...> - 2008-03-11 10:05:32
|
Hi,
> Any pointers in this direction...
I don't care.
This is a php.ini setting. But if you change PHP's default value, you'll get the next exception
because your HTTP server times out the connection. And if you adjust your HTTP server, your
browser might cut the connection.
Instead of raising the default value, I would rather check why your script doesn't terminate
within 30 seconds.
Regards,
Jost Boekemeier
Lesen Sie Ihre E-Mails jetzt einfach von unterwegs.
www.yahoo.de/go
|
|
From: <php...@li...> - 2008-03-11 02:54:15
|
Hi Jost, Any pointers in this direction... Pls let me know! Bharti On Sun, Mar 9, 2008 at 7:59 AM, Bharti Batra <bha...@gm...> wrote: > Hi Jost, > > I see the following error: > > *Fatal error*: Maximum execution time of 60 seconds exceeded in * > http://127.0.0.1:8080/slJavaBridge/java/Java.inc* on line *818 > > *For now, simulated this error by getting my backend Java Class not to > return and I get this error. I am a beginner in this web-programming domain. > If you can pls point me to the PHP settings for this too..it would be great! > * > > regds, > Bharti > * > > On Sat, Mar 8, 2008 at 7:01 PM, < > php...@li...> wrote: > > > Hi, > > > > > "maximum time of 60 seconds exceeded" from JavaBridge > > > > Are you sure? > > > > I think this error message comes from PHP, not from the JavaBridge. > > Please see the PHP > > documentation for details. > > > > > > Regards, > > Jost Boekemeier > > > > > > > > Lesen Sie Ihre E-Mails jetzt einfach von unterwegs. > > www.yahoo.de/go > > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Microsoft > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > _______________________________________________ > > php-java-bridge-users mailing list > > php...@li... > > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > > > > |
|
From: <php...@li...> - 2008-03-10 13:53:19
|
Hi,
Ah Thanks a lot :)
It finally works. My mistakes were :
require("http://localhost8091/JavaBridge/java/Java.inc");
The 'localhost' link is effectively important
launching the JavaBridge.jar
Which of course was already launched
By clearing my php script according to your advice, it now works perfectly
:)
>> I put the archive into my deployment directory 'ext'. This directory
contains:
>> - java/Java.inc
>> - hello.php
>> - JavaBridge.jar
>> - phpjava.jar
> I don't understand why this is necessary.
It was just to be sure that the correct scripts were called.
Thanks again and sorry for my low understanding :p
Tom
--
# !! brOl_oUilLe -->
|
|
From: <php...@li...> - 2008-03-10 13:20:12
|
Hi,
> public static void main(String[] args) {
> obj = new Integer(15);
> System.out.println(getObj());
> while(true);
> }
> public static int getObj() { return obj; }
> }
Okay. But you may want to use Thread.sleep() instead of the while(true); loop. :)
> I make a jar archive from it (phpjava.jar). The jar contains:
> Main-Class: app.Main
> Class-Path: JavaBridge.jar
Okay.
Next you can run a PHP script as follows:
<?php require("http://localhost8091/JavaBridge/java/Java.inc");
$myClass = new java("app.Main");
echo $myClass->getObj();
?>
> I put the archive into my deployment directory 'ext'. This directory
> contains:
> - java/Java.inc
> - hello.php
> - JavaBridge.jar
> - phpjava.jar
I don't understand why this is necessary.
> According to the manifest of JavaBridge.jar, I have also put in 'ext' (just
> in case):
> - php-script.jar
> - script-api.jar
No. These are the JSR223 bindings.
> Here is the php script:
> <?php
> require_once("java/Java.inc");
> java_require("phpjava.jar");
> $myClass = new java("app.Main");
> $obj = $myClass->getObj();
> echo $obj;
> ?>
No. The above script connects to the wrong application (if any). The java_require() is not
necessary either, your application already knows about app.Main.
> I launch the JavaBridge.jar by right-clicking on it and 'execute with
No. You have already started your application.
Regards,
Jost Boekemeier
Lesen Sie Ihre E-Mails jetzt einfach von unterwegs.
www.yahoo.de/go
|
|
From: <php...@li...> - 2008-03-10 12:42:34
|
Hi,
> With Runner.getRequiredInstance(). This allocates a Java continuation
which has full access to your Java objects.
> Please see the INSTALL.STANDALONE document for details.
Ok, so here is what i have done, following the instructions given by
INSTALL.STANDALONE and INSTALL.J2EE
I have my very simple java application:
package app;
public class Main {
public static final String JAVABRIDGE_PORT="8091";
static final php.java.bridge.JavaBridgeRunner runner =
php.java.bridge.JavaBridgeRunner.getRequiredInstance(JAVABRIDGE_PORT);
private static int obj;
public static void main(String[] args) {
obj = new Integer(15);
System.out.println(getObj());
while(true);
}
public static int getObj() { return obj; }
}
I make a jar archive from it (phpjava.jar). The jar contains:
app/Main.class
META-INF/MANIFEST.MF
The Manifest is:
Manifest-Version: 1.0
Main-Class: app.Main
Created-By: 1.5.0
Class-Path: JavaBridge.jar
I put the archive into my deployment directory 'ext'. This directory
contains:
- java/Java.inc
- hello.php
- JavaBridge.jar
- phpjava.jar
According to the manifest of JavaBridge.jar, I have also put in 'ext' (just
in case):
- php-script.jar
- script-api.jar
Here is the php script:
<?php
require_once("java/Java.inc");
java_require("phpjava.jar");
$myClass = new java("app.Main");
$obj = $myClass->getObj();
echo $obj;
?>
I launch the JavaBridge.jar by right-clicking on it and 'execute with
java...' and select the socket.
I execute in a shell: java -jar phpjava.jar
The value of 15 appears and then the application continues running because
of the while(true) loop.
I try to connect through http://localhost:8091/hello.php
The value of 0 appears.
The VMbridge.log warns me that the port is already being used.
Meaning that with php, it launches another instance of my Main.class
What am I missing ? For me, the "new java(app.Main);" line in the php script
is not the correct one if I want to get the already allocated objects.
Is 'runner' the variable I should use from php or is it a variable used by
the bridge ?
Which kind of methods can I call to access my allocated objects ?
> But why don't you simply call into the Java continuation and use the
objects already allocated by your Java application?
I would love to :)
Thanks for your help
Regards,
--
# !! brOl_oUilLe -->
|
|
From: <php...@li...> - 2008-03-09 16:29:15
|
Thanks Jost! I just solved the problem by specifying the absolute path of the file "tipper.fcl" in the fileName variable although the file is in the same directory. Now, everything works fine. Thanks again for all the help! Terry On Sun, Mar 9, 2008 at 4:28 AM, <php...@li...> wrote: > Hi, > > I am sorry, but I could not reproduce these problems. > > I have tested with IBM Java 1.5 on a Linux machine with the latest version of jFuzzyLogic. > Everything works as expected. > > If you have any problems with the PHP/Java Bridge or its documentation, please open a problem > report, please use http://sourceforge.net/tracker/?func=add&group_id=117793&atid=679233). > > > > Thanks again! I tried another approach and I guess I found the reason. > > The reason why the procedure returns a NULL object is that the file could not be found in Java's > current working directory (or class path). Since your NULL checks are completely wrong, they > return false results and pretend that the file exists. > > > > Right now I put everything inside a java class and it runs in java > > You don't need to write such a wrapper class. > > public String setRule(double x, double y){ > > echo "<p>" . $temp->setRule(3, 7) . "</p>"; > > > Can't load file: 'tipper.fcl' > > Correct. tipper.fcl is not in Java's working directory (or not accessible by the current class > loader). > > > > Exception occured; mixed trace: java.lang.Exception: Invoke failed: > > [[o:Test1]]->setRule((o:double)[o:PhpExactNumber], > > (o:double)[o:PhpExactNumber]). Cause: > > java.lang.IllegalArgumentException VM: 1.5.0@http://www.ibm.com/ > > Please take a look at what you have passed and what is expected. setRule expects two double > values, not two Integer values. > > In the end this may be a Java class loading issue. Since class loading is outside of the scope of > the PHP/Java Bridge, this is not a PHP/Java Bridge problem. (Use the bug tracker, if you think > this is a bug in the DynamicClassLoader. But I am quite certain that this will be closed, as > dynamic class loading is not really possible in Java -- I'd rather like to remove java_require() > instead.) > > > It is debatable if the bridge should automatically convert an object into a boolean > ($object==null) or to automatically convert an exact into an inexact number. But I think the > error messages are okay: A NullPointerException means that you have passed NULL, which in turn > means that some earlier call failed to produce a result. In this case the lookup for "tipper.tcl" > failed. -- If you look at the log file, you see a clear error message ("tipper.tcl not found") > from your library. > > The other problem is also obvious; if you pass an integer to a procedure expecting a double, > you'll get an IllegalArgumentException. > > If there's anything we could do to improve the bridge or its documentation, please let us know. > > > Regards, > Jost Boekemeier > > > > > > > > > > > Machen Sie Yahoo! zu Ihrer Startseite. Los geht's: > http://de.yahoo.com/set > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |
|
From: <php...@li...> - 2008-03-09 11:28:36
|
Hi, I am sorry, but I could not reproduce these problems. I have tested with IBM Java 1.5 on a Linux machine with the latest version of jFuzzyLogic. Everything works as expected. If you have any problems with the PHP/Java Bridge or its documentation, please open a problem report, please use http://sourceforge.net/tracker/?func=add&group_id=117793&atid=679233). > Thanks again! I tried another approach and I guess I found the reason. The reason why the procedure returns a NULL object is that the file could not be found in Java's current working directory (or class path). Since your NULL checks are completely wrong, they return false results and pretend that the file exists. > Right now I put everything inside a java class and it runs in java You don't need to write such a wrapper class. > public String setRule(double x, double y){ > echo "<p>" . $temp->setRule(3, 7) . "</p>"; > Can't load file: 'tipper.fcl' Correct. tipper.fcl is not in Java's working directory (or not accessible by the current class loader). > Exception occured; mixed trace: java.lang.Exception: Invoke failed: > [[o:Test1]]->setRule((o:double)[o:PhpExactNumber], > (o:double)[o:PhpExactNumber]). Cause: > java.lang.IllegalArgumentException VM: 1.5.0@http://www.ibm.com/ Please take a look at what you have passed and what is expected. setRule expects two double values, not two Integer values. In the end this may be a Java class loading issue. Since class loading is outside of the scope of the PHP/Java Bridge, this is not a PHP/Java Bridge problem. (Use the bug tracker, if you think this is a bug in the DynamicClassLoader. But I am quite certain that this will be closed, as dynamic class loading is not really possible in Java -- I'd rather like to remove java_require() instead.) It is debatable if the bridge should automatically convert an object into a boolean ($object==null) or to automatically convert an exact into an inexact number. But I think the error messages are okay: A NullPointerException means that you have passed NULL, which in turn means that some earlier call failed to produce a result. In this case the lookup for "tipper.tcl" failed. -- If you look at the log file, you see a clear error message ("tipper.tcl not found") from your library. The other problem is also obvious; if you pass an integer to a procedure expecting a double, you'll get an IllegalArgumentException. If there's anything we could do to improve the bridge or its documentation, please let us know. Regards, Jost Boekemeier Machen Sie Yahoo! zu Ihrer Startseite. Los geht's: http://de.yahoo.com/set |