You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(6) |
Oct
(6) |
Nov
(8) |
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(19) |
Feb
(15) |
Mar
(10) |
Apr
(8) |
May
(7) |
Jun
(9) |
Jul
(13) |
Aug
(31) |
Sep
(111) |
Oct
(52) |
Nov
(72) |
Dec
(42) |
2006 |
Jan
(21) |
Feb
(32) |
Mar
(33) |
Apr
(24) |
May
(15) |
Jun
(40) |
Jul
(32) |
Aug
(19) |
Sep
(38) |
Oct
(37) |
Nov
(63) |
Dec
(37) |
2007 |
Jan
(18) |
Feb
(39) |
Mar
(69) |
Apr
(49) |
May
(71) |
Jun
(59) |
Jul
(71) |
Aug
(85) |
Sep
(46) |
Oct
(14) |
Nov
(25) |
Dec
(56) |
2008 |
Jan
(24) |
Feb
(77) |
Mar
(104) |
Apr
(44) |
May
(41) |
Jun
(11) |
Jul
(31) |
Aug
(59) |
Sep
(44) |
Oct
(86) |
Nov
(66) |
Dec
(93) |
2009 |
Jan
(88) |
Feb
(41) |
Mar
(49) |
Apr
(135) |
May
(22) |
Jun
(31) |
Jul
(60) |
Aug
(71) |
Sep
(76) |
Oct
(18) |
Nov
(52) |
Dec
(20) |
2010 |
Jan
(8) |
Feb
(50) |
Mar
(35) |
Apr
(48) |
May
(46) |
Jun
(84) |
Jul
(38) |
Aug
(61) |
Sep
(51) |
Oct
(31) |
Nov
(17) |
Dec
(18) |
2011 |
Jan
(51) |
Feb
(14) |
Mar
(17) |
Apr
(23) |
May
(15) |
Jun
(11) |
Jul
(5) |
Aug
(5) |
Sep
(15) |
Oct
(8) |
Nov
(5) |
Dec
(25) |
2012 |
Jan
(2) |
Feb
(4) |
Mar
(6) |
Apr
(9) |
May
(27) |
Jun
(32) |
Jul
(36) |
Aug
(10) |
Sep
(16) |
Oct
(3) |
Nov
(13) |
Dec
(7) |
2013 |
Jan
(1) |
Feb
(4) |
Mar
|
Apr
(1) |
May
|
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(4) |
Oct
(2) |
Nov
(1) |
Dec
|
2014 |
Jan
|
Feb
|
Mar
(2) |
Apr
(1) |
May
(2) |
Jun
(9) |
Jul
(5) |
Aug
(2) |
Sep
(4) |
Oct
|
Nov
|
Dec
|
2015 |
Jan
(3) |
Feb
(2) |
Mar
(4) |
Apr
(3) |
May
(1) |
Jun
(2) |
Jul
|
Aug
(2) |
Sep
(5) |
Oct
(1) |
Nov
|
Dec
|
2016 |
Jan
|
Feb
(5) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(5) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
2017 |
Jan
(6) |
Feb
|
Mar
|
Apr
(10) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(1) |
Dec
|
2018 |
Jan
(2) |
Feb
(5) |
Mar
|
Apr
|
May
(1) |
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2021 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <php...@li...> - 2006-10-14 15:32:22
|
Hi, > So I guess I just don't understand what these php > stubs are for? Can > anyone explain? They aren't ready yet. They will be used in the Eclipse IDE and debugger. One problem with these stubs is that PHP currently handles some method names like exit(), put() etc specially. This might change in PHP6. > Also, is there an official BBS > style forum anywhere > for posting help -- the mailing list seems outdated? We can set it up, if someone is willing to maintain it. Regards, Jost Boekemeier ___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de |
From: <php...@li...> - 2006-10-14 15:26:05
|
Hi, [please excuse the delay] > The title of the email says it all! I know PHP like > the back of my > hand, but know little to nothing about Java. you don't need java knowledge to invoke methods from Java libraries. In fact you don't even need Java to call out to Java libraries, if you have a recent version of gcc installed (Linux only). > 1) What are the standard "include" files I need at > the top of each of > my PHP scripts to utilize the Bridge? require_once("java/Java.php") is enough. > 2) How do I gain access to certain Java methods in > my PHP scripts? with require_once("java/Java.php"); java_require("/path/to/myLib.jar;...); $myClass = new Java("myLib.myClass"); ... > For example if I want to convert a string read from > a file into an > array of values I think I would use > $array_var->toCharArray > ($string_var). I believe I need the > "java.lang.string" library/class > thing (found this in the Java API docs at Sun.com) > but I cannot > figure out how to enable this class or method in my > PHP scripts? The low-level interface is: require_once("java/Java.php"); $string = new java("java.lang.String", "hello"); $ar = java_values($string->toCharArray()); The high-level interface: require_once("java/java_lang_String"); $string = new java_lang_String("hello"); $ar = java_values($string->toCharArray()); > errors). So how do I call or access the classes in > that file? For > example, there is a class called "Utility" which in > turn has a method > called "read") in the JAR file. I tried the > following: > > <?php > java_require("/Library/WebServer/Documents/cj/simapi-java-5.0.0/lib/ > > cybsclients15.jar"); > $handle = new Java("Utility"); > $props = $handle->read("config.properties"); > ?> You must use the full qualified name. For example: $handle = new Java("com.foo.something.Utility"); You can see the name by opening the .jar file with winzip for example. Regards, Jost Boekemeier ___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de |
From: <php...@li...> - 2006-10-14 15:06:49
|
Hi, [please excuse the delay] I am sorry, but I could not reproduce this problem with php 4. I have installed the latest tomcat version (http://ftp.uni-erlangen.de/pub/mirrors/apache/tomcat/tomcat-5/v5.5.20/bin/apache-tomcat-5.5.20.exe) and downloaded and copied the current PHP/Java Bridge ("JavaBridge.war") into C:\Programme\Apache Software Foundation\Tomcat 5.5\webapps downloaded and extracted the current PHP4 version to c:\php and changed C:\Programme\Apache Software Foundation\Tomcat 5.5\webapps\JavaBridge\WEB-INF\web.xml to <init-param> <param-name>php_exec</param-name> <param-value>C:\php\php.exe</param-value> </init-param> After that I was able to run PHP4 applications within tomcat. The only problem I see is that the documentation shows forward slashes, which is something that doesn't work on windows. But this is a minor problem, imho. > Now I'm fishing around abit to see if I can stumble > across a solution, I > try 'php-4-java-x86-windows.dll' in place of > php-cgi-x86-windows.exe in > the web.xml param-name value. Restart TC and get: You don't need a php_java.dll to run php from java. The PECL extension is only necessary for PHP4 and only if you want to embed java statements into your PHP pages. > So I try c:\php\php.exe in web.xml and get "Fatal: > The loaded java > extension is not the PHP/Java Bridge" That's okay, see above. You probably use an old version of the PECL extension. > PHP 4.4.2 too old. > For PHP versions < 5.1.4 install the PECL extension, Yes, the pure PHP implementation currently only works with php 5.1.4 or above. If you want to embed java statements into your php pages, you must install the PECL extension from sourceforge. > Try the url in the error msg above and search it for > PECL without luck The PECL extension is packaged within the JavaBridge.war. > tried copying php_java.dll and php_java.jar These versions are 4 years old and don't work anymore. Don't use them. Please use the most recent versions of the PHP/Java Bridge and the PECL extension. Regards, Jost Boekemeier ___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de |
From: <php...@li...> - 2006-10-13 23:27:38
|
What are the purpose of the PEAR style php stub classes that I created during the install of PHP-Java Bridge? For example, if I do the following in a HP script: $request = new Java("java.util.HashMap"); I can then use the "put" method to stick keys and values into this special Java Style array. $request->put( "key", "value" ); But, I can also do the following: require_once('classes/java_util_HashMap.php'); $request = java_util_hashMap(); But cannot do the "put" method to get values into the variable. $request->put( "key", "value" ); This gives me a "NoSuchMethodException" error? So I guess I just don't understand what these php stubs are for? Can anyone explain? Also, is there an official BBS style forum anywhere for posting help -- the mailing list seems outdated? Thanks, Jon |
From: <php...@li...> - 2006-10-13 17:49:18
|
Thanks for your reply. I now have successfully called an EJB3 Stateless Session Bean using this fantastic bridge in Jboss 4.0.4.GA (ejb3 install). I am however, having a little problem with logging - as soon as my EAR with a modified WAR (i removed all the files not necessary for my deployment) is deployed my console locks up. I have managed to connect to the log4j output using Chainsaw so I know things are still working. Has anyone else had similar problems? Found any solutions - I think it's probably a property I haven't passed over when starting Jboss for a port or something... Paul php...@li... wrote: Hi, just a quick reply, I haven't read your messages yet; > files, I just needed to remove the line: > > require_once("java/Java.php"); > > from the top of the sample pages... We should probably encapsulate them, for example with if(!extension_loaded('java')) require_once("java/Java.php"); > I am, however, getting a > javax.naming.NameNotFoundException when I try the > document example. It should work; I have tested the sample against the current jboss release. There's a FAQ entry for it. > BTW - Has anybody had any success with using this > bridge with Spring beans (in Java) if so, how do I > go about accessing these? Code example will be > great. Please see the JSF examples for more information how to use IOC (Fowler calls it "dependency injection"). I think Spring directly supports JSF beans, so that should be pretty easy. Regards, Jost Boekemeier ___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users --------------------------------- All new Yahoo! Mail "The new Interface is stunning in its simplicity and ease of use." - PC Magazine |
From: <php...@li...> - 2006-10-13 17:11:51
|
Hi, just a quick reply, I haven't read your messages yet; > files, I just needed to remove the line: > > require_once("java/Java.php"); > > from the top of the sample pages... We should probably encapsulate them, for example with if(!extension_loaded('java')) require_once("java/Java.php"); > I am, however, getting a > javax.naming.NameNotFoundException when I try the > document example. It should work; I have tested the sample against the current jboss release. There's a FAQ entry for it. > BTW - Has anybody had any success with using this > bridge with Spring beans (in Java) if so, how do I > go about accessing these? Code example will be > great. Please see the JSF examples for more information how to use IOC (Fowler calls it "dependency injection"). I think Spring directly supports JSF beans, so that should be pretty easy. Regards, Jost Boekemeier ___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de |
From: <php...@li...> - 2006-10-13 07:19:54
|
HI am such an idiot - I don't need the java/*.php files, I just needed to remove the line: require_once("java/Java.php"); from the top of the sample pages... So now I know I am using the c-based extension and I can run the most of the examples. I am, however, getting a javax.naming.NameNotFoundException when I try the document example. I am running with Jboss. BTW - Has anybody had any success with using this bridge with Spring beans (in Java) if so, how do I go about accessing these? Code example will be great. Thanks php...@li... wrote: Hi, I am wanting to use your php-java-bridge to share httpsession data between a php application and a j2ee application and also for the php applicaton to communicate with some java session facades as an alternative to SOAP based calls. I have had mixed success with the various configurations described in the documentation and would appreciate comments on the most optimal solution. I am finding the documentation a little confusing :( >From what I have read the c-based extension seems to be an obvious choice and running PHP using the Apache module rather than the embedded J2EE AS option seems the safest. Like I said, I have played around - the solution that seemed to work best was when I had the .php files removed from the JavaBridge.war and placed into my Apache doc_root. I had also copied the java directory from the war to the doc_root (I had to update the php.ini include_directory) and I removed the cgi directory from WEB-INF (I wanted to make sure the PHP pages were being served by Apache). With this I was able to run the sessionSharing example - the RMI/IIOP example failed but I have seen a few posts here regarding this... Anyway, I am not sure if the above configuration is correct/desirable - I am sure that now I am using the pure php php/java bridge implementation, I think this because with the java directory (with the php files) things don't work. I have the following configuration: Apache 2.0.59 PHP 5.1.6 mod_jk 1.2.19 Jboss 4.0.4 Java 1.5 We are using Apache to server static content like images and html, we are also using it to serve PHP. We have the following rules for a virtual host: # Dynamic content JkMount _/* worker # Static content JkUnMount _/*.gif worker (more like the above - including _/*.php) I am not really sure if I need the JkAutoAlias also.. Any help/comments most welcome. Send instant messages to your online friends http://uk.messenger.yahoo.com ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642_______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users Send instant messages to your online friends http://uk.messenger.yahoo.com |
From: <php...@li...> - 2006-10-13 01:43:40
|
Hi all. The title of the email says it all! I know PHP like the back of my hand, but know little to nothing about Java. I was able to compile and test the bridge for OS X Server, but I am running into a brick wall trying to understand how to create calls to Java objects (libraries, JAR's, or whatever they are called) and could use a little help from you experts. Hopefully some of you can answer a few questions for me to get me started (ill try to be brief): 1) What are the standard "include" files I need at the top of each of my PHP scripts to utilize the Bridge? 2) How do I gain access to certain Java methods in my PHP scripts? For example if I want to convert a string read from a file into an array of values I think I would use $array_var->toCharArray ($string_var). I believe I need the "java.lang.string" library/class thing (found this in the Java API docs at Sun.com) but I cannot figure out how to enable this class or method in my PHP scripts? 3) I cannot figure out how to instantiate a new class or object. For example a Java API we need to access has a file called "cybsclients15.jar". I used a "java_require ('......cybclients15.jar')" which seems to work (I didn't get any errors). So how do I call or access the classes in that file? For example, there is a class called "Utility" which in turn has a method called "read") in the JAR file. I tried the following: <?php java_require("/Library/WebServer/Documents/cj/simapi-java-5.0.0/lib/ cybsclients15.jar"); $handle = new Java("Utility"); $props = $handle->read("config.properties"); ?> This is supposed to create a handle to the class called "Utility" and then let me use the "read" method to read a configuration file into an array. All I get is the following error that seems to tell me the class does not exist: Fatal error: Uncaught [o(Exception):"java.lang.Exception: CreateInstance failed: new Utility. Cause: java.lang.ClassNotFoundException: Could not find Utility in java_require() path. Please check the path and the SEL and File permissions. Responsible VM: 1.5.0_06@http://apple.com/" at: #-7 php.java.bridge.DynamicJavaBridgeClassLoader.loadClass (DynamicJavaBridgeClassLoader.java:408) #-6 php.java.bridge.SimpleJavaBridgeClassLoader.forName (SimpleJavaBridgeClassLoader.java:162) #-5 php.java.bridge.JavaBridge.CreateObject(JavaBridge.java:499) #0 / Library/WebServer/Documents/cj/simapi-java-5.0.0/samples/nvp/ AuthCaptureSample.php(18): Java::__construct('Utility') #1 {main}] thrown in /Library/WebServer/Documents/cj/simapi-java-5.0.0/samples/ nvp/AuthCaptureSample.php on line 18 Thanks for the help. -- Jon |
From: <php...@li...> - 2006-10-12 16:16:45
|
Hi, I am wanting to use your php-java-bridge to share httpsession data between a php application and a j2ee application and also for the php applicaton to communicate with some java session facades as an alternative to SOAP based calls. I have had mixed success with the various configurations described in the documentation and would appreciate comments on the most optimal solution. I am finding the documentation a little confusing :( >From what I have read the c-based extension seems to be an obvious choice and running PHP using the Apache module rather than the embedded J2EE AS option seems the safest. Like I said, I have played around - the solution that seemed to work best was when I had the .php files removed from the JavaBridge.war and placed into my Apache doc_root. I had also copied the java directory from the war to the doc_root (I had to update the php.ini include_directory) and I removed the cgi directory from WEB-INF (I wanted to make sure the PHP pages were being served by Apache). With this I was able to run the sessionSharing example - the RMI/IIOP example failed but I have seen a few posts here regarding this... Anyway, I am not sure if the above configuration is correct/desirable - I am sure that now I am using the pure php php/java bridge implementation, I think this because with the java directory (with the php files) things don't work. I have the following configuration: Apache 2.0.59 PHP 5.1.6 mod_jk 1.2.19 Jboss 4.0.4 Java 1.5 We are using Apache to server static content like images and html, we are also using it to serve PHP. We have the following rules for a virtual host: # Dynamic content JkMount _/* worker # Static content JkUnMount _/*.gif worker (more like the above - including _/*.php) I am not really sure if I need the JkAutoAlias also.. Any help/comments most welcome. Send instant messages to your online friends http://uk.messenger.yahoo.com |
From: <php...@li...> - 2006-10-11 19:27:40
|
On the forward slashes, turns out you might have been on to something there. Chgd web.xml to use back slashes and got some different results When set to: <init-param> <param-name>php_exec</param-name> <param-value>C:\Apache\Tomcat\webapps\JavaBridge\WEB-INF\cgi\php-cgi-x86 -windows.exe</param-value> </init-param> I get a phpinfo page with "PHP Version 5.1.3-dev" in the header, and 21 instances of 'php-cgi-x86-windows' (no .exe or .dll extension listed..) running in in my task manager window. If I shut TC down then they terminate correctly as well. This is progress Now I'm fishing around abit to see if I can stumble across a solution, I try 'php-4-java-x86-windows.dll' in place of php-cgi-x86-windows.exe in the web.xml param-name value. Restart TC and get: javax.servlet.ServletException: An IO exception occured. Probably php was not installed as "/usr/bin/php-cgi" or "c:/php/php-cgi.exe" or "C:\Apache\Tomcat\webapps\JavaBridge\WEB-INF\cgi\php-cgi-x86-windows[.sh ]|[.exe]". Please see "php_exec" in your WEB-INF/web.xml and WEB-INF/cgi/README for details. php.java.servlet.PhpCGIServlet.doGet(PhpCGIServlet.java:546) javax.servlet.http.HttpServlet.service(HttpServlet.java:689) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) Makes sense, it seems to need an executable of some sort. The only other .exe file that I have in the cgi dir is the launcher.exe file that I copied in from the IBM link you provided. Changing web.xml to use that results in the test.php page hanging with out reloading and 52 instances of php.exe running and visible in the task manager window. Stopping TC does not terminate the 52 instances of php.exe So I try c:\php\php.exe in web.xml and get "Fatal: The loaded java extension is not the PHP/Java Bridge" with 20 instances of php.exe running. Stopping TC terminates the php.exe instances correctly Copy php.exe from c:\php to the cgi subdir and repath the web.xml file and I get: PHP 4.4.2 too old. For PHP versions < 5.1.4 install the PECL extension, see INSTALL document from http://php-java-bridge.sourceforge.net/INSTALL. Or set the path to the PHP executable, see php_exec in the WEB-INF/web.xml Hmm, running php.exe from 4.4.4 Try the url in the error msg above and search it for PECL without luck, tried copying php_java.dll and php_java.jar into the cgi subdir alongside php.exe, but the only way to get something that is close to working is to set the param-name value to php-cgi-x86-windows.exe, but it reports 5.1.3 Hope this helps Mike |
From: <php...@li...> - 2006-10-10 16:40:16
|
You think it's a bug vs. "pilot error" on this end? I'll try the backslashes and get right back to you Mike |
From: <php...@li...> - 2006-10-10 16:29:34
|
Hi Mike, thank you very much for this bug report. I haven't looked carefully enough at the error message you've given. The exception is caused by a bug in the CGIServlet, which requires a File.separator instead of a slash. I have created a ticket for this bug, please see http://sourceforge.net/tracker/index.php?func=detail&aid=1574648&group_id=117793&atid=679233 As a workaround please use a backslash to specify the path, e.g.: c:\windows\php.exe I will check this with the author of the CGIServlet so that we can publish an updated PHP/Java Bridge in december. Regards, Jost Boekemeier ___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de |
From: <php...@li...> - 2006-10-10 13:14:49
|
Hi, Jost. Thanks for your tremendous contributions to the PHP and Java user communities. Your reply actual gave me the answer to my problem. Lately I've gotten used to using PHP functions with pre-defined default values for arguments that are not specified when the function is called. The Java method I was trying to call had a few optional parameters, and I just left them off, foolishly thinking they would get filled in by default... and that was causing the error. Once I gave it all the parameters it expected, it worked fine. Silly mistake! Once I overcame that, I had another problem which I'll outline here for posterity: I couldn't get the "java.class.path" value defined properly until I came across these two bits you posted in 2005: "According to the README it is java.classpath" and "Please don't forget the double-quotes" http://www.thescripts.com/forum/thread11467.html "java.classpath" vs. "java.class.path" -- There's probably a lot of confusion about this since http://php.net/java states it as "java.class.path" but apparently JavaBridge requires "java.classpath" Leaving off the quotes might be another common problem since lots of settings in php.ini don't require them -- for example setting extension_dir. But java.classpath didn't work for me until I added the quotes. Thanks again. -Kevin |
From: <php...@li...> - 2006-10-09 18:23:03
|
>> I cannot find any file in the php release named 'php-cgi.exe'. >It is called php-cgi-x86-windows.exe. I've edited web.xml and added a path to php-cgi-x86-windows.exe within the php_exec params, restarted TC but still have the same 500 error > Are you sure that php.exe is a cgi binary? IMHO the cgi binary is called php-cgi.exe. Downloaded PHP 4.4.4 from php.net and there is no file inside the release named php-cgi.exe > However, I think it is best to download and to install the php integration kit for windows and use the launcher.exe so that the PHP/Java Bridge can use the FastCGI interface instead of CGI: http://www.alphaworks.ibm.com/tech/phpintwasce/download Ok, I've got the kit downloaded, copied only launcher.exe into the webapps/JavaBride/WEB-INF/cgi dirand have updated the php_exec param in webapps/JavaBridge/web.xml to point to launcher.exe, restarted TC and end up with the same 500 problem Is there a config parameter that I'm missing? Am I the only one trying to run the bridge within a TC/Win2k env? Mike |
From: <php...@li...> - 2006-10-09 15:44:56
|
Hi Kevin, first of all thank you very much for the bug report. There is something I don't understand, the prototype definition you've given requires 6 arguments, but you've passed only 3: > public static ExampleResult execute(java.lang.String > ID, java.lang.String > Name, java.lang.String PW, java.lang.String > extraParam1, java.lang.String > extraParam2, java.lang.String extraParam3) > ->execute('123', 'John Doe', 'myPassword') However the error message lists the three param proc as a candidate, so your code should work. Can you please open a problem report (please use http://sourceforge.net/tracker/?func=add&group_id=117793&atid=679233) and set the java.log_level to 6, re-start the backend and append the log at the end of the ticket? The log will show the reason why the bridge has discarded the potential candidate. Regards, Jost Boekemeier ___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de |
From: <php...@li...> - 2006-10-08 17:35:56
|
Hello. I've been trying to figure this out for a few days now, and I'm so totally stuck that I really need to ask for help before I go nuts. I have a .jar file with the following information given in the documentation: ----------------------------------------- example.jar java.lang.Object | +- example.client.ExampleRequest Method: public static ExampleResult execute(java.lang.String ID, java.lang.String Name, java.lang.String PW, java.lang.String extraParam1, java.lang.String extraParam2, java.lang.String extraParam3) ----------------------------------------- ... and the installation instructions say it needs to go here: /opt/example/lib/ Question: How do I call the execute() method and pass it the parameters it needs? I always get "java.lang.NoSuchMethodException" even though the method definitely exists. Is it because I'm not calling it correctly? 1) If my PHP code is this: java_require("/opt/example/lib/example.jar"); $example = new Java("example.client.ExampleRequest"); $result = $example->execute('123', 'John Doe', 'myPassword'); I get this in the Error log: java.lang.NoSuchMethodException: execute(o(Request$PhpParserString), o(Request$PhpParserString), o(Request$PhpParserString)). Candidates [public static example.client.ExampleRequest.execute(java.lang.String,java.lang.String,java .lang.String)] at php.java.bridge.JavaBridge.Invoke(JavaBridge.java:1007) at php.java.bridge.Request.handleRequest(Request.java:467) at php.java.bridge.Request.handleRequests(Request.java:493) at php.java.bridge.JavaBridge.run(JavaBridge.java:209) at php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:29) [client 123.456.789.012] PHP Warning: java.lang.Exception: Invoke failed: [c(ExampleRequest)]->execute(o(Request$PhpParserString), o(Request$PhpParserString), o(Request$PhpParserString)). Cause: java.lang.NoSuchMethodException: execute(o(Request$PhpParserString), o(Request$PhpParserString), o(Request$PhpParserString)). Candidates [public static example.client.ExampleRequest.execute(java.lang.String,java.lang.String,java .lang.String)] in /var/www/html/test.php on line 3 2) Or if I try this in my PHP: java_require("/opt/example/lib/example.jar"); $example = new Java("example.client.ExampleRequest"); $id = new Java('java.lang.String', '123'); $name = new Java('java.lang.String, 'John Doe'); $pw = new Java('java.lang.String', 'myPassword'); $result = $example->execute($id, $name, $pw); This code gives the same error message, except that o(Request$PhpParserString) is replaced with o(String). Can anyone see what I'm doing wrong? Thanks. -Kevin |
From: <php...@li...> - 2006-10-07 16:42:49
|
Hi, > I cannot find any file in the php release named > 'php-cgi.exe'. I It is called php-cgi-x86-windows.exe. > using a path to the cli Doesn't work. The command line interface only works on the command line. :) You need the php-cgi.exe. > version and the cgi > (c:/php/php.exe) version of > php.exe in the Are you sure that php.exe is a cgi binary? IMHO the cgi binary is called php-cgi.exe. However, I think it is best to download and to install the php integration kit for windows and use the launcher.exe so that the PHP/Java Bridge can use the FastCGI interface instead of CGI: http://www.alphaworks.ibm.com/tech/phpintwasce/download Basically the windows version of PHP has been compiled without a standalone fast cgi server; the -b flag is missing in the windows php binary. Until the PHP people add this capability to the windows version of php, the above launcher.exe is required to run PHP efficiently on windows. > it from fulfilling this request. > exception > javax.servlet.ServletException: String index out of > range: -1 This probably means that no HTTP header fields were sent, which may mean that the bridge uses the CLI instead of the CGI version of PHP. Regards, Jost Boekemeier ___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de |
From: <php...@li...> - 2006-10-06 17:44:28
|
>please excuse the delay. No problem, appreciate the reply/info >I assume you're running setup #6 (see http://php-java-bridge.sourceforge.net/README). Yes, standalone Tomcat 5.0.28 on Win2k > It is possible to adjust the php_exec option, see WEB-INF/web.xml. It defaults to > WEB-INF/cgi/php-cgi-<arch>-<os>, which is PHP 5.1. You can set it to > c:/php-cgi.exe for example. I cannot find any file in the php release named 'php-cgi.exe'. I believe that php-cgi.exe is php5... I've tried using a path to the cli (c:/php/cli/php.exe) version and the cgi (c:/php/php.exe) version of php.exe in the C:\Apache\Tomcat\webapps\JavaBridge\WEB-INF\web.xml file (uncommented lines 58-61, and updated the value) but both result in an exception when I try to run the test.php page: HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: String index out of range: -1 php.java.servlet.PhpCGIServlet.doGet(PhpCGIServlet.java:567) javax.servlet.http.HttpServlet.service(HttpServlet.java:689) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) root cause java.lang.StringIndexOutOfBoundsException: String index out of range: -1 java.lang.String.substring(String.java:1444) php.java.servlet.CGIServlet$CGIEnvironment.init(CGIServlet.java:563) php.java.servlet.PhpCGIServlet.createCGIEnvironment(PhpCGIServlet.java:4 30) php.java.servlet.CGIServlet.doGet(CGIServlet.java:448) php.java.servlet.PhpCGIServlet.doGet(PhpCGIServlet.java:535) javax.servlet.http.HttpServlet.service(HttpServlet.java:689) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs. I'm obviously still missing something, any ideas? Mike |
From: <php...@li...> - 2006-10-06 16:49:09
|
Hi, please excuse the delay. I assume you're running setup #6 (see http://php-java-bridge.sourceforge.net/README). It is possible to adjust the php_exec option, see WEB-INF/web.xml. It defaults to WEB-INF/cgi/php-cgi-<arch>-<os>, which is PHP 5.1. You can set it to c:/php-cgi.exe for example. > don't want to run the slower pure PHP implementation The pure PHP implementation needs PHP >= 5 anyway. When you use an accelerator technology, the pure PHP implementation isn't much slower than the C-based implementation. Round-trips are most expensive, but they can eliminated by sending the Java() statements in a single stream, e.g.: java_begin_document(); java statements; java_end_document(); So I think the lack of performance is not a good argument to dismiss the pure PHP implementation. :) Regards, Jost Boekemeier ___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de |
From: <php...@li...> - 2006-10-06 16:44:08
|
Hi, please excuse the delay. > > The problem occurs when I try to convert the java > > code > > Class.forName("com.mysql.jdbc.Driver"); > > and the "getConnection" into corresponding > php-code. > > Class.forName("name") loads name from the bootstrap classloader, so java_require() has no effect. -- One could expect that some default class loader, for example the class loader from the current Thread context is used. But in many areas Java simply doesn't work as one would expect. Please either use Class.forName with an explicit classLoader argument (you can obtain the current class loader from the current Thread) or simple use: new Java("name); instead. Btw: Your .ini entry java.classpath=foo.jar;bar.jar probably didn't work because the above semi-colon starts an one-line comment. Regards, Jost Boekemeier ___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de |
From: <php...@li...> - 2006-10-06 13:29:01
|
anybody? -----Original Message----- From: Mike D'Ambrogia [mailto:mi...@ja...] Sent: Tuesday, October 03, 2006 12:55 PM To: 'php...@li...' Subject: tomcat - using php4 running TomCat 5 on Windows 2k, I've got the app up and running but the test page shows that the version of php is php5 but I'd rather run php4. The php/java bridge docs read vague to me (new to this) about how I can config the bridge to run PHP 4 vs 5 without rebuilding the app. I don't want to run the slower pure PHP implementation any reference doc that someone can point me to that would show me the config setup for running php4? thx mike |
From: <php...@li...> - 2006-10-03 19:55:19
|
running TomCat 5 on Windows 2k, I've got the app up and running but the test page shows that the version of php is php5 but I'd rather run php4. The php/java bridge docs read vague to me (new to this) about how I can config the bridge to run PHP 4 vs 5 without rebuilding the app. I don't want to run the slower pure PHP implementation any reference doc that someone can point me to that would show me the config setup for running php4? thx mike |
From: <php...@li...> - 2006-09-22 15:43:58
|
Hi, > I chatted with the guys in #java on > chat.freenode.net and they told me > the error was that I was missing the castor lib from > (castor.org). I > downloaded this and placed it in /usr/share/java/ext > as suggested by the > README. Restarted apache and I still receive this > error. Does anyone > have any idea how to fix this? you can only convert Java libraries which do not depend on external libraries. Please either use the low-level interface, i.e. java_require("foo.jar;bar.jar"); new Java("com.Foo", "FOO"); instead of require_once("foo/com_Foo.php"); ... new com_Foo("FOO"), or copy all external references into the jar file which should be converted. Regards, Jost Boekemeier ___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de |
From: <php...@li...> - 2006-09-22 15:37:55
|
Hi, please copy the mysql.jar and the other jars it depends on to java.ext.dirs and re-start the bridge back-end. This will solve this problem immediately. I will look at this problem. > I always get the message "java.sql.SQLException: No > suitable driver > Responsible" or class not found errors. > > The problem occurs when I try to convert the java > code > Class.forName("com.mysql.jdbc.Driver"); > and the "getConnection" into corresponding php-code. > > Please see the code snippets and the provided system > information for > details. > > I have tried several ours to solve the problem. So > any help would be > desperately appreciated... Any ideas? > > > ################## > Part of the php-Script with some comments: > > <?php > java_require('file:///usr/share/java/mysql.jar'); > // I also tried to put the jar into the same > directory than the > script without effect: > // java_require('file:///var/www/mysql.jar'); > > $conn = new Java('java.sql.Connection'); > > // The following is working without errors. So > the class must be > there, I suppose... > $mysql = new javaClass('com.mysql.jdbc.Driver'); > $mysqlinst = $mysql->newInstance(); > > // The following two code lines yield: > /* Uncaught > [o(Exception):"java.lang.Exception: Invoke > failed: > [c(Class)]->forName((String)o(String)). Cause: > java.lang.ClassNotFoundException: > com.mysql.jdbc.Driver Responsible VM: > 1.5.0_08@http://java.sun.com/" at: > #-18 > java.net.URLClassLoader$1.run(URLClassLoader.java:200) > #-17 > java.security.AccessController.doPrivileged(Native > Method) > #-16 > java.net.URLClassLoader.findClass(URLClassLoader.java:188) > #0 [internal function]: Java->__call('forName', > Array) > #1 /var/www/java.php(33): > Java->forName('com.mysql.jdbc....') > #2 {main}] thrown in <b>/var/www/java.php */ > // $javaclass = new Java('java.lang.Class'); > // $javaclass->forName('com.mysql.jdbc.Driver'); > > // The following to lines also produce a > ClassNotFoundExeption: > // $javaclass = new > Java('php.java.bridge.SimpleJavaBridgeClassLoader'); > // $javaclass->forName('com.mysql.jdbc.Driver'); > > $drivermanager = new > JavaClass('java.sql.DriverManager'); > $conn = > $drivermanager->getConnection("jdbc:mysql://localhost/mv-hett", > 'user', > 'pwd'); > [...] > > ################## > Error message of the "getConnection" line in > browser: > > Fatal error</b>: Uncaught > [o(Exception):"java.lang.Exception: > Invoke failed: > [c(DriverManager)]->getConnection((String)o(String), > > (String)o(String), (String)o(String)). Cause: > java.sql.SQLException: No > suitable driver Responsible VM: > 1.5.0_08@http://java.sun.com/" at: > #-11 > java.sql.DriverManager.getConnection(DriverManager.java:545) > #-10 > java.sql.DriverManager.getConnection(DriverManager.java:171) > #-9 > sun.reflect.NativeMethodAccessorImpl.invoke0(Native > Method) > #0 [internal function]: > Java->__call('getConnection', Array) > #1 /var/www/java.php(42): > JavaClass->getConnection('jdbc:mysql://lo...', > 'user', 'pwd') > #2 {main}] > thrown in <b>/var/www/java.php</b> > > > ################## > Standalone Java-Code that does the same works > without problems: > > import java.sql.Connection; > import java.sql.DriverManager; > import java.sql.SQLException; > > public class mv { > public static void main(String[] args) throws > ClassNotFoundException, > SQLException { > Connection conn; > > Class.forName("com.mysql.jdbc.Driver"); > conn = > DriverManager.getConnection("jdbc:mysql://localhost/mv-hett", > "user", > "pwd"); > [...] > > --- > > It is compiled using: > declare mysqllib=/usr/share/java/mysql.jar > javac -classpath $CLASSPATH:$mysqllib:. > projects/test/mv.java > > > ################## > test.php - Output: > > java.runtime.name -> Java(TM) 2 Runtime Environment, > Standard Edition > sun.boot.library.path -> > /usr/lib/j2sdk1.5-sun/jre/lib/i386 > java.vm.version -> 1.5.0_08-b03 > java.vm.vendor -> Sun Microsystems Inc. > java.vendor.url -> http://java.sun.com/ > path.separator -> : > java.vm.name -> Java HotSpot(TM) Client 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_08-b03 > java.awt.graphicsenv -> > sun.awt.X11GraphicsEnvironment > java.endorsed.dirs -> > /usr/lib/j2sdk1.5-sun/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 -> ANSI_X3.4-1968 > java.library.path -> > /usr/lib/j2sdk1.5-sun/jre/lib/i386/client:/usr/lib/j2sdk1.5-sun/jre/lib/i386:/usr/lib/j2sdk1.5-sun/jre/../lib/i386 > java.specification.name -> Java Platform API > Specification > java.class.version -> 49.0 > sun.management.compiler -> HotSpot Client Compiler > os.version -> 2.6.16-2-vserver-686 > user.home -> /root > user.timezone -> Zulu > jdbc.drivers -> com.mysql.jdbc.Driver > java.awt.printerjob -> sun.print.PSPrinterJob > file.encoding -> ANSI_X3.4-1968 > java.specification.version -> 1.5 > java.class.path -> > /usr/lib/php5/20051025/JavaBridge.jar > user.name -> root > java.vm.specification.version -> 1.0 > java.home -> /usr/lib/j2sdk1.5-sun/jre > sun.arch.data.model -> 32 > user.language -> en > java.specification.vendor -> Sun Microsystems Inc. > java.vm.info -> mixed mode, sharing > java.version -> 1.5.0_08 > java.ext.dirs -> > /usr/lib/j2sdk1.5-sun/jre/lib/ext:/usr/share/java/ext:/usr/java/packages/lib/ext > sun.boot.class.path -> > /usr/lib/j2sdk1.5-sun/jre/lib/rt.jar:/usr/lib/j2sdk1.5-sun/jre/lib/i18n.jar:/usr/lib/j2sdk1.5-sun/jre/lib/sunrsasign.jar:/usr/lib/j2sdk1.5-sun/jre/lib/jsse.jar:/usr/lib/j2sdk1.5-sun/jre/lib/jce.jar:/usr/lib/j2sdk1.5-sun/jre/lib/charsets.jar:/usr/lib/j2sdk1.5-sun/jre/classes > java.vendor -> Sun Microsystems Inc. > file.separator -> / > java.vendor.url.bug -> > http://java.sun.com/cgi-bin/bugreport.cgi > sun.io.unicode.encoding -> UnicodeLittle > sun.cpu.endian -> little > === message truncated === ___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de |
From: <php...@li...> - 2006-09-22 15:32:35
|
Hi, now I am confused. Do you get this message when trying to connect from php to the PhpJavaServlet or to the PhpCGIServlet or do you get this message after the successful connection? --- php...@li... schrieb: > Am Mittwoch, den 20.09.2006, 05:08 -0700 schrieb > php...@li...: > > Hi, > > > > interestingly I've got similar problems while > upgrading to bridge > > 3.1.8. The tomcat error log contained > NoClassDefFound messages > > suggesting that some essential classes were > missing. > > > > It turned out that tomcat kept old classes in its > work and tmp > > directory and it was using these classes instead > of the new versions > > from the JavaBridge.war. > > > > Cleaning these directories helped, but I now get > > java.lang.SecurityException messages when > accessing the java session > > store from apache...The sessionSharing.php example > works, but my > > classes don't. the only difference I see is that > my classes call > > java_get_session more than once. Is there a bug in > 3.1.8? > > > > > Look your errors like theese: > ------------- > Fatal error: Uncaught > [o(Exception):"java.lang.Exception: Invoke failed: > [o(PingActionsClient)]->authenticate((String)o(String), > (String)o(String)). Cause: > org.chip.ping.PingException: > java.io.IOException: Server returned HTTP response > code: 500 for URL: > http://192.168.2.51:8080/indivo-server-servlet-demo/PingServlet > Responsible VM: 1.5.0_08@http://java.sun.com/" at: > #-13 > org.chip.ping.client.PingTalkClient.sendRequest(PingTalkClient.java:480) > #-12 > org.chip.ping.client.PingTalkClient.authenticate(PingTalkClient.java:352) > #-11 > org.chip.ping.client.PingTalkClient.authenticate(PingTalkClient.java:279) > #0 [internal function]: Java->__call('authenticate', > Array) #1 /var/www/indivo-ui/config/setup.php(34): > Java->authenticate('administrator@i...', 'admin') #2 > {main}] thrown in > /var/www/indivo-ui/config/setup.php on line 34 > --------------- > > What version did you use before? > > MQ > > > Peter > > > > > > > ______________________________________________________________________ > > All-new Yahoo! Mail - Fire up a more powerful > email and get things > > done faster. > > > ------------------------------------------------------------------------- > > Take Surveys. Earn Cash. Influence the Future of > IT > > Join SourceForge.net's Techsay panel and you'll > get the chance to share your > > opinions on IT & business topics through brief > surveys -- and earn cash > > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get > the chance to share your > opinions on IT & business topics through brief > surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV> _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > ___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de ___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de |