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...> - 2016-08-20 13:48:49
|
Hi there, I am implementing a multithreading UDP listener in Java, which should run as a background process on a server. Because of special project specifications each new thread for an UDP datagram has to invoke a PHP file for working with the UDP datagram and creating result data for the threadhandler. Looking for a solution I found JavaBridge, which seems to be the right way. The installation went well as testing the examples. I customized the javaproxy php and the jsp calling it for transferring data to the php-script and back again. All works as described within the jsp. Because of the project specification I tried to test this within a main method of java application. This almost works as expected. But I got the problem, that the application only works every second time I run the application. While researching for the problem I only found an entry in this mailing list about the same problem ( https://sourceforge.net/p/php-java-bridge/mailman/message/24035957/), but without a clear solution. This is why I ask if there is a solution for the problem. The Tomcat server posts the error message "PHP Notice: fwrite(): send of 6 bytes failed with errno=10054...pointing on the Java.inc line 815" about an expected connection which seems to be closed. Is there an option to fix it? Maybe within the Java.inc, e.g. reconnecting or something else? Looking forward for an answer. BR, Marcell |
From: <php...@li...> - 2016-08-16 08:26:31
|
Hello Sebastien, I too have spent many years using the Java bridge (in production) to facilitate calling Java from PHP. I have also gone a little further, and have created a simplified client interface to the bridge server that is available as both a PHP include, and a GNU C library. This allows me to access Java via the bridge from C code. I at one moment tried to contact the original JavaBridge maintainers to see if they were interested in including this with their distribution - but with no response. I guess this is a kind of different road to what you have travelled - my efforts were mostly to strip out all of the object inheritance / reflection and etc. and put up a simple list of functions that can be called from a non object language like C (and obviously from PHP as well). I attach the man pages for my javaFunction / javaBridge call library for your inspection. Are you interested in source for this to post / merge along with your project? Regards, Dirk php...@li... wrote: > Hi, > > Just to share some work I did on the refactoring of the Java.inc client and > standalone server. > > For the little story, I've been using the php-java-bridge project in few > mission critical projects for the last 6 years... Mostly using Java from > PHP. > > I may be totally wrong but I feel the project have no clear maintainers > anymore, so I've just ended up rewriting some parts. For now you can have a > look to the client side (replacing Java.inc) on github. See the > https://github.com/belgattitude/soluble-japha/ repository to get more > information. > > I've changed the API mainly to support namespaces, php7, hhvm... but you > can still use a compatibility layer if you rely on java_* global functions > : https://github.com/belgattitude/soluble-japha-pjb62-compat > > I've also set up a repository for the standalone server (including a > freshly compiled JDK1.7+ JavaBridge.jar) : https://github.com/ > belgattitude/pjbserver-tools. And created a fork on github for the server > part : https://github.com/belgattitude/php-java-bridge. I'm using it to > compile and debug the server part. > > If you like to contribute you can open issues on github : > https://github.com/belgattitude/soluble-japha/issues or send a PR. I'll try > my best to answer. > > To be clear, I'm not part of the original php-java-bridge team that have > done a wonderful work making this possible. > > But I feel that's fair for me to publish the changes I've made in the past > year. It may help or encourage some of you to use the bridge. > > All my work is licensed under MIT license so feel free to use and > contribute... > > Have a great day. > > Sébastien > ------------------------------------------------------------------------------ > What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic > patterns at an interface-level. Reveals which users, apps, and protocols are > consuming the most bandwidth. Provides multi-vendor support for NetFlow, > J-Flow, sFlow and other flows. Make informed decisions using capacity > planning reports. http://sdm.link/zohodev2dev > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |
From: <php...@li...> - 2016-08-14 15:08:50
|
Hi, Just to share some work I did on the refactoring of the Java.inc client and standalone server. For the little story, I've been using the php-java-bridge project in few mission critical projects for the last 6 years... Mostly using Java from PHP. I may be totally wrong but I feel the project have no clear maintainers anymore, so I've just ended up rewriting some parts. For now you can have a look to the client side (replacing Java.inc) on github. See the https://github.com/belgattitude/soluble-japha/ repository to get more information. I've changed the API mainly to support namespaces, php7, hhvm... but you can still use a compatibility layer if you rely on java_* global functions : https://github.com/belgattitude/soluble-japha-pjb62-compat I've also set up a repository for the standalone server (including a freshly compiled JDK1.7+ JavaBridge.jar) : https://github.com/ belgattitude/pjbserver-tools. And created a fork on github for the server part : https://github.com/belgattitude/php-java-bridge. I'm using it to compile and debug the server part. If you like to contribute you can open issues on github : https://github.com/belgattitude/soluble-japha/issues or send a PR. I'll try my best to answer. To be clear, I'm not part of the original php-java-bridge team that have done a wonderful work making this possible. But I feel that's fair for me to publish the changes I've made in the past year. It may help or encourage some of you to use the bridge. All my work is licensed under MIT license so feel free to use and contribute... Have a great day. Sébastien |
From: <php...@li...> - 2016-02-03 14:48:06
|
Hi yes you're right. If a php.ini is in the same directory as php-cgi executable, it is loaded so my problem is now solved 2016-02-03 11:21 GMT+01:00 <php...@li...>: > I see (somewhere buried in the java code) > > File ini = new File(/_*cgiOsDir,*_/ "php-cgi.ini"); > if (!ini.exists()) { > byte[] data = (";; -*- mode: Scheme; tab-width:4 -*-\n;; A > simple php.ini\n"+ > ";; DO NOT EDIT THIS FILE!\n" + > ";; Add your configuration files to the "+conf+" > instead.\n"+ > ";; PHP extensions go to "+ext+". Please see phpinfo() > for ABI version details.\n"+ > "extension_dir=\""+ext+"\"\n"+ > > "include_path=\""+pearDir+":/usr/share/pear:.\"\n").getBytes(); > OutputStream out = new FileOutputStream (ini); > > So by default it should load a php.ini out of the same dir as your > php-cgi. But it also seems that it must be named php-cgi.ini ??? Dunno, > I have never much messed with Tomcat installation, I have mostly used > the bridge to enable Java to php, not the other way around. > > php...@li... wrote: > > Hi > > > > I've found a solution with the > > -Dphp.java.bridge.php_exec=<PHP_PATH>\php-cgi[.exe] > > given to the java machine when starting Tomcat > > or > > <param-name>php_exec</param-name> > > <param-value><PHP_PATH\php-cgi.exe</param-value> > > in the web.xml file of my app > > > > > > Now my problem is to force my php-cgi to load the good php.ini file > > > > Jean > > > > 2016-02-03 10:37 GMT+01:00<php...@li...>: > > > > > >> I speak under correction, but I think you can put a "php.ini" in your > >> WEB-INF/cgi directory and specify the php path you need in that. > >> > >> include_path=".;\phpShared\pathToYouApp" > >> > >> php...@li... wrote: > >> > >>> Hi > >>> > >>> i'am using JavaBridge in a Tomcat7.0.62 to run a php application. > >>> I want to specify the php path to use in my application > >>> > >>> I've a solution on linux but no solution on windows > >>> On linux, i have created a shell wrapper (php-cgi.sh) > >>> in WEB-INF/cgi/amd64-linux of my App > >>> that execute the php i want > >>> #!/bin/sh > >>> exec /<MyPhpPath/bin/php-cgi "$@" > >>> > >>> but on windows .. no solution .. The only solution is to copy the > entire > >>> php distrib > >>> under the cgi/amd64-windows ;-( > >>> > >>> It seems there are some parameters to configure java bridge > >>> i've found parameter php.java.bridge.default_log_level > >>> > >>> Is there any parameter for JavaBridge to specify the php path to use ? > >>> > >>> something like > >>> php.java.bridge.php_path or > >>> php.java.bridge.php_path_home ? > >>> > >>> if not do you have another solution for windows ? > >>> > >>> Thanks > >>> > >>> Jean > >>> > >>> > >> > ------------------------------------------------------------------------------ > >> > >>> Site24x7 APM Insight: Get Deep Visibility into Application Performance > >>> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > >>> Monitor end-to-end web transactions and take corrective actions now > >>> Troubleshoot faster and improve end-user experience. Signup Now! > >>> http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 > >>> _______________________________________________ > >>> php-java-bridge-users mailing list > >>> php...@li... > >>> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > >>> > >>> > >>> > >> > ------------------------------------------------------------------------------ > >> Site24x7 APM Insight: Get Deep Visibility into Application Performance > >> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > >> Monitor end-to-end web transactions and take corrective actions now > >> Troubleshoot faster and improve end-user experience. Signup Now! > >> http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 > >> _______________________________________________ > >> php-java-bridge-users mailing list > >> php...@li... > >> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > >> > >> > > > ------------------------------------------------------------------------------ > > Site24x7 APM Insight: Get Deep Visibility into Application Performance > > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > > Monitor end-to-end web transactions and take corrective actions now > > Troubleshoot faster and improve end-user experience. Signup Now! > > http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 > > _______________________________________________ > > php-java-bridge-users mailing list > > php...@li... > > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > > > > > > ------------------------------------------------------------------------------ > Site24x7 APM Insight: Get Deep Visibility into Application Performance > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > Monitor end-to-end web transactions and take corrective actions now > Troubleshoot faster and improve end-user experience. Signup Now! > http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |
From: <php...@li...> - 2016-02-03 10:26:04
|
I see (somewhere buried in the java code) File ini = new File(/_*cgiOsDir,*_/ "php-cgi.ini"); if (!ini.exists()) { byte[] data = (";; -*- mode: Scheme; tab-width:4 -*-\n;; A simple php.ini\n"+ ";; DO NOT EDIT THIS FILE!\n" + ";; Add your configuration files to the "+conf+" instead.\n"+ ";; PHP extensions go to "+ext+". Please see phpinfo() for ABI version details.\n"+ "extension_dir=\""+ext+"\"\n"+ "include_path=\""+pearDir+":/usr/share/pear:.\"\n").getBytes(); OutputStream out = new FileOutputStream (ini); So by default it should load a php.ini out of the same dir as your php-cgi. But it also seems that it must be named php-cgi.ini ??? Dunno, I have never much messed with Tomcat installation, I have mostly used the bridge to enable Java to php, not the other way around. php...@li... wrote: > Hi > > I've found a solution with the > -Dphp.java.bridge.php_exec=<PHP_PATH>\php-cgi[.exe] > given to the java machine when starting Tomcat > or > <param-name>php_exec</param-name> > <param-value><PHP_PATH\php-cgi.exe</param-value> > in the web.xml file of my app > > > Now my problem is to force my php-cgi to load the good php.ini file > > Jean > > 2016-02-03 10:37 GMT+01:00<php...@li...>: > > >> I speak under correction, but I think you can put a "php.ini" in your >> WEB-INF/cgi directory and specify the php path you need in that. >> >> include_path=".;\phpShared\pathToYouApp" >> >> php...@li... wrote: >> >>> Hi >>> >>> i'am using JavaBridge in a Tomcat7.0.62 to run a php application. >>> I want to specify the php path to use in my application >>> >>> I've a solution on linux but no solution on windows >>> On linux, i have created a shell wrapper (php-cgi.sh) >>> in WEB-INF/cgi/amd64-linux of my App >>> that execute the php i want >>> #!/bin/sh >>> exec /<MyPhpPath/bin/php-cgi "$@" >>> >>> but on windows .. no solution .. The only solution is to copy the entire >>> php distrib >>> under the cgi/amd64-windows ;-( >>> >>> It seems there are some parameters to configure java bridge >>> i've found parameter php.java.bridge.default_log_level >>> >>> Is there any parameter for JavaBridge to specify the php path to use ? >>> >>> something like >>> php.java.bridge.php_path or >>> php.java.bridge.php_path_home ? >>> >>> if not do you have another solution for windows ? >>> >>> Thanks >>> >>> Jean >>> >>> >> ------------------------------------------------------------------------------ >> >>> Site24x7 APM Insight: Get Deep Visibility into Application Performance >>> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month >>> Monitor end-to-end web transactions and take corrective actions now >>> Troubleshoot faster and improve end-user experience. Signup Now! >>> http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 >>> _______________________________________________ >>> php-java-bridge-users mailing list >>> php...@li... >>> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users >>> >>> >>> >> ------------------------------------------------------------------------------ >> Site24x7 APM Insight: Get Deep Visibility into Application Performance >> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month >> Monitor end-to-end web transactions and take corrective actions now >> Troubleshoot faster and improve end-user experience. Signup Now! >> http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 >> _______________________________________________ >> php-java-bridge-users mailing list >> php...@li... >> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users >> >> > ------------------------------------------------------------------------------ > Site24x7 APM Insight: Get Deep Visibility into Application Performance > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > Monitor end-to-end web transactions and take corrective actions now > Troubleshoot faster and improve end-user experience. Signup Now! > http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > > |
From: <php...@li...> - 2016-02-03 10:14:42
|
Hi I've found a solution with the -Dphp.java.bridge.php_exec=<PHP_PATH>\php-cgi[.exe] given to the java machine when starting Tomcat or <param-name>php_exec</param-name> <param-value><PHP_PATH\php-cgi.exe</param-value> in the web.xml file of my app Now my problem is to force my php-cgi to load the good php.ini file Jean 2016-02-03 10:37 GMT+01:00 <php...@li...>: > I speak under correction, but I think you can put a "php.ini" in your > WEB-INF/cgi directory and specify the php path you need in that. > > include_path=".;\phpShared\pathToYouApp" > > php...@li... wrote: > > Hi > > > > i'am using JavaBridge in a Tomcat7.0.62 to run a php application. > > I want to specify the php path to use in my application > > > > I've a solution on linux but no solution on windows > > On linux, i have created a shell wrapper (php-cgi.sh) > > in WEB-INF/cgi/amd64-linux of my App > > that execute the php i want > > #!/bin/sh > > exec /<MyPhpPath/bin/php-cgi "$@" > > > > but on windows .. no solution .. The only solution is to copy the entire > > php distrib > > under the cgi/amd64-windows ;-( > > > > It seems there are some parameters to configure java bridge > > i've found parameter php.java.bridge.default_log_level > > > > Is there any parameter for JavaBridge to specify the php path to use ? > > > > something like > > php.java.bridge.php_path or > > php.java.bridge.php_path_home ? > > > > if not do you have another solution for windows ? > > > > Thanks > > > > Jean > > > ------------------------------------------------------------------------------ > > Site24x7 APM Insight: Get Deep Visibility into Application Performance > > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > > Monitor end-to-end web transactions and take corrective actions now > > Troubleshoot faster and improve end-user experience. Signup Now! > > http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 > > _______________________________________________ > > php-java-bridge-users mailing list > > php...@li... > > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > > > > > > > ------------------------------------------------------------------------------ > Site24x7 APM Insight: Get Deep Visibility into Application Performance > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > Monitor end-to-end web transactions and take corrective actions now > Troubleshoot faster and improve end-user experience. Signup Now! > http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |
From: <php...@li...> - 2016-02-03 10:05:39
|
I speak under correction, but I think you can put a "php.ini" in your WEB-INF/cgi directory and specify the php path you need in that. include_path=".;\phpShared\pathToYouApp" php...@li... wrote: > Hi > > i'am using JavaBridge in a Tomcat7.0.62 to run a php application. > I want to specify the php path to use in my application > > I've a solution on linux but no solution on windows > On linux, i have created a shell wrapper (php-cgi.sh) > in WEB-INF/cgi/amd64-linux of my App > that execute the php i want > #!/bin/sh > exec /<MyPhpPath/bin/php-cgi "$@" > > but on windows .. no solution .. The only solution is to copy the entire > php distrib > under the cgi/amd64-windows ;-( > > It seems there are some parameters to configure java bridge > i've found parameter php.java.bridge.default_log_level > > Is there any parameter for JavaBridge to specify the php path to use ? > > something like > php.java.bridge.php_path or > php.java.bridge.php_path_home ? > > if not do you have another solution for windows ? > > Thanks > > Jean > ------------------------------------------------------------------------------ > Site24x7 APM Insight: Get Deep Visibility into Application Performance > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > Monitor end-to-end web transactions and take corrective actions now > Troubleshoot faster and improve end-user experience. Signup Now! > http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > > |
From: <php...@li...> - 2016-02-02 17:02:35
|
Hi i'am using JavaBridge in a Tomcat7.0.62 to run a php application. I want to specify the php path to use in my application I've a solution on linux but no solution on windows On linux, i have created a shell wrapper (php-cgi.sh) in WEB-INF/cgi/amd64-linux of my App that execute the php i want #!/bin/sh exec /<MyPhpPath/bin/php-cgi "$@" but on windows .. no solution .. The only solution is to copy the entire php distrib under the cgi/amd64-windows ;-( It seems there are some parameters to configure java bridge i've found parameter php.java.bridge.default_log_level Is there any parameter for JavaBridge to specify the php path to use ? something like php.java.bridge.php_path or php.java.bridge.php_path_home ? if not do you have another solution for windows ? Thanks Jean |
From: <php...@li...> - 2015-10-03 01:34:17
|
Hello, Are the developers of the project still actively working on it? The project is pretty good we have successfully called Java on several php scripts/apps and it has good performance, however i have not seen a new release of the library in years, in fact the debugger mailing list has not had any new message since 2013. As good as this project is it will die without updates, are there any projects to release a new version? Even if its only to keep it current for Java 7 or Java 8? -- Jorge Bernal Mancebo del Castillo |
From: <php...@li...> - 2015-09-20 18:41:23
|
I have not messed around much with the bridge under tomcat, or with calling php from java, however as soon as you wrap the thing into a java object, java rules obtain, so I would agree that the perhaps teste needs to be declared public, and probably it should return a valid java type (like String)? The FAQ includes an example: This relies on the toString method that is inherited by ANY java object and is inherited as public. So as above, may try declring the function as public, and proably get it to return a |java("java.lang.String") object instead of a simple php string. | How can I convert a PHP object into a Java object? With |java_closure()|. For example: | class Foo { function toString() {return "php::foo";} } $foo = new Foo(); $jObj = java_closure($foo); $String = java("java.lang.String"); echo $String->valueOf($jObj);| php...@li... wrote: > Hello Numa, > thanks for answer. This is not a Java class. It is a PHP class that I want to "convert" to Java class via java_closure, because in the real program it will be used by other "native" Java classes (passed as parameter). > Ely Matos > > -----Original Message----- > From: php...@li... [mailto:php...@li...] > Sent: terça-feira, 15 de setembro de 2015 09:48 > To: php...@li... > Subject: Re: [Php-java-bridge-users] Simple closure not working - correction > > Hi, > > I can’t see how your java class can work or even compile, as it does not look syntactically correct, it should be: > public class TesteClass > { > > public String teste() > { > return 'teste'; > } > > } > > Rgds, > Numa > > > >> Le 15 sept. 2015 à 14:16, php...@li... a écrit : >> >> Sorry, of course I put >> require_once("java/Java.inc"); >> on code... >> TIA >> Ely Matos >> >> -----Original Message----- >> Hello, >> I know this is a stupid question, but I actually tried almost everything >> (docs, google, mailing list, etc.). I don't know why this simple closure is >> not working. I'm sure there is an obvious reason, but I'm not seeing. >> TIA, >> Ely Matos >> >> >> <?php >> try { >> /* create a Java object from the PHP object */ >> $javaObject = java_closure(new TesteClass()); >> echo "PHP says that Java says: "; >> echo $javaObject->teste(); >> echo "<br>\n"; >> echo "<br>\n"; >> >> } catch (JavaException $ex) { >> echo "An exception occured: "; >> echo $ex; >> echo "<br>\n"; >> } >> >> class TesteClass >> { >> >> function teste() >> { >> return 'teste'; >> } >> >> } >> ?> >> >> On execution, I receive: >> >> PHP says that Java says: An exception occured: >> [[o:Exception]:"java.lang.Exception: Invoke failed: [[o:$Proxy37]]->teste. >> Cause: java.lang.NoSuchMethodException: teste(). Candidates: [] VM: >> 1.7.0_25@http://java.oracle.com/" at: >> #-6 php.java.bridge.JavaBridge.checkM(JavaBridge.java:1085) >> #-5 php.java.bridge.JavaBridge.Invoke(JavaBridge.java:1024) >> #-4 php.java.bridge.Request.handleRequest(Request.java:417) >> #-3 php.java.bridge.Request.handleRequests(Request.java:500) >> #-2 php.java.bridge.http.ContextRunner.run(ContextRunner.java:145) >> #-1 php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:60) >> #0 C:\Program Files\Apache Software >> Foundation\apache-tomcat-7.0.62\webapps\mknob\java\Java.inc(232): >> java_ThrowExceptionProxyFactory->getProxy(2, 'com.sun.proxy.$...', 'T', >> true) >> #1 C:\Program Files\Apache Software >> Foundation\apache-tomcat-7.0.62\webapps\mknob\java\Java.inc(360): >> java_Arg->getResult(true) >> #2 C:\Program Files\Apache Software >> Foundation\apache-tomcat-7.0.62\webapps\mknob\java\Java.inc(366): >> java_Client->getWrappedResult(true) >> #3 C:\Program Files\Apache Software >> Foundation\apache-tomcat-7.0.62\webapps\mknob\java\Java.inc(560): >> java_Client->getResult() >> #4 C:\Program Files\Apache Software >> Foundation\apache-tomcat-7.0.62\webapps\mknob\java\Java.inc(1752): >> java_Client->invokeMethod(1, 'teste', Array) >> #5 C:\Program Files\Apache Software >> Foundation\apache-tomcat-7.0.62\webapps\mknob\java\Java.inc(1851): >> java_JavaProxy->__call('teste', Array) >> #6 C:\Program Files\Apache Software >> Foundation\apache-tomcat-7.0.62\webapps\mknob\java\Java.inc(1999): >> java_AbstractJava->__call('teste', Array) >> #7 C:\Program Files\Apache Software >> Foundation\apache-tomcat-7.0.62\webapps\mknob\closure.php(8): >> Java->__call('teste', Array) >> #8 C:\Program Files\Apache Software >> Foundation\apache-tomcat-7.0.62\webapps\mknob\closure.php(8): >> java_InternalJava->teste() >> #9 {main}]<br> >> >> >> ---------------------------------------------------------------------------- >> -- >> _______________________________________________ >> php-java-bridge-users mailing list >> php...@li... >> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users >> >> >> ------------------------------------------------------------------------------ >> _______________________________________________ >> php-java-bridge-users mailing list >> php...@li... >> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users >> > > > ------------------------------------------------------------------------------ > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > > > ------------------------------------------------------------------------------ > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |
From: <php...@li...> - 2015-09-15 13:50:16
|
Hello Numa, thanks for answer. This is not a Java class. It is a PHP class that I want to "convert" to Java class via java_closure, because in the real program it will be used by other "native" Java classes (passed as parameter). Ely Matos -----Original Message----- From: php...@li... [mailto:php...@li...] Sent: terça-feira, 15 de setembro de 2015 09:48 To: php...@li... Subject: Re: [Php-java-bridge-users] Simple closure not working - correction Hi, I can’t see how your java class can work or even compile, as it does not look syntactically correct, it should be: public class TesteClass { public String teste() { return 'teste'; } } Rgds, Numa > Le 15 sept. 2015 à 14:16, php...@li... a écrit : > > Sorry, of course I put > require_once("java/Java.inc"); > on code... > TIA > Ely Matos > > -----Original Message----- > Hello, > I know this is a stupid question, but I actually tried almost everything > (docs, google, mailing list, etc.). I don't know why this simple closure is > not working. I'm sure there is an obvious reason, but I'm not seeing. > TIA, > Ely Matos > > > <?php > try { > /* create a Java object from the PHP object */ > $javaObject = java_closure(new TesteClass()); > echo "PHP says that Java says: "; > echo $javaObject->teste(); > echo "<br>\n"; > echo "<br>\n"; > > } catch (JavaException $ex) { > echo "An exception occured: "; > echo $ex; > echo "<br>\n"; > } > > class TesteClass > { > > function teste() > { > return 'teste'; > } > > } > ?> > > On execution, I receive: > > PHP says that Java says: An exception occured: > [[o:Exception]:"java.lang.Exception: Invoke failed: [[o:$Proxy37]]->teste. > Cause: java.lang.NoSuchMethodException: teste(). Candidates: [] VM: > 1.7.0_25@http://java.oracle.com/" at: > #-6 php.java.bridge.JavaBridge.checkM(JavaBridge.java:1085) > #-5 php.java.bridge.JavaBridge.Invoke(JavaBridge.java:1024) > #-4 php.java.bridge.Request.handleRequest(Request.java:417) > #-3 php.java.bridge.Request.handleRequests(Request.java:500) > #-2 php.java.bridge.http.ContextRunner.run(ContextRunner.java:145) > #-1 php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:60) > #0 C:\Program Files\Apache Software > Foundation\apache-tomcat-7.0.62\webapps\mknob\java\Java.inc(232): > java_ThrowExceptionProxyFactory->getProxy(2, 'com.sun.proxy.$...', 'T', > true) > #1 C:\Program Files\Apache Software > Foundation\apache-tomcat-7.0.62\webapps\mknob\java\Java.inc(360): > java_Arg->getResult(true) > #2 C:\Program Files\Apache Software > Foundation\apache-tomcat-7.0.62\webapps\mknob\java\Java.inc(366): > java_Client->getWrappedResult(true) > #3 C:\Program Files\Apache Software > Foundation\apache-tomcat-7.0.62\webapps\mknob\java\Java.inc(560): > java_Client->getResult() > #4 C:\Program Files\Apache Software > Foundation\apache-tomcat-7.0.62\webapps\mknob\java\Java.inc(1752): > java_Client->invokeMethod(1, 'teste', Array) > #5 C:\Program Files\Apache Software > Foundation\apache-tomcat-7.0.62\webapps\mknob\java\Java.inc(1851): > java_JavaProxy->__call('teste', Array) > #6 C:\Program Files\Apache Software > Foundation\apache-tomcat-7.0.62\webapps\mknob\java\Java.inc(1999): > java_AbstractJava->__call('teste', Array) > #7 C:\Program Files\Apache Software > Foundation\apache-tomcat-7.0.62\webapps\mknob\closure.php(8): > Java->__call('teste', Array) > #8 C:\Program Files\Apache Software > Foundation\apache-tomcat-7.0.62\webapps\mknob\closure.php(8): > java_InternalJava->teste() > #9 {main}]<br> > > > ---------------------------------------------------------------------------- > -- > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > > > ------------------------------------------------------------------------------ > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users ------------------------------------------------------------------------------ _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
From: <php...@li...> - 2015-09-15 13:19:25
|
Hi, I can’t see how your java class can work or even compile, as it does not look syntactically correct, it should be: public class TesteClass { public String teste() { return 'teste'; } } Rgds, Numa > Le 15 sept. 2015 à 14:16, php...@li... a écrit : > > Sorry, of course I put > require_once("java/Java.inc"); > on code... > TIA > Ely Matos > > -----Original Message----- > Hello, > I know this is a stupid question, but I actually tried almost everything > (docs, google, mailing list, etc.). I don't know why this simple closure is > not working. I'm sure there is an obvious reason, but I'm not seeing. > TIA, > Ely Matos > > > <?php > try { > /* create a Java object from the PHP object */ > $javaObject = java_closure(new TesteClass()); > echo "PHP says that Java says: "; > echo $javaObject->teste(); > echo "<br>\n"; > echo "<br>\n"; > > } catch (JavaException $ex) { > echo "An exception occured: "; > echo $ex; > echo "<br>\n"; > } > > class TesteClass > { > > function teste() > { > return 'teste'; > } > > } > ?> > > On execution, I receive: > > PHP says that Java says: An exception occured: > [[o:Exception]:"java.lang.Exception: Invoke failed: [[o:$Proxy37]]->teste. > Cause: java.lang.NoSuchMethodException: teste(). Candidates: [] VM: > 1.7.0_25@http://java.oracle.com/" at: > #-6 php.java.bridge.JavaBridge.checkM(JavaBridge.java:1085) > #-5 php.java.bridge.JavaBridge.Invoke(JavaBridge.java:1024) > #-4 php.java.bridge.Request.handleRequest(Request.java:417) > #-3 php.java.bridge.Request.handleRequests(Request.java:500) > #-2 php.java.bridge.http.ContextRunner.run(ContextRunner.java:145) > #-1 php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:60) > #0 C:\Program Files\Apache Software > Foundation\apache-tomcat-7.0.62\webapps\mknob\java\Java.inc(232): > java_ThrowExceptionProxyFactory->getProxy(2, 'com.sun.proxy.$...', 'T', > true) > #1 C:\Program Files\Apache Software > Foundation\apache-tomcat-7.0.62\webapps\mknob\java\Java.inc(360): > java_Arg->getResult(true) > #2 C:\Program Files\Apache Software > Foundation\apache-tomcat-7.0.62\webapps\mknob\java\Java.inc(366): > java_Client->getWrappedResult(true) > #3 C:\Program Files\Apache Software > Foundation\apache-tomcat-7.0.62\webapps\mknob\java\Java.inc(560): > java_Client->getResult() > #4 C:\Program Files\Apache Software > Foundation\apache-tomcat-7.0.62\webapps\mknob\java\Java.inc(1752): > java_Client->invokeMethod(1, 'teste', Array) > #5 C:\Program Files\Apache Software > Foundation\apache-tomcat-7.0.62\webapps\mknob\java\Java.inc(1851): > java_JavaProxy->__call('teste', Array) > #6 C:\Program Files\Apache Software > Foundation\apache-tomcat-7.0.62\webapps\mknob\java\Java.inc(1999): > java_AbstractJava->__call('teste', Array) > #7 C:\Program Files\Apache Software > Foundation\apache-tomcat-7.0.62\webapps\mknob\closure.php(8): > Java->__call('teste', Array) > #8 C:\Program Files\Apache Software > Foundation\apache-tomcat-7.0.62\webapps\mknob\closure.php(8): > java_InternalJava->teste() > #9 {main}]<br> > > > ---------------------------------------------------------------------------- > -- > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > > > ------------------------------------------------------------------------------ > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
From: <php...@li...> - 2015-09-15 12:16:28
|
Sorry, of course I put require_once("java/Java.inc"); on code... TIA Ely Matos -----Original Message----- Hello, I know this is a stupid question, but I actually tried almost everything (docs, google, mailing list, etc.). I don't know why this simple closure is not working. I'm sure there is an obvious reason, but I'm not seeing. TIA, Ely Matos <?php try { /* create a Java object from the PHP object */ $javaObject = java_closure(new TesteClass()); echo "PHP says that Java says: "; echo $javaObject->teste(); echo "<br>\n"; echo "<br>\n"; } catch (JavaException $ex) { echo "An exception occured: "; echo $ex; echo "<br>\n"; } class TesteClass { function teste() { return 'teste'; } } ?> On execution, I receive: PHP says that Java says: An exception occured: [[o:Exception]:"java.lang.Exception: Invoke failed: [[o:$Proxy37]]->teste. Cause: java.lang.NoSuchMethodException: teste(). Candidates: [] VM: 1.7.0_25@http://java.oracle.com/" at: #-6 php.java.bridge.JavaBridge.checkM(JavaBridge.java:1085) #-5 php.java.bridge.JavaBridge.Invoke(JavaBridge.java:1024) #-4 php.java.bridge.Request.handleRequest(Request.java:417) #-3 php.java.bridge.Request.handleRequests(Request.java:500) #-2 php.java.bridge.http.ContextRunner.run(ContextRunner.java:145) #-1 php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:60) #0 C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.62\webapps\mknob\java\Java.inc(232): java_ThrowExceptionProxyFactory->getProxy(2, 'com.sun.proxy.$...', 'T', true) #1 C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.62\webapps\mknob\java\Java.inc(360): java_Arg->getResult(true) #2 C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.62\webapps\mknob\java\Java.inc(366): java_Client->getWrappedResult(true) #3 C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.62\webapps\mknob\java\Java.inc(560): java_Client->getResult() #4 C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.62\webapps\mknob\java\Java.inc(1752): java_Client->invokeMethod(1, 'teste', Array) #5 C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.62\webapps\mknob\java\Java.inc(1851): java_JavaProxy->__call('teste', Array) #6 C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.62\webapps\mknob\java\Java.inc(1999): java_AbstractJava->__call('teste', Array) #7 C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.62\webapps\mknob\closure.php(8): Java->__call('teste', Array) #8 C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.62\webapps\mknob\closure.php(8): java_InternalJava->teste() #9 {main}]<br> ---------------------------------------------------------------------------- -- _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
From: <php...@li...> - 2015-09-15 11:40:48
|
Hello, I know this is a stupid question, but I actually tried almost everything (docs, google, mailing list, etc.). I don't know why this simple closure is not working. I'm sure there is an obvious reason, but I'm not seeing. TIA, Ely Matos <?php try { /* create a Java object from the PHP object */ $javaObject = java_closure(new TesteClass()); echo "PHP says that Java says: "; echo $javaObject->teste(); echo "<br>\n"; echo "<br>\n"; } catch (JavaException $ex) { echo "An exception occured: "; echo $ex; echo "<br>\n"; } class TesteClass { function teste() { return 'teste'; } } ?> On execution, I receive: PHP says that Java says: An exception occured: [[o:Exception]:"java.lang.Exception: Invoke failed: [[o:$Proxy37]]->teste. Cause: java.lang.NoSuchMethodException: teste(). Candidates: [] VM: 1.7.0_25@http://java.oracle.com/" at: #-6 php.java.bridge.JavaBridge.checkM(JavaBridge.java:1085) #-5 php.java.bridge.JavaBridge.Invoke(JavaBridge.java:1024) #-4 php.java.bridge.Request.handleRequest(Request.java:417) #-3 php.java.bridge.Request.handleRequests(Request.java:500) #-2 php.java.bridge.http.ContextRunner.run(ContextRunner.java:145) #-1 php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:60) #0 C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.62\webapps\mknob\java\Java.inc(232): java_ThrowExceptionProxyFactory->getProxy(2, 'com.sun.proxy.$...', 'T', true) #1 C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.62\webapps\mknob\java\Java.inc(360): java_Arg->getResult(true) #2 C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.62\webapps\mknob\java\Java.inc(366): java_Client->getWrappedResult(true) #3 C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.62\webapps\mknob\java\Java.inc(560): java_Client->getResult() #4 C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.62\webapps\mknob\java\Java.inc(1752): java_Client->invokeMethod(1, 'teste', Array) #5 C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.62\webapps\mknob\java\Java.inc(1851): java_JavaProxy->__call('teste', Array) #6 C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.62\webapps\mknob\java\Java.inc(1999): java_AbstractJava->__call('teste', Array) #7 C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.62\webapps\mknob\closure.php(8): Java->__call('teste', Array) #8 C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.62\webapps\mknob\closure.php(8): java_InternalJava->teste() #9 {main}]<br> |
From: <php...@li...> - 2015-08-21 22:38:09
|
Hi,I was trying to install nanospell spell checker (http://ckeditor-spellcheck.nanospell.com/developer-support) that works with ckeditor (http://ckeditor.com/). As part of using nanospell on WebSphere, the documentation required installation of JavaBridge. I need some help with installing JavaBridge on WebSphere Application Server. I used the WebSphere console on my local WebSphere to install JavaBridge.war.When I tried to access JavaBridge at the portal URL: http://localhost:10039/JavaBridge/I see the message in the browser: Error 500: PHP not found. Please install php-cgi. PHP test command was: [php-cgi, -v] I have not worked with PHP and could use some help.thank you,TC |
From: <php...@li...> - 2015-08-03 08:20:17
|
Hi, I encounter one problem when I use php-java-bridge to get value of _SERVER['REQUEST_URI']. Could some one help me ? My test url is "http://192.168.94.81:8080/monitor/index.php/graph?host=localhost&srv=Local_CPU_Temperature&view=0" , So the expect value for $_SERVER['REQUEST_URI'] should be "/monitor/index.php/graph?host=localhost&srv=Local_CPU_Temperature&view=0", but the actual value printed was "/monitor/index.php?host=localhost&srv=Local_CPU_Temperature&view=0" , How could I get the right value I want ? The web.xml for phpcgiservlet is : <servlet> <servlet-name>PhpCGIServlet</servlet-name> <servlet-class>php.java.servlet.fastcgi.FastCGIServlet</servlet-class> <init-param> <param-name>prefer_system_php_exec</param-name> <param-value>On</param-value> </init-param> <init-param> <param-name>php_include_java</param-name> <param-value>On</param-value> </init-param> <init-param> <param-name>php_request_uri_is_unique</param-name> <param-value>off</param-value> </init-param> </servlet> No matter the value of "php_request_uri_is_unique" is "on" or "off", I could not get the right value I want, Is there some other setting ? Additionally, the value of _SERVER["PHP_SELF"] and _SERVER["QUERY_STRING"] are right, so I get right URI value by these 2 paramters, but I want to know why I do not get the right value for _SERVER['REQUEST_URI']. Thanks and Regards, -Chao Ma |
From: <php...@li...> - 2015-06-30 01:17:15
|
Hi again, I found out what the issue was. In the base directory of my php web application I had some symbolic links to .php files in a different folder. That worked fine in Tomcat 7, but not in Tomcat 8. I had to replace the links with copies of the files, then it worked. RegardsBernd From: "php...@li..." <php...@li...> To: "php...@li..." <php...@li...> Sent: Friday, May 22, 2015 9:42 PM Subject: [Php-java-bridge-users] Tomcat 8 Hi there, The PHP/Java Bridge does not seem to work with Tomcat 8, while it works very well with Tomcat 7.Is that a known problem? Are there plans to make it work with Tomcat 8? Best RegardsBernd ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
From: <php...@li...> - 2015-06-20 05:22:45
|
Dear fellow-subscribers & author of PHP/Java Bridge, Today I discovered your tool which has great potential. My quest is to run UCanAccess(http://ucanaccess.sourceforge.net/) on top of the bridge, trying to execute SQL-queries on Microsoft Access databases on Linux from PHP. Being a new user, I spent quite some time figuring out how to get it running on my Debian Linux server as a webapp for Tomcat. Just some moments ago I succeeded, still I think the process can be made much easier. Therefore I will try to illustrate the steps I took and what went wrong initially: Step 1: I read the text on top of this page: http://php-java-bridge.sourceforge.net/pjb/installation.php a. Requirement 1: Java 1.4 or above: solved by doing: `sudo apt-get install openjdk-7-jdk` b. Requirement 2: a standard JEE server: solved by doing: `sudo apt-get install tomcat8` and adding the following to /etc/tomcat8/tomcat-users.xml: <role rolename="manager-gui"/> <role rolename="admin-gui"/> <user username="tomcat" password="********" roles="manager-gui,admin-gui"/> c. Requirement 3: do not search for a PHP extension: satisfied. Step 2: I downloaded the documentation using the link on top of this page: http://php-java-bridge.sourceforge.net/pjb/examples.php Step 3: I extracted JavaBridge.war from the documentation archive php-java-bridge_6.2.1_documentation.zip. Step 4: I tested the PHP installation using ` java -classpath JavaBridge.war TestInstallation`. Fail 1: testing failed because of the executable file "php-cgi" missing, despite requirement "3", I had to do `sudo apt-get install php5-cgi`. Step 5: I watched the animated gif movie mentioned on the bottom of the installation page: http://php-java-bridge.sourceforge.net/pjb/user-contributed/JavaEchoServer.g if Step 6: as seen in the movie, I copied JavaBridge.war to the webapps folder (also tried with JavaBridgeTemplate.war), by doing `sudo cp ~/JavaBridge.war /var/lib/tomcat8/webapps`. Step 7: I verified in the Tomcat-manager that the webapp actually got deployed: `lynx http://fetom.nl:8888/manager` Fail 2: the webapp Javabridge failed to start, to find out why I did `sudo vi /var/lib/tomcat8/logs/localhost.2015-06-20.log. This showed that the 'java' folder (or 'Java.inc') was somehow required and could somehow not be found, preventing the webapp to start. Step 8: I extracted php-java-bridge_6.2.1_documentation.zip/documentation/src.zip/java/* to /var/lib/tomcat8/webapps/JavaBridge/*. Success: the webapp started and this call worked, providing access to all the nice example PHP-scripts: `lynx http://fetom.nl:8888/JavaBridge` So my hope is that the documentation can be improved upon a bit, and that the 'java' folder (or just the 'java/Java.inc' file) can be integrated into both JavaBridge.war and JavaBridgeTemplate621.war (after all the template is the one shown in the animated gif demonstration). It would be nice if this could be done, because I almost gave up upon this great tool because of these issues and I've seen in the mailing list archive that other people wrestle with such issues as well. After all Tomcat is one of the recommended and supported choices for JavaBridge. Best regards, Tommy Sools |
From: <php...@li...> - 2015-05-23 00:45:04
|
Hi there, The PHP/Java Bridge does not seem to work with Tomcat 8, while it works very well with Tomcat 7.Is that a known problem? Are there plans to make it work with Tomcat 8? Best RegardsBernd |
From: <php...@li...> - 2015-04-30 19:45:47
|
So the issue was not that something had changed with chef. We have 2 workflows, in one, this request is handled by a php cli script. That works. The other workflow comes from a ReST request, that fails. I tried to add this: session_start(); $_SESSION["C"]=$this; To the constructor of the class that calls and executes Java.inc file but I get the same result. On Wed, Apr 29, 2015 at 6:07 PM, Michael Lindsay <mli...@me...> wrote: > Hey All, > > I have a vagrant instance provisioned by chef that has just started giving > me some trouble recently. So I've debugged into the Java.inc file that is > placed in my workspace, I'm in the middle of parsing the request then I get > this: > > ==> /var/log/processor/error.log <== > 2015-04-28 17:47:07 Error: Fatal Error (256): protocol error: ,Invalid document end at col 28. Check the back end log for OutOfMemoryErrors. in [/tmp/chaucerprocessor/temp1430243217.8342_0/local/26/Java.inc, line 869] > 2015-04-28 17:47:07 Error: [FatalErrorException] protocol error: ,Invalid document end at col 28. Check the back end log for OutOfMemoryErrors. > Request URL: /Books/add/ > Stack Trace: > #0 /vagrant/ChaucerProcessor/lib/Cake/Error/ErrorHandler.php(205): ErrorHandler::handleFatalError(256, 'protocol error:...', '/tmp/chaucerpro...', 869) > #1 /vagrant/ChaucerProcessor/processor/Lib/Error/ProcessorErrorHandler.php(18): ErrorHandler::handleError(256, 'protocol error:...', '/tmp/chaucerpro...', 869, Array) > #2 [internal function]: ProcessorErrorHandler::handleError(256, 'protocol error:...', '/tmp/chaucerpro...', 869, Array) > #3 /tmp/chaucerprocessor/temp1430243217.8342_0/local/26/Java.inc(869): trigger_error('protocol error:...', 256) > #4 /tmp/chaucerprocessor/temp1430243217.8342_0/local/26/Java.inc(873): java_SocketHandler->dieWithBrokenConnection('protocol error:...') > #5 /tmp/chaucerprocessor/temp1430243217.8342_0/local/26/Java.inc(701): java_SocketHandler->shutdownBrokenConnection('protocol error:...') > #6 /tmp/chaucerprocessor/temp1430243217.8342_0/local/26/Java.inc(722): java_NativeParser->parse() > #7 /tmp/chaucerprocessor/temp1430243217.8342_0/local/26/Java.inc(347): java_Parser->parse() > > > At the same time, catalina.out says: > java.lang.NullPointerException: cannot manipulate the object #60 which has > already been destroyed by PHP > at php.java.bridge.GlobalRef.get(GlobalRef.java:88) > at php.java.bridge.Request.getGlobalRef(Request.java:50) > at php.java.bridge.Request.begin(Request.java:359) > at php.java.bridge.Parser.CALL_BEGIN(Parser.java:148) > at php.java.bridge.Parser.parse(Parser.java:208) > at php.java.bridge.Request.handleRequest(Request.java:383) > at php.java.bridge.Request.handleRequests(Request.java:500) > at php.java.bridge.http.ContextRunner.run(ContextRunner.java:145) > at php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:60) > > Now I'm using a chef cookbook and have just realized the I didn't pin > either the java or tomcat community cookbooks, so it seems most likely they > have changed and I've pulled down something shiny and new in one of those > cookbooks. Any bells ringing for you guys? > > TIA, > - Michael > > > |
From: <php...@li...> - 2015-04-30 02:03:01
|
Hey All, I have a vagrant instance provisioned by chef that has just started giving me some trouble recently. So I've debugged into the Java.inc file that is placed in my workspace, I'm in the middle of parsing the request then I get this: ==> /var/log/processor/error.log <== 2015-04-28 17:47:07 Error: Fatal Error (256): protocol error: ,Invalid document end at col 28. Check the back end log for OutOfMemoryErrors. in [/tmp/chaucerprocessor/temp1430243217.8342_0/local/26/Java.inc, line 869] 2015-04-28 17:47:07 Error: [FatalErrorException] protocol error: ,Invalid document end at col 28. Check the back end log for OutOfMemoryErrors. Request URL: /Books/add/ Stack Trace: #0 /vagrant/ChaucerProcessor/lib/Cake/Error/ErrorHandler.php(205): ErrorHandler::handleFatalError(256, 'protocol error:...', '/tmp/chaucerpro...', 869) #1 /vagrant/ChaucerProcessor/processor/Lib/Error/ProcessorErrorHandler.php(18): ErrorHandler::handleError(256, 'protocol error:...', '/tmp/chaucerpro...', 869, Array) #2 [internal function]: ProcessorErrorHandler::handleError(256, 'protocol error:...', '/tmp/chaucerpro...', 869, Array) #3 /tmp/chaucerprocessor/temp1430243217.8342_0/local/26/Java.inc(869): trigger_error('protocol error:...', 256) #4 /tmp/chaucerprocessor/temp1430243217.8342_0/local/26/Java.inc(873): java_SocketHandler->dieWithBrokenConnection('protocol error:...') #5 /tmp/chaucerprocessor/temp1430243217.8342_0/local/26/Java.inc(701): java_SocketHandler->shutdownBrokenConnection('protocol error:...') #6 /tmp/chaucerprocessor/temp1430243217.8342_0/local/26/Java.inc(722): java_NativeParser->parse() #7 /tmp/chaucerprocessor/temp1430243217.8342_0/local/26/Java.inc(347): java_Parser->parse() At the same time, catalina.out says: java.lang.NullPointerException: cannot manipulate the object #60 which has already been destroyed by PHP at php.java.bridge.GlobalRef.get(GlobalRef.java:88) at php.java.bridge.Request.getGlobalRef(Request.java:50) at php.java.bridge.Request.begin(Request.java:359) at php.java.bridge.Parser.CALL_BEGIN(Parser.java:148) at php.java.bridge.Parser.parse(Parser.java:208) at php.java.bridge.Request.handleRequest(Request.java:383) at php.java.bridge.Request.handleRequests(Request.java:500) at php.java.bridge.http.ContextRunner.run(ContextRunner.java:145) at php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:60) Now I'm using a chef cookbook and have just realized the I didn't pin either the java or tomcat community cookbooks, so it seems most likely they have changed and I've pulled down something shiny and new in one of those cookbooks. Any bells ringing for you guys? TIA, - Michael |
From: <php...@li...> - 2015-04-07 06:05:37
|
Hi Take a look at at Java doc for UnsupportedClassVersionError - It states this. Hermod -----Opprinnelig melding----- Fra: php...@li... [mailto:php...@li...] Sendt: 27. mars 2015 20:32 Til: php...@li... Emne: Re: [Php-java-bridge-users] Problem running with Ubuntu Hi Don, JDK and JRE can be different versions of Java on the same machine. Thus, yes that could still be it. --Nathan From: "php...@li..." <php...@li...> To: php...@li... Sent: Friday, March 27, 2015 9:15 AM Subject: Re: [Php-java-bridge-users] Problem running with Ubuntu Hi, Thank you for your response, but that's not it. I compiled the java jar on the same machine just before copying it to the WEB-INF lib directory. So it should be the same java version. Thanks Don On 03/27/2015 02:49 AM, php...@li... wrote: > Hi > > Jar file is compiled with the wrong Java version - meaning a newer version than the one that your Tomcat is running on. > > Hermod > > -----Opprinnelig melding----- > Fra: php...@li... > [mailto:php...@li...] > Sendt: 26. mars 2015 19:04 > Til: php...@li... > Emne: [Php-java-bridge-users] Problem running with Ubuntu > > Hi, > > I'm using Tomcat private instance on Ubuntu. I have set up the bridge > and can run the index and test programs. I then insert a simple java > jar program in the WEB-INF/lib as I step through a simple program when > I call in php > > require_once("java/Java.inc"); > $session = java_session(); > if(java_is_null($instName = $session->get("bean"))) { > $session->put("bean", $instName=new Java("DoSimple")); > }else { > $session->put("bean", $instName=new Java("testString", >"Test of Bridge")); > } > $rawInstNameA = >java_values($instName->testAnArray($yrqtr)); > > against the simple java program: > public class DoSimple { > public DoSimple(){ > } > public void testString(String s3){ > System.out.println(s3); > > } > } > > The Bridge fails in the call to the constructor: > > The error output is: > > Cause: > [[o:UnsupportedClassVersionError]:"java.lang.UnsupportedClassVersionError: > DoSimple : Unsupported major.minor version 52.0 (unable to load class > DoSimple)" at: #-12 > org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappC > lassLoader.java:2948) > #-11 > org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoad > er.java:1208) > #-10 > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoad > er.java:1688) > #-9 > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoad > er.java:1569) > #-8 java.lang.Class.forName0(Native Method) #-7 > java.lang.Class.forName(Class.java:274) #-6 > php.java.bridge.Util.classForName(Util.java:1518) #-5 > php.java.bridge.JavaBridge.CreateObject(JavaBridge.java:445) #-4 > php.java.bridge.Request.handleRequest(Request.java:458) #-3 > php.java.bridge.Request.handleRequests(Request.java:500) #-2 > php.java.bridge.http.ContextRunner.run(ContextRunner.java:145) #-1 > php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:60) #0 > /home/don/donTomcat/webapps/Financials2/java/Java.inc(232): > java_ExceptionProxyFactory->getProxy(4, 'java.lang.Unsup...', 'T', > true) > #1 /home/don/donTomcat/webapps/Financials2/java/Java.inc(360): > java_Arg->getResult(true) #2 > /home/don/donTomcat/webapps/Financials2/java/Java.inc(366): > java_Client->getWrappedResult(true) #3 > /home/don/donTomcat/webapps/Financials2/java/Java.inc(560): > java_Client->getResult() #4 > /home/don/donTomcat/webapps/Financials2/java/Java.inc(1752): > java_Client->invokeMethod(3, 'getCause', Array) #5 > /home/don/donTomcat/webapps/Financials2/java/Java.inc(2062): > java_JavaProxy->__call('getCause', Array) #6 > /home/don/donTomcat/webapps/Financials2/CallJava.php(26): > java_exception->__call('getCause', Array) #7 > /home/don/donTomcat/webapps/Financials2/CallJava.php(26): > java_InternalException->getCause() #8 {main}] > > It can't load the class. I can't see why. Can anyone help? If there > is any other information that will help, I will gladly send it. > > Thanks > Don > > > >----------------------------------------------------------------------- >------- Dive into the World of Parallel Programming The Go Parallel >Website, sponsored by Intel and developed in partnership with Slashdot >Media, is your hub for all things parallel software development, from >weekly thought leadership blogs to news, videos, case studies, >tutorials and more. Take a look and join the conversation now. >http://goparallel.sourceforge.net/ > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > ________________________________ > This email with attachments may be confidential and intended solely for the use of the individual or entity to whom it is addressed. The email may contain legally protected information. If you have received this communication in error, be aware that making use of the information, forwarding it, copying it, or disclosing its content to other persons, is strictly prohibited and may be punishable by law. Please inform the sender about the error in transmission immediately. > ________________________________ > > ---------------------------------------------------------------------- > -------- Dive into the World of Parallel Programming The Go Parallel > Website, sponsored by Intel and developed in partnership with Slashdot > Media, is your hub for all things parallel software development, from > weekly thought leadership blogs to news, videos, case studies, > tutorials and more. Take a look and join the conversation now. > http://goparallel.sourceforge.net/ > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users ________________________________ This email with attachments may be confidential and intended solely for the use of the individual or entity to whom it is addressed. The email may contain legally protected information. If you have received this communication in error, be aware that making use of the information, forwarding it, copying it, or disclosing its content to other persons, is strictly prohibited and may be punishable by law. Please inform the sender about the error in transmission immediately. ________________________________ |
From: <php...@li...> - 2015-03-27 19:32:06
|
Hi Don, JDK and JRE can be different versions of Java on the same machine. Thus, yes that could still be it. --Nathan From: "php...@li..." <php...@li...> To: php...@li... Sent: Friday, March 27, 2015 9:15 AM Subject: Re: [Php-java-bridge-users] Problem running with Ubuntu Hi, Thank you for your response, but that's not it. I compiled the java jar on the same machine just before copying it to the WEB-INF lib directory. So it should be the same java version. Thanks Don On 03/27/2015 02:49 AM, php...@li... wrote: > Hi > > Jar file is compiled with the wrong Java version - meaning a newer version than the one that your Tomcat is running on. > > Hermod > > -----Opprinnelig melding----- > Fra: php...@li... [mailto:php...@li...] > Sendt: 26. mars 2015 19:04 > Til: php...@li... > Emne: [Php-java-bridge-users] Problem running with Ubuntu > > Hi, > > I'm using Tomcat private instance on Ubuntu. I have set up the bridge and can run the index and test programs. I then insert a simple java jar program in the WEB-INF/lib as I step through a simple program when I call in php > > require_once("java/Java.inc"); > $session = java_session(); > if(java_is_null($instName = $session->get("bean"))) { > $session->put("bean", $instName=new Java("DoSimple")); > }else { > $session->put("bean", $instName=new Java("testString", "Test of Bridge")); > } > $rawInstNameA = java_values($instName->testAnArray($yrqtr)); > > against the simple java program: > public class DoSimple { > public DoSimple(){ > } > public void testString(String s3){ > System.out.println(s3); > > } > } > > The Bridge fails in the call to the constructor: > > The error output is: > > Cause: > [[o:UnsupportedClassVersionError]:"java.lang.UnsupportedClassVersionError: > DoSimple : Unsupported major.minor version 52.0 (unable to load class DoSimple)" at: #-12 > org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2948) > #-11 > org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1208) > #-10 > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1688) > #-9 > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1569) > #-8 java.lang.Class.forName0(Native Method) #-7 > java.lang.Class.forName(Class.java:274) #-6 > php.java.bridge.Util.classForName(Util.java:1518) #-5 > php.java.bridge.JavaBridge.CreateObject(JavaBridge.java:445) #-4 > php.java.bridge.Request.handleRequest(Request.java:458) #-3 > php.java.bridge.Request.handleRequests(Request.java:500) #-2 > php.java.bridge.http.ContextRunner.run(ContextRunner.java:145) #-1 > php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:60) #0 > /home/don/donTomcat/webapps/Financials2/java/Java.inc(232): > java_ExceptionProxyFactory->getProxy(4, 'java.lang.Unsup...', 'T', true) > #1 /home/don/donTomcat/webapps/Financials2/java/Java.inc(360): > java_Arg->getResult(true) #2 > /home/don/donTomcat/webapps/Financials2/java/Java.inc(366): > java_Client->getWrappedResult(true) #3 > /home/don/donTomcat/webapps/Financials2/java/Java.inc(560): > java_Client->getResult() #4 > /home/don/donTomcat/webapps/Financials2/java/Java.inc(1752): > java_Client->invokeMethod(3, 'getCause', Array) #5 > /home/don/donTomcat/webapps/Financials2/java/Java.inc(2062): > java_JavaProxy->__call('getCause', Array) #6 > /home/don/donTomcat/webapps/Financials2/CallJava.php(26): > java_exception->__call('getCause', Array) #7 > /home/don/donTomcat/webapps/Financials2/CallJava.php(26): > java_InternalException->getCause() #8 {main}] > > It can't load the class. I can't see why. Can anyone help? If there > is any other information that will help, I will gladly send it. > > Thanks > Don > > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > ________________________________ > This email with attachments may be confidential and intended solely for the use of the individual or entity to whom it is addressed. The email may contain legally protected information. If you have received this communication in error, be aware that making use of the information, forwarding it, copying it, or disclosing its content to other persons, is strictly prohibited and may be punishable by law. Please inform the sender about the error in transmission immediately. > ________________________________ > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming The Go Parallel Website, sponsored > by Intel and developed in partnership with Slashdot Media, is your hub for all > things parallel software development, from weekly thought leadership blogs to > news, videos, case studies, tutorials and more. Take a look and join the > conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
From: <php...@li...> - 2015-03-27 15:15:23
|
Hi, Thank you for your response, but that's not it. I compiled the java jar on the same machine just before copying it to the WEB-INF lib directory. So it should be the same java version. Thanks Don On 03/27/2015 02:49 AM, php...@li... wrote: > Hi > > Jar file is compiled with the wrong Java version - meaning a newer version than the one that your Tomcat is running on. > > Hermod > > -----Opprinnelig melding----- > Fra: php...@li... [mailto:php...@li...] > Sendt: 26. mars 2015 19:04 > Til: php...@li... > Emne: [Php-java-bridge-users] Problem running with Ubuntu > > Hi, > > I'm using Tomcat private instance on Ubuntu. I have set up the bridge and can run the index and test programs. I then insert a simple java jar program in the WEB-INF/lib as I step through a simple program when I call in php > > require_once("java/Java.inc"); > $session = java_session(); > if(java_is_null($instName = $session->get("bean"))) { > $session->put("bean", $instName=new Java("DoSimple")); > }else { > $session->put("bean", $instName=new Java("testString", "Test of Bridge")); > } > $rawInstNameA = java_values($instName->testAnArray($yrqtr)); > > against the simple java program: > public class DoSimple { > public DoSimple(){ > } > public void testString(String s3){ > System.out.println(s3); > > } > } > > The Bridge fails in the call to the constructor: > > The error output is: > > Cause: > [[o:UnsupportedClassVersionError]:"java.lang.UnsupportedClassVersionError: > DoSimple : Unsupported major.minor version 52.0 (unable to load class DoSimple)" at: #-12 > org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2948) > #-11 > org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1208) > #-10 > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1688) > #-9 > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1569) > #-8 java.lang.Class.forName0(Native Method) #-7 > java.lang.Class.forName(Class.java:274) #-6 > php.java.bridge.Util.classForName(Util.java:1518) #-5 > php.java.bridge.JavaBridge.CreateObject(JavaBridge.java:445) #-4 > php.java.bridge.Request.handleRequest(Request.java:458) #-3 > php.java.bridge.Request.handleRequests(Request.java:500) #-2 > php.java.bridge.http.ContextRunner.run(ContextRunner.java:145) #-1 > php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:60) #0 > /home/don/donTomcat/webapps/Financials2/java/Java.inc(232): > java_ExceptionProxyFactory->getProxy(4, 'java.lang.Unsup...', 'T', true) > #1 /home/don/donTomcat/webapps/Financials2/java/Java.inc(360): > java_Arg->getResult(true) #2 > /home/don/donTomcat/webapps/Financials2/java/Java.inc(366): > java_Client->getWrappedResult(true) #3 > /home/don/donTomcat/webapps/Financials2/java/Java.inc(560): > java_Client->getResult() #4 > /home/don/donTomcat/webapps/Financials2/java/Java.inc(1752): > java_Client->invokeMethod(3, 'getCause', Array) #5 > /home/don/donTomcat/webapps/Financials2/java/Java.inc(2062): > java_JavaProxy->__call('getCause', Array) #6 > /home/don/donTomcat/webapps/Financials2/CallJava.php(26): > java_exception->__call('getCause', Array) #7 > /home/don/donTomcat/webapps/Financials2/CallJava.php(26): > java_InternalException->getCause() #8 {main}] > > It can't load the class. I can't see why. Can anyone help? If there > is any other information that will help, I will gladly send it. > > Thanks > Don > > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > ________________________________ > This email with attachments may be confidential and intended solely for the use of the individual or entity to whom it is addressed. The email may contain legally protected information. If you have received this communication in error, be aware that making use of the information, forwarding it, copying it, or disclosing its content to other persons, is strictly prohibited and may be punishable by law. Please inform the sender about the error in transmission immediately. > ________________________________ > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming The Go Parallel Website, sponsored > by Intel and developed in partnership with Slashdot Media, is your hub for all > things parallel software development, from weekly thought leadership blogs to > news, videos, case studies, tutorials and more. Take a look and join the > conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
From: <php...@li...> - 2015-03-27 07:25:03
|
Hi Jar file is compiled with the wrong Java version - meaning a newer version than the one that your Tomcat is running on. Hermod -----Opprinnelig melding----- Fra: php...@li... [mailto:php...@li...] Sendt: 26. mars 2015 19:04 Til: php...@li... Emne: [Php-java-bridge-users] Problem running with Ubuntu Hi, I'm using Tomcat private instance on Ubuntu. I have set up the bridge and can run the index and test programs. I then insert a simple java jar program in the WEB-INF/lib as I step through a simple program when I call in php require_once("java/Java.inc"); $session = java_session(); if(java_is_null($instName = $session->get("bean"))) { $session->put("bean", $instName=new Java("DoSimple")); }else { $session->put("bean", $instName=new Java("testString", "Test of Bridge")); } $rawInstNameA = java_values($instName->testAnArray($yrqtr)); against the simple java program: public class DoSimple { public DoSimple(){ } public void testString(String s3){ System.out.println(s3); } } The Bridge fails in the call to the constructor: The error output is: Cause: [[o:UnsupportedClassVersionError]:"java.lang.UnsupportedClassVersionError: DoSimple : Unsupported major.minor version 52.0 (unable to load class DoSimple)" at: #-12 org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2948) #-11 org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1208) #-10 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1688) #-9 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1569) #-8 java.lang.Class.forName0(Native Method) #-7 java.lang.Class.forName(Class.java:274) #-6 php.java.bridge.Util.classForName(Util.java:1518) #-5 php.java.bridge.JavaBridge.CreateObject(JavaBridge.java:445) #-4 php.java.bridge.Request.handleRequest(Request.java:458) #-3 php.java.bridge.Request.handleRequests(Request.java:500) #-2 php.java.bridge.http.ContextRunner.run(ContextRunner.java:145) #-1 php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:60) #0 /home/don/donTomcat/webapps/Financials2/java/Java.inc(232): java_ExceptionProxyFactory->getProxy(4, 'java.lang.Unsup...', 'T', true) #1 /home/don/donTomcat/webapps/Financials2/java/Java.inc(360): java_Arg->getResult(true) #2 /home/don/donTomcat/webapps/Financials2/java/Java.inc(366): java_Client->getWrappedResult(true) #3 /home/don/donTomcat/webapps/Financials2/java/Java.inc(560): java_Client->getResult() #4 /home/don/donTomcat/webapps/Financials2/java/Java.inc(1752): java_Client->invokeMethod(3, 'getCause', Array) #5 /home/don/donTomcat/webapps/Financials2/java/Java.inc(2062): java_JavaProxy->__call('getCause', Array) #6 /home/don/donTomcat/webapps/Financials2/CallJava.php(26): java_exception->__call('getCause', Array) #7 /home/don/donTomcat/webapps/Financials2/CallJava.php(26): java_InternalException->getCause() #8 {main}] It can't load the class. I can't see why. Can anyone help? If there is any other information that will help, I will gladly send it. Thanks Don ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users ________________________________ This email with attachments may be confidential and intended solely for the use of the individual or entity to whom it is addressed. The email may contain legally protected information. If you have received this communication in error, be aware that making use of the information, forwarding it, copying it, or disclosing its content to other persons, is strictly prohibited and may be punishable by law. Please inform the sender about the error in transmission immediately. ________________________________ |