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-09-22 15:29:50
|
Hi Peter, first of all thank you very much for this problem report. Indeed, override redirect (which stops the secure channel and opens a new socket connection to 8080 to obtain the session handle when java_session() is not the first java statement in a script) doesn't work anymore in 3.1.8. The reason is that it now needs a security token which has been destroyed after the first Java() statement. The pure PHP implementation of the PHP/Java Bridge code doesn't implement override redirect, so this feature isn't portable anyway. Please use java_session() as the first Java() statement in a script, for example: <? ... $session = java_session(); $ob = new Java(...); ?> Since the handle is cached, the following will also work: <? java_session(); $ob=new Java(...); $session = java_session(); ?> However, I will make a patch available which fixes this problem. Regards, Jost Boekemeier ___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de |
From: <php...@li...> - 2006-09-22 15:19:44
|
Hi Matthias, [please excuse the delay] > Hi, > if I try to reach the JavaBridge Directory I get > this error: > HTTP Status 404 - Servlet PhpCGIServlet is not > available Can you please open a problem report (please use http://sourceforge.net/tracker/?func=add&group_id=117793&atid=679233) and attach the relevant tomcat log there? > With use of java.java, etc. it works. > But tomcat is faster, isn't it? That is the reason > why i want to use it. It's faster and more secure. And it should work with any J2EE server or servlet engine, that's why I am very surprised that it doesn't work with one tomcat version. I think the tomcat log should reveil the reason. Regards, Jost Boekemeier ___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de |
From: <php...@li...> - 2006-09-22 15:14:13
|
Hi Padmaja, > 'AxisFault' Exception in case of any error. That > exception has a > FaultDetail which needs to be handled. But because > PHP java bridge is > converting that exception to java.lang.Exception I'm > not able to handle > it. Can u please suggest a solution. It wraps the original exception (jsr223 demands it). Doesn't $exception->getCause() reveal the original exception? Regards, Jost Boekemeier ___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de |
From: <php...@li...> - 2006-09-20 15:09:30
|
Hello, php-java-bridge is a great tool. But now I'm having a problem with accessing a MySQL-database using jdbc which I was not able to solve. 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 sun.cpu.isalist -> JavaBridge back-end version: 3.1.7 ################## php.ini Adding the mysql.jar to the classpath in php.ini did not help. [java] java.hosts = 127.0.0.1:9676 java.servlet = Off java.classpath=/usr/lib/php5/20051025/JavaBridge.jar:/usr/share/java/mysql.jar ################## The backend is running standalone, "ps aux" yields the line: /usr/bin/java -classpath .:/usr/share/java/mysql.jar -Djdbc.drivers=com.mysql.jdbc.Driver -jar /usr/lib/php5/20051025/JavaBridge.jar INET_LOCAL:9676 After it did not work I added the classpath-info and the -Djdbc.drivers. It did not help either. |
From: <php...@li...> - 2006-09-20 13:26:42
|
Am Mittwoch, den 20.09.2006, 05:08 -0700 schrieb php...@li...: > Hi, > =20 > 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. > =20 > 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. > =20 > 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? > =20 > =20 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:27= 9) #0 [internal function]: Java->__call('authenticate', Array) #1 /var/www/= indivo-ui/config/setup.php(34): Java->authenticate('administrator@i...', 'a= dmin') #2 {main}] thrown in /var/www/indivo-ui/config/setup.php on line 34 --------------- What version did you use before? MQ > Peter > =20 >=20 > ______________________________________________________________________ > 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 y= our > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV > _______________________________________________ php-java-bridge-users mai= ling list php...@li... https://lists.sourcef= orge.net/lists/listinfo/php-java-bridge-users |
From: <php...@li...> - 2006-09-20 12:08:38
|
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? Peter --------------------------------- All-new Yahoo! Mail - Fire up a more powerful email and get things done faster. |
From: <php...@li...> - 2006-09-20 08:40:43
|
Hi, if I try to reach the JavaBridge Directory I get this error: HTTP Status 404 - Servlet PhpCGIServlet is not available ________________________________________________________________________ type Status report message Servlet PhpCGIServlet is not available description The requested resource (Servlet PhpCGIServlet is not available) is not available. ________________________________________________________________________ Apache Tomcat/5.0 I Belive that's not good? Also the access to the Javabridge throu tomcat does not work: With=20 extension=3Djava.so [java] war-file first) java.hosts =3D "127.0.0.1:8080" java.servlet =3D On ;; Off, On or User java.log_level =3D 2 java.log_file =3D "/var/log/apache2/java-bridge.log" ;java.java_home =3D "/usr/lib/j2sdk1.5-sun" ;java.java =3D "/usr/lib/j2sdk1.5-sun/bin/java" ;java.log_level =3D 2 ;java.log_file =3D "/var/log/apache2/java-bridge.log" I get an error: ...blubb... Fatal error: php_mod_java(88): Protocol violation at pos 182 while trying to connect to 127.0.0.1:8080(/JavaBridge/JavaBridge.phpjavabridge). Please check that the back-end (JavaBride.war) is deployed or please switch off the java.servlet option. Received bytes: HTTP/1.1 500 Internal Server Error??Content-Type: text/html;charset=3Dutf-8??Content-Length: 3310??Date: Wed, 20 Sep 2006 07:42:07 GMT??Server: Apache-Coyote/1.1??Connection: close????<html><head><title>Apache Tomcat/5.0 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;f= ont-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;backgro= und-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;= color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tah= oma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Ta= homa,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family= :Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px; in /v= ar/www/sessionSharing.php on line 5 With use of java.java, etc. it works. But tomcat is faster, isn't it? That is the reason why i want to use it. --=20 Mit freundlichen Gr=C3=BC=C3=9Fen / Best regards Matthias Quade =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Contact me =3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Matthias Quade eMail: ma...@ma... Brauweg 47 web: http://blog.matthias-qua.de 37073 G=C3=B6ttingen phone: +49 551 3817880 Germany mobile: +49 171 6423616 Public Key: 0x4DA75E65 icq: 76375111 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D |
From: <php...@li...> - 2006-09-20 07:48:22
|
Hi, I'm attempting to convert the doubleclick.com DART Java API to a PEAR class using the following command. java -jar JavaBridge.jar --convert /workspace/triad/lib/pear /workspace/triad/lib/java/dartapi/dartapi.jar Here is the error. java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/exolab/castor/xml/ValidationException at php.java.bridge.Standalone.init(Standalone.java:167) at php.java.bridge.Standalone.main(Standalone.java:194) Caused by: java.lang.NoClassDefFoundError: org/exolab/castor/xml/ValidationException at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2395) at java.lang.Class.privateGetPublicMethods(Class.java:2519) at java.lang.Class.getMethods(Class.java:1406) at php.java.bridge.Snarf.writeProcedures(Snarf.java:176) at php.java.bridge.Snarf.writeClass(Snarf.java:284) at php.java.bridge.Snarf.writeClass(Snarf.java:194) at php.java.bridge.Snarf.run(Snarf.java:142) at php.java.bridge.Snarf.main(Snarf.java:62) at php.java.bridge.Standalone.checkOption(Standalone.java:115) at php.java.bridge.Standalone.init(Standalone.java:142) ... 1 more 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? Best Regards, AJ Tarachanowicz II |
From: <php...@li...> - 2006-09-19 15:56:16
|
Hi Hemata, I have excluded your message from the archives. 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-09-17 14:44:30
|
> anyway, just to experiment and see if that would get > me anything > interesting. Unfortunately that's raising > exceptions: yes, the servlet doesn't wait for the context anymore, so after one Java() statement the request object is recycled. I have removed the context.waitFor() after 2.0.8 (see line 330 in http://php-java-bridge.cvs.sourceforge.net/php-java-bridge/php-java-bridge/server/php/java/servlet/PhpJavaServlet.java?revision=1.25&view=markup) because the request object isn't really useful at the moment anyway. It doesn't carry any information about the original request, etc. But we could forward the necessary request options and let the servlet wait for the Context, if needed. > <?php > $request = > java_context()->getHttpServletRequest(); > echo $request->toString(); > $uri = $request->getRequestURI(); > ?> > > [o(String):"org.apache.coyote.tomcat4.CoyoteRequestFacade@1707653"] > Fatal error: Uncaught > [o(Exception):"java.lang.Exception: Invoke > failed: [o(CoyoteRequestFacade)]->getRequestURI. > Cause: > java.lang.NullPointerException After the first line the servlet and its associated request object is recycled by tomcat and the bridge runs with a context server which is more than 50 times faster than sending PUT request. You can switch off the pipe and socket context server by running tomcat with the java options: -Dphp.java.bridge.no_pipe_server=true -Dphp.java.bridge.no_socket_server=true (see http://php-java-bridge.sourceforge.net/server/documentation/API/php/java/bridge/http/PipeContextServer.html and http://php-java-bridge.sourceforge.net/server/documentation/API/php/java/bridge/http/SocketContextServer.html) > Is that the expected behaviour, even considering I > am forwarding the > embedded php java() statements? Yes. Even if the Pipe-/SocketContextServer is switched off and the bridge must send a PUT request for each individual Java() statement, the request and response objects are recycled by the servlet engine. This means that you can't store any values there, each PHP Java() statement is executed in a fresh context, only the session store stays the same. > I have a feeling that I am going to need to > implement my own > HttpServletRequest in any case This shouldn't be too difficult. However, I think this is a feature which should also go into the bridge code. I will create a new 3.2.x branch and add this feature there. > Just out of interest, how would I get Tomcat to > interpret the php > pages instead of apache? > - Is there an easy way to implement this with our > current setup (we > have stock apache running php, passing jsp pages to > Tomcat on port > 8080 with jk)? Just forward both, the PHP and the JSP requests. This will invoke the FastCGI machinery, which isn't much slower than Apache (according to my tests it is even faster than Apache's worker MPM). Jost ___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de |
From: <php...@li...> - 2006-09-16 22:04:35
|
Jost - thanks for the informative reply. I am running PHP in apache, and forwarding JSP pages (and the java bridge) through to Tomcat. So according to what you say below, that's not going to work well for me in any case. However I tried to get java_context()->getHttpServletRequest() anyway, just to experiment and see if that would get me anything interesting. Unfortunately that's raising exceptions: <?php $request = java_context()->getHttpServletRequest(); echo $request->toString(); $uri = $request->getRequestURI(); ?> displays: [o(String):"org.apache.coyote.tomcat4.CoyoteRequestFacade@1707653"] Fatal error: Uncaught [o(Exception):"java.lang.Exception: Invoke failed: [o(CoyoteRequestFacade)]->getRequestURI. Cause: java.lang.NullPointerException Responsible VM: 1.4.2_06@http://java.sun.com/" at: #-10 org.apache.coyote.tomcat4.CoyoteRequestFacade.getRequestURI (CoyoteRequestFacade.java:346) #-9 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) #-8 sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) #0 [internal function]: Java->__call('getRequestURI', Array) #1 /httpd/www.mydomain.com/htdocs/test_java_bridge.php(32): Java- >getRequestURI() #2 {main}] thrown in /httpd/www.mydomain.com/htdocs/test_java_bridge.php on line 32 Is that the expected behaviour, even considering I am forwarding the embedded php java() statements? I have a feeling that I am going to need to implement my own HttpServletRequest in any case - why, because I'll probably be implementing what used to be full JSP pages as in-page modules within a CMS (Joomla or Typo3, probably). Thus the URLs of the new system will be a lot different to the old system (the CMS will use parts of the URL for its own navigation, which I won't want to pass through to our java backend), and I will probably have to construct "fake" HttpServletRequests to match what the backend is expecting. Just out of interest, how would I get Tomcat to interpret the php pages instead of apache? - Is there an easy way to implement this with our current setup (we have stock apache running php, passing jsp pages to Tomcat on port 8080 with jk)? - Can one pass php pages through to Tomcat using the same mechanism as for JSP? - If so, would this cause much of a performance hit? Thanks for any help Cheers, Stephen Brandon On 16 Sep 2006, at 10:49, php...@li... wrote: > You haven't mentioned if you run PHP within your > servlet engine or within Apache or IIS. If you run PHP > within your servlet engine, > > $request = java_context()->getHttpServletRequest(); > > will just work. > > If you run PHP in a HTTP server and only forward the > embedded php java() statements, things will be more > difficult, because the bridge doesn't pass all > information to the back-end. For example a request > > GET http://host.com/foo/bar.php?param=... > will cause the bridge to send a HTTP PUT request: > PUT http://127.0.0.1:8080/foo/bar.phpjavabridge > > This means that you currently cannot retrieve the > method() and the params from the request. -- But the > bridge could forward them, if you need this. > > > Regards, > Jost Boekemeier |
From: <php...@li...> - 2006-09-16 12:14:37
|
Can't the <a href="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletRequestWrapper.html">ServletRequestWrapper</a> be used for this? ___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de |
From: <php...@li...> - 2006-09-16 09:49:58
|
Hi Stephen, > module/class which simply calls the same java method > via the PHP Java > Bridge, then does the layout pretty much like the > JSP file used to. Yes, this should work fine. > HOWEVER the first stumbling block is that because > we're no longer > operating in a JSP sort of context, we don't appear > to have an > HttpServletRequest to pass to the backend any more You can access the HttpServletRequest from here: http://php-java-bridge.sourceforge.net/documentation/PHP-API/html/java_8c.html#doc26 and http://php-java-bridge.sourceforge.net/server/documentation/API/php/java/servlet/Context.html#getHttpServletRequest() > Is it clear what I am trying to achieve? You haven't mentioned if you run PHP within your servlet engine or within Apache or IIS. If you run PHP within your servlet engine, $request = java_context()->getHttpServletRequest(); will just work. If you run PHP in a HTTP server and only forward the embedded php java() statements, things will be more difficult, because the bridge doesn't pass all information to the back-end. For example a request GET http://host.com/foo/bar.php?param=... will cause the bridge to send a HTTP PUT request: PUT http://127.0.0.1:8080/foo/bar.phpjavabridge This means that you currently cannot retrieve the method() and the params from the request. -- But the bridge could forward them, if you need this. Regards, Jost Boekemeier ___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de ___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de |
From: <php...@li...> - 2006-09-15 20:09:50
|
Hi, I am looking at using the PHP Java Bridge to help to transfer a whole lot of JSP pages into a PHP-based CMS. Installation went fine. The JSP pages are well structured with a set of java classes as a backend, such that the JSP page basically has to call a method with the HttpServletRequest request object as argument, and returns arrays of data to display on the page. Therefore it doesn't seem too difficult to imagine making a PHP module/class which simply calls the same java method via the PHP Java Bridge, then does the layout pretty much like the JSP file used to. HOWEVER the first stumbling block is that because we're no longer operating in a JSP sort of context, we don't appear to have an HttpServletRequest to pass to the backend any more, which we require to get hold of the URL string, cookies, etc. I'm not keen (at this stage) on reprogramming all the java classes to use an alternative source of input data, if it would be possible to get hold of a HttpServletRequest that we can pass in as before. I had a look at creating one programmatically (faking it), but it's not a class but an interface, and there are potentially some issues with session ids etc that I don't know about. Is it clear what I am trying to achieve? Does anyone have any hints for how to create a HttpServletRequest, get hold of one, or otherwise pass URI/cookie/session data through to our backend, that is used to receiving HttpServletRequest objects? Many thanks, Stephen Brandon |
From: <php...@li...> - 2006-09-15 15:47:23
|
Hi Peter, > Since it is still constantly improving 3.1.8 is definitely the last release. From now on we'll only fix bugs and publish them as patches (if necessary). > since it is so easy to update or switch > between tags/releaes/branches and alike This may work when you don't compile in the source directory. But depending on the PHP or autotools version you could end up with a mix of old and new code. > file-release for 3.1.8 on sf date back to 08/2006 Don't look at the SF stats, they're all wrong. :) > Sadly you seem to have quit tagging or branching in The Release-3-1-8 tag is now there. > problems I ran into. :-< [1] > [1] just for example: >java.io.FileNotFoundException: /dev/shm/.php_java_bridge No idea. I've just compiled and tested the CVS head on a ppc64 running Suse Linux. There were no compilation issues and both, the java.so and the java/Java.php ran the bench without problems. Regards, Jost Boekemeier ___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de |
From: <php...@li...> - 2006-09-14 22:18:00
|
Hi Jost, I am really astonished be the work that you are doing with the java-bridge. Since it is still constantly improving I jump in on more recent versions every once in a while to keep up. I like to use CVS for this since it is so easy to update or switch between tags/releaes/branches and alike. Running an update today (3.0.8-dev to 3.1.8-dev) I had a lot of trouble getting everything to work. In this case I tried to switch to some reliable/stable code-base and therfor tried to find an appropriate tags in CVS. Sadly you seem to have quit tagging or branching in CVS for quite a while and what even was worse to me now is that from your CVS-log messages it seems that 3.1.8 was just created really recent, however the file-release for 3.1.8 on sf date back to 08/2006. Therefor I didn't find any stable tags/date in CVS. So as last chance I tried it with the source-tarball from SF. The good news: It is just working as intended. :-> The bad news: It seems I am not able to fit my CVS-checkout for exactly this code by tag or date or neither can I try to find out about the problems I ran into. :-< [1] Anyway I would really greatly appreciate the usage of tags/branches in CVS. ;) Yes, I know CVS is mostly intended for developers only... Greets, Peter [1] just for example: java.io.FileNotFoundException: /dev/shm/.php_java_bridge (in jakarta logfile) the "quick and dirty" backend as child of httpd on restart didn't work at all |
From: <php...@li...> - 2006-09-14 19:18:21
|
Hi again, > java.servlet /forums/javabridge.phpjavabridge are you sure this web context exists? If not, change java.servlet=User to java.servlet=On this should fix this problem. The tomcat HTML error message "Context doesn't exist" is mixed with the HTML output from PHP's phpinfo(), but you should see the message at the bottom of the test.php output. Regards, Jost Boekemeier ___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de |
From: <php...@li...> - 2006-09-14 18:05:21
|
Hi, > nothing happened , no error messages, nothing. I am sure there are error messages. Not necessarily in the browser but in the log file(s), depending on your php settings. > Please Help me, i very need this bridge for one of > my webapp ! What's the result of the test.php? 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-09-14 10:07:37
|
Hi, I'm trying to Install the native, C-based extension but it doesn't work and i have no error messages. My Config : Windows xp JAVA BRIDGE 3.1.8 Apache 2.0.59 Tomcat 1.4.31 PHP 5.1.6 JAVA jdk1.5.0_03 *php.ini* extension=3Dphp_java.dll [java] java.hosts =3D 127.0.0.1:8080 java.servlet =3D User java.java_home=3DC:\JAVA\jdk1.5.0_03 java.java=3DC:\JAVA\jdk1.5.0_03\bin\javaw.exe java.class.path=3DC:\PHP\ext\JavaBridge.jar java.log_level=3D2 java.log_file=3DC:\PHP\ext\JavaBridge.log The php_java.dll (renamed java-x86-windows.dll) has been taken from JavaBridge.war * httpd.conf *LoadModule php5_module "C:/PHP/php5apache2.dll" LoadModule jk_module modules/mod_jk.dll When i run the http:// <http:///><Host>/test.jsp I'm getting all the infos whith no error but when i try for example <?php $object =3D new Java("java.lang.String", "hello world"); echo (string)$object; ?> nothing happened , no error messages, nothing. This the result of the java section of the test page: java java support Enabled java bridge 3.1.8 java.log_level 2 java.hosts 127.0.0.1:8080 java.servlet /forums/javabridge.phpjavabridge java.persistent_connections On java command C:\JAVA\jdk1.5.0_03\bin\javaw.= exe -Djava.library.path=3DC:\PHP\ext -Djava.class.path=3DC:\PHP\ext/JavaBridge.= jar - Djava.awt.headless=3Dtrue -Dphp.java.bridge.base=3DC:\PHP\ext php.java.bridge.Standalone INET_LOCAL:0 2 C:\PHP\ext\JavaBridge.log java status running java server 127.0.0.1:8080 Please Help me, i very need this bridge for one of my webapp ! Thanx in advance. Fran=E7ois BONICEL BUZZER PRESS / B&B MEDIA |
From: <php...@li...> - 2006-09-12 15:58:05
|
On Sep 12, 2006, at 8:32 AM, php-java-bridge- us...@li... wrote: > Hi, > >> when I want to add >> a single class to >> PEAR in the future, how do I avoid having it go >> through the whole >> process again? > > you could set the bootPath to an empty string in line > 103, see > http://php-java-bridge.cvs.sourceforge.net/php-java-bridge/php-java- > bridge/server/php/java/bridge/Snarf.java?view=annotate&sortby=date > > In the future we should avoid creating stubs if the > files already exist. > That makes sense. > >> I double checked and there is no RT directory like >> you mentioned. > > Thanks. I think the easiest way to fix this is to > check if the created directory contains > java_lang_System.php. If it does and the dir doesn't > have the name "rt", rename it. I have created a ticket > for this bug: > http://sourceforge.net/tracker/index.php? > func=detail&aid=1557227&group_id=117793&atid=679233 > The file "java_lang_System.php" does indeed exist in my "classes" directory. So it looks like it is just a naming issue (at least with Power PC machines). I will have an Intel Mac laptop at the end of the month so can test the same install there to see if there is a difference. >> am not sure how this affect the overall >> installation? > > The Lucene search and Itext PDF examples use something > like: > > require_once("rt/java_lang_System.php"); > require_once("rt/java_awt_Color.php"); > Okay, so it is just an issue with where you do an include. I was concerned that the bridge software itself would look for the "rt" directory and run into problems if it could not find it. > When rt doesn't exist, those examples will not work. > >> to the bridge software because of its name? > > The require_once() in the above examples will fail. > >>> Do you use a power or intel mac? >> I am currently running this on a dual G4 powerPC > > I thought so. There's a chance that the intel macs are > more compatible with the Sun VM. > > Regards, > Jost Boekemeier > > > > > ___________________________________________________________ > Telefonate ohne weitere Kosten vom PC zum PC: http:// > messenger.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 |
From: <php...@li...> - 2006-09-12 15:33:06
|
Hi, > when I want to add > a single class to > PEAR in the future, how do I avoid having it go > through the whole > process again? you could set the bootPath to an empty string in line 103, see http://php-java-bridge.cvs.sourceforge.net/php-java-bridge/php-java-bridge/server/php/java/bridge/Snarf.java?view=annotate&sortby=date In the future we should avoid creating stubs if the files already exist. > I double checked and there is no RT directory like > you mentioned. Thanks. I think the easiest way to fix this is to check if the created directory contains java_lang_System.php. If it does and the dir doesn't have the name "rt", rename it. I have created a ticket for this bug: http://sourceforge.net/tracker/index.php?func=detail&aid=1557227&group_id=117793&atid=679233 > am not sure how this affect the overall > installation? The Lucene search and Itext PDF examples use something like: require_once("rt/java_lang_System.php"); require_once("rt/java_awt_Color.php"); When rt doesn't exist, those examples will not work. > to the bridge software because of its name? The require_once() in the above examples will fail. > > Do you use a power or intel mac? > I am currently running this on a dual G4 powerPC I thought so. There's a chance that the intel macs are more compatible with the Sun VM. Regards, Jost Boekemeier ___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de |
From: <php...@li...> - 2006-09-11 18:33:06
|
On Sep 11, 2006, at 9:38 AM, php-java-bridge-=20 us...@li... wrote: > Hi, > > first of all thank you very much for the feedback. > >> non-zts-20050922/JavaBridge.jar --convert >> This ran for about 4 minutes before completing. > > It creates PHP proxies for the classes found in boot > classpath and for the additional libraries specified > on the command line. Depending on how many classes it > has to convert and how fast your machine/VM is, this > may take some time. On my devel. machine the command > completes in less than two seconds. But even 4 minutes > shouldn't be a problem because one usually calls this > command once; during installation. > Okay, that makes sense, although when I want to add a single class to =20= PEAR in the future, how do I avoid having it go through the whole =20 process again? >> directory (/urs/local/php5/lib/php) and found >> several new directories: > >> charsets >> classes >> jce >> jsse >> laf >> ui > > These are created from the essential .jar files from > the boot classpath. But rt is missing for some reason, > doesn't the apple VM store the runtime into rt.jar? > If not, we have a portability problem -- all other JVM > implementations I've looked at (among them IBM, Sun, > GNU) keep the base classes in rt.jar. > > I double checked and tthere is no RT directory like you mentioned. I =20= am not sure how this affect the overall installation? Are you saying =20= that the stubs created in my "classes" directory may not be visible =20 to the bridge software because of its name? >> And the "classes" directory is >> HUGE. > > That must be the rt then. This means that we have to > add code which tries to detect the apple VM and rename > the "classes" directory into the standard name "rt". > Do you use a power or intel mac? > I am currently running this on a dual G4 powerPC and will also be =20 installing this on a dual G5 Xserve server, once I understand how to =20 use the bridge properly. > >> It looks >> like it has thousands of items (are these classes >> too)? > > Yes, the directory contains java_lang_String.php and > the like. > > >> My questions are: >> 1) What are all those other directories for when I >> only asked for my >> sample class to be made into a PEAR class? > > They're created for convenience. > > > Regards, > Jost Boekemeier > > > > =09 > > =09 > =09 > ___________________________________________________________ > Der fr=FChe Vogel f=E4ngt den Wurm. Hier gelangen Sie zum neuen Yahoo! = =20 > Mail: http://mail.yahoo.de > > ----------------------------------------------------------------------=20= > --- > Using Tomcat but need to do more? Need to support web services, =20 > security? > Get stuff done quickly with pre-integrated technology to make your =20 > job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache =20 > Geronimo > http://sel.as-us.falkag.net/sel?=20 > cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D121642 > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
From: <php...@li...> - 2006-09-11 16:39:05
|
Hi, first of all thank you very much for the feedback. > non-zts-20050922/JavaBridge.jar --convert > This ran for about 4 minutes before completing. It creates PHP proxies for the classes found in boot classpath and for the additional libraries specified on the command line. Depending on how many classes it has to convert and how fast your machine/VM is, this may take some time. On my devel. machine the command completes in less than two seconds. But even 4 minutes shouldn't be a problem because one usually calls this command once; during installation. > directory (/urs/local/php5/lib/php) and found > several new directories: > charsets > classes > jce > jsse > laf > ui These are created from the essential .jar files from the boot classpath. But rt is missing for some reason, doesn't the apple VM store the runtime into rt.jar? If not, we have a portability problem -- all other JVM implementations I've looked at (among them IBM, Sun, GNU) keep the base classes in rt.jar. > And the "classes" directory is > HUGE. That must be the rt then. This means that we have to add code which tries to detect the apple VM and rename the "classes" directory into the standard name "rt". Do you use a power or intel mac? > It looks > like it has thousands of items (are these classes > too)? Yes, the directory contains java_lang_String.php and the like. > My questions are: > 1) What are all those other directories for when I > only asked for my > sample class to be made into a PEAR class? They're created for convenience. 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-09-11 03:19:52
|
Hoy en la tarde, php...@li... dijo: > I am going crazy with this. Any help would be greatly appreciated. > > I just can't seem to understand how to communicate to java classes > via PHP. I know very little about Java, so am just trying to get the > basics working before I go further with my project. I'm sure this is > ridiculously easy for you Java folks, but I am very confused - I must > be going about this the wrong way: > > I compiled a java class into a file called "HelloWorld.jar": > > import java.util.*; > public class HelloWorld { > public static void main (String args[]) { > // insert code here... > System.out.println("What up dog!"); > } > } You should not be printing to System.out, but instead returning a String [untested]: public class HelloWorld { public String sayHello() { return "What up dog!"; } } (I guess static methods also work; I can't remember now) And then use this in PHP [untested, too]: // ... $x = new java("HelloWorld"); printf("HelloWorld says '%s'<br/>", $x->sayHello()); HTH, -- Guti I don't know what your problem is, but I'll bet it's hard to pronounce. -- Dogbert |
From: <php...@li...> - 2006-09-10 23:40:45
|
I am going crazy with this. Any help would be greatly appreciated. I just can't seem to understand how to communicate to java classes via PHP. I know very little about Java, so am just trying to get the basics working before I go further with my project. I'm sure this is ridiculously easy for you Java folks, but I am very confused - I must be going about this the wrong way: I compiled a java class into a file called "HelloWorld.jar": import java.util.*; public class HelloWorld { public static void main (String args[]) { // insert code here... System.out.println("What up dog!"); } } Then I created a PHP script to try and make a call to this using the PHP/Java bridge: <?php require_once('php_Java.php'); $dir = dirname($_SERVER['SCRIPT_FILENAME']); java_require($dir."/HelloWorld.jar"); $x = new JavaClass("HelloWorld"); $y = new java_class("HelloWorld"); $z = new java("HelloWorld"); echo "=== CAST AS STRING ===<br/>"; echo (string)$x."<br/>"; echo (string)$y."<br/>"; echo (string)$z."<br/>"; echo "=== JAVA VALUES ===<br/>"; echo (java_values($x))."<br/>"; echo java_values($y)."<br/>"; echo (java_values($z))."<br/>"; echo "<p>-- END --"; ?> And when I fire this up in Safari to look at the results, I get: === CAST AS STRING == class HelloWorld class HelloWorld HelloWorld@aed5f9 === JAVA VALUES === class HelloWorld class HelloWorld HelloWorld@aed5f9 -- END -- Why doesn't this thing print out my text. What the heck am I doing wrong? Any help appreciated. Jon |