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...> - 2010-10-17 10:50:57
|
Hi, the argument appears to be quoted. The FastCGIServlet starts a FastCGI process pool through the operating system's /bin/sh, so I think we should find the bug there. What version of /bin/sh do you use, what does the following script: #!/bin/sh echo "$*" echo "$@" ./test.sh 'arg 1' arg2 3 | od -c display? Regards, Jost Bökemeier |
From: <php...@li...> - 2010-10-15 18:47:10
|
Hi, php-java-bridge_6.2.1rc5 tested in PHP 5.2.6 and 5.2.14 Thanks! On Fri, Oct 15, 2010 at 2:40 PM, < php...@li...> wrote: > > open('/root/wasce/var/temp'/sess_9695854ea31bcf9308a4b98d17830eb8, > O_RDWR) > > Which version of the PHP/Java Bridge do you use? > > > ------------------------------------------------------------------------------ > Download new Adobe(R) Flash(R) Builder(TM) 4 > The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly > Flex(R) Builder(TM)) enable the development of rich applications that run > across multiple browsers and platforms. Download your free trials today! > http://p.sf.net/sfu/adobe-dev2dev > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > -- Garcia |
From: <php...@li...> - 2010-10-15 17:40:29
|
> open('/root/wasce/var/temp'/sess_9695854ea31bcf9308a4b98d17830eb8, O_RDWR) Which version of the PHP/Java Bridge do you use? |
From: <php...@li...> - 2010-10-15 09:40:18
|
Hello all. I'm getting this message when ever 'session_start()' runs: /root/wasce/var/log//server.out:PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: open('/root/wasce/var/temp'/sess_9695854ea31bcf9308a4b98d17830eb8, O_RDWR) failed: No such file or directory (2) in /root/wasce/repository/default/claim/1287058146236/claim-1287058146236.war/missing/config.php on line 3 /root/wasce/var/log//server.out:PHP Warning: Unknown: open('/root/wasce/var/temp'/sess_9695854ea31bcf9308a4b98d17830eb8, O_RDWR) failed: No such file or directory (2) in Unknown on line 0 /root/wasce/var/log//server.out:PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct ('/root/wasce/var/temp') in Unknown on line 0 Path exists, already tried to change to /tmp. File permission is good, since I'm running as root. Tried from different Linux platforms (i386 and s390) using Geronimo and Jetty, always getting result above. My code is pretty simple: <? include_once($_SERVER['DOCUMENT_ROOT']."/java/Java.inc"); session_start(); .. . ?> Can someone advise how to handle PHP standards sessions? Thanks for your time!! -- Garcia -- Garcia |
From: <php...@li...> - 2010-10-09 13:43:22
|
> Not a PHP/Java Bridge bug. Sorry for the confusion. It *is* a PHP/Java Bridge bug: The remote context doesn't need a ContextLoaderListener. Fixed in CVS head. Thanks again for reporting this bug! Regards, Jost Bökemeier |
From: <php...@li...> - 2010-10-09 13:35:29
|
Hi again, >> java.lang.NullPointerException >> php.java.servlet.RemoteHttpServletCont in /var/www/Java.inc on line 869 > Confirmed. Not a PHP/Java Bridge bug. Our tutorial is wrong. The PHP/Java Bridge needs a ContextLoaderListener declaration. Please see our FAQ for details: http://php-java-bridge.sourceforge.net/pjb/FAQ.html I will correct the tutorial for version 6.2.1. Regards, Jost Bökemeier |
From: <php...@li...> - 2010-10-09 12:38:04
|
> java.lang.NullPointerException > php.java.servlet.RemoteHttpServletCont in /var/www/Java.inc on line 869 Confirmed. I will fix this bug for PHP/Java Bridge 6.2.1 and publish 6.2.1rc5 before making a final release. Furthermore: * php-servlet.jar is missing in the exploded folder * java -jar JavaBridge.jar does not work if HTTPS is selected in the GUI. We should use a self-signed certificate in this case. Thank you very much for this bug report! Regards, Jost Bökemeier |
From: <php...@li...> - 2010-10-09 12:15:01
|
> Because I am using PHP with FastCGI, can I put a php.ini file directly in > the same folder as my .php files, and that the parameters will be loaded > dynamically for this folder ? Yes, this feature has been introduced in php 5.2, I think. This is unrelated to the PHP/Java Bridge. Regards, Jost Bökemeier |
From: <php...@li...> - 2010-10-08 13:16:59
|
Hi, I'm a beginner with JavaBridge. I'm executing this example (custom servlet): http://php-java-bridge.sourceforge.net/pjb/servlet-programming.php Well. When I run the servlet, this runs ok and it don't generate errors, but when I run this php script: <?php define("JAVA_HOSTS", "localhost:8080"); define("JAVA_SERVLET", "/MyWebApp/Hello"); require_once("Java.inc"); echo java_context()->getServlet()->hello(); ?> the script generates this error: HTTP Status 500 The server encountered an internal error () that prevented it from fulfilling this request java.lang.NullPointerException php.java.servlet.RemoteHttpServletCont in /var/www/Java.inc on line 869 I don't understand because it generates this errors, any ideas ?. Rober. |
From: <php...@li...> - 2010-10-08 02:28:36
|
Hi all, I don't have access to my server atm, so I can't try it out, and I would like someone to confirm. Because I am using PHP with FastCGI, can I put a php.ini file directly in the same folder as my .php files, and that the parameters will be loaded dynamically for this folder ? I need to change a few variables like max_execution_time, post_max_size, etc. but it seems this is the only way to do it. Thanks in advance. Regards, J. Mallet |
From: <php...@li...> - 2010-10-03 14:59:17
|
Hi, I setup the bridge using Windows XP and I got it to work from PHP I have the following line at the top of the PHP file: require_once("http://localhost:8080/TestClass/java/Java.inc"); then the rest of the php code to use my java class and it worked. not sure whats the problem with Windows 7 64bit On 29 September 2010 21:28, <php...@li...>wrote: > Hi, > > if your class is there, you can access it from php. > Where is your code? > > On 9/28/10, php...@li... > <php...@li...> wrote: > > Here's my test JSP page (i don't use jsp, so my jsp code isn't great, but > > its good enough to test) > > > > i rewrote the TestClass in a package jspTest as well. > > The following works perfectly in tomcat....but i can't call the class > from > > PHP, which is what i need. > > > > <%@ page import= "jspTest.TestClass" %> > > <jsp:useBean id= "MyTest" class= "jspTest.TestClass" scope= "session" /> > > > > <html> > > <head><title>Number Guess</title></head> > > <body bgcolor="white"> > > <font size=4> > > > > <% MyTest.setTestString("From JSP"); %> > > > > Value set to <%= MyTest.getTestString() %> > > > > </font> > > </body> > > </html> > > > > Another thing is, my apache server for PHP does allow me to turn on the > > allow_url_include option....i've changed in php.ini (both > allow_url_include > > & fopen) no effect. > > would this be an issue? > > > > with this php/java bridge (java_include is a depreciated method.....so > > require_once("java/Java.inc") must be there and the you instantiate the > java > > class immediately, right?) > > -------------------------------------------------- > > From: <php...@li...> > > Sent: Tuesday, September 28, 2010 9:08 PM > > To: <php...@li...> > > Subject: Re: [Php-java-bridge-users] Using my own java classes with > > php/javabridge > > > >> Sounds as if the class .test does not exist. Use package name and see > >> FAQ fo details. > >> > >> > >> > >> On 9/28/10, php...@li... > >> <php...@li...> wrote: > >>> This is what the error log says....I took the code out of try...catch > >>> block > >>> so it could log the error. > >>> > >>> php[1992] > >>> PHP Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: > >>> CreateInstance failed: new testClass. Cause: > >>> java.lang.ClassNotFoundException: testClass VM: > >>> 1.6.0_21@http://java.sun.com/" at: > >>> #-30 > >>> > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1666) > >>> #-29 > >>> > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1511) > >>> #-28 java.lang.Class.forName0(Native Method) > >>> #-27 java.lang.Class.forName(Unknown Source) > >>> #-26 php.java.bridge.Util.classForName(Util.java:1481) > >>> #-25 php.java.bridge.JavaBridge.CreateObject(JavaBridge.java:429) > >>> #-24 php.java.bridge.Request.handleRequest(Request.java:458) > >>> #-23 php.java.bridge.Request.handleOneRequest(Request.java:510) > >>> #-22 > >>> > php.java.servlet.PhpJavaServlet.handleLocalConnection(PhpJavaServlet.java:202) > >>> #-21 php.java.servlet.PhpJavaServlet.handlePut(PhpJavaServlet.java:250) > >>> #-20 php.java.servlet.PhpJavaServlet.doPut(PhpJavaServlet.java:261) > >>> #-19 javax.servlet.http.HttpServlet.service(HttpServlet.java:644) > >>> #-18 javax.servlet.http.HttpServlet.service(Ht in C:\Program Files > >>> (x86)\Apache Software > >>> Foundation\Apache2.2\htdocs\MyTestPHPJava\java\Java.inc on line 195 > >>> > >>> Event Xml: > >>> <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> > >>> <System> > >>> <Provider Name="PHP-5.3.3" /> > >>> <EventID Qualifiers="16384">2</EventID> > >>> <Level>4</Level> > >>> <Task>6</Task> > >>> <Keywords>0x80000000000000</Keywords> > >>> <TimeCreated SystemTime="2010-09-28T15:51:10.000000000Z" /> > >>> <EventRecordID>26885</EventRecordID> > >>> <Channel>Application</Channel> > >>> <Computer></Computer> > >>> <Security /> > >>> </System> > >>> <EventData> > >>> <Data>php[1992]</Data> > >>> <Data>PHP Fatal error: Uncaught > [[o:Exception]:"java.lang.Exception: > >>> CreateInstance failed: new testClass. Cause: > >>> java.lang.ClassNotFoundException: testClass VM: > >>> 1.6.0_21@http://java.sun.com/" at: > >>> #-30 > >>> > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1666) > >>> #-29 > >>> > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1511) > >>> #-28 java.lang.Class.forName0(Native Method) > >>> #-27 java.lang.Class.forName(Unknown Source) > >>> #-26 php.java.bridge.Util.classForName(Util.java:1481) > >>> #-25 php.java.bridge.JavaBridge.CreateObject(JavaBridge.java:429) > >>> #-24 php.java.bridge.Request.handleRequest(Request.java:458) > >>> #-23 php.java.bridge.Request.handleOneRequest(Request.java:510) > >>> #-22 > >>> > php.java.servlet.PhpJavaServlet.handleLocalConnection(PhpJavaServlet.java:202) > >>> #-21 php.java.servlet.PhpJavaServlet.handlePut(PhpJavaServlet.java:250) > >>> #-20 php.java.servlet.PhpJavaServlet.doPut(PhpJavaServlet.java:261) > >>> #-19 javax.servlet.http.HttpServlet.service(HttpServlet.java:644) > >>> #-18 javax.servlet.http.HttpServlet.service(Ht in C:\Program Files > >>> (x86)\Apache Software > >>> Foundation\Apache2.2\htdocs\MyTestPHPJava\java\Java.inc on line > >>> 195</Data> > >>> </EventData> > >>> </Event> > >>> > >>> -------------------------------------------------- > >>> From: <php...@li...> > >>> Sent: Monday, September 27, 2010 8:25 PM > >>> To: <php...@li...> > >>> Subject: Re: [Php-java-bridge-users] Using my own java classes with php > >>> /javabridge > >>> > >>>> blank page means "syntax err" check php err log > >>>> > >>>> On 9/26/10, php...@li... > >>>> <php...@li...> wrote: > >>>>> Hi, > >>>>> > >>>>> i'm having issues getting my own java class working with php/java > >>>>> bridge. > >>>>> the bridge works perfect with the sample scripts and a script to get > >>>>> the > >>>>> date and display it, but as soon as i try using my own class, thats > >>>>> when > >>>>> the > >>>>> plot thickens.... > >>>>> > >>>>> heres my simple class: > >>>>> > >>>>> public class testClass { > >>>>> private String _testString; > >>>>> > >>>>> public testClass() { > >>>>> } > >>>>> > >>>>> public void SetStringVal (String val) { > >>>>> this._testString = val; > >>>>> } > >>>>> > >>>>> public String GetStringVal() { > >>>>> return this._testString; > >>>>> } > >>>>> > >>>>> } > >>>>> > >>>>> i compiled it, made it into a jar file, then added it to the > >>>>> web-inf/lib > >>>>> folder in the JavaBridge template and deployed it with Tomcat (even > >>>>> restarted tomcat) > >>>>> > >>>>> (i'm using Apache 2.2 for PHP scripts and tomcat for the > >>>>> bridge....works > >>>>> beautifully....) > >>>>> > >>>>> my PHP code: > >>>>> > >>>>> <?php > >>>>> require_once("java/Java.inc"); > >>>>> > >>>>> $mClass = new java("testClass"); > >>>>> > >>>>> $mClass->SetStringVal("From Java"); > >>>>> > >>>>> echo $mClass->GetStringVal() ." to PHP"; > >>>>> ?> > >>>>> > >>>>> I assume that i followed the steps correctly, but no luck....i just > get > >>>>> > >>>>> a > >>>>> blank page.... > >>>>> > >>>>> any help would be appreciated... > >>>>> > ------------------------------------------------------------------------------ > >>>>> Start uncovering the many advantages of virtual appliances > >>>>> and start using them to simplify application deployment and > >>>>> accelerate your shift to cloud computing. > >>>>> http://p.sf.net/sfu/novell-sfdev2dev > >>>>> _______________________________________________ > >>>>> php-java-bridge-users mailing list > >>>>> php...@li... > >>>>> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > >>>>> > >>>> > >>>> > ------------------------------------------------------------------------------ > >>>> Start uncovering the many advantages of virtual appliances > >>>> and start using them to simplify application deployment and > >>>> accelerate your shift to cloud computing. > >>>> http://p.sf.net/sfu/novell-sfdev2dev > >>>> _______________________________________________ > >>>> php-java-bridge-users mailing list > >>>> php...@li... > >>>> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > >>>> > >>> > >>> > ------------------------------------------------------------------------------ > >>> Start uncovering the many advantages of virtual appliances > >>> and start using them to simplify application deployment and > >>> accelerate your shift to cloud computing. > >>> http://p.sf.net/sfu/novell-sfdev2dev > >>> _______________________________________________ > >>> php-java-bridge-users mailing list > >>> php...@li... > >>> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > >>> > >> > >> > ------------------------------------------------------------------------------ > >> Start uncovering the many advantages of virtual appliances > >> and start using them to simplify application deployment and > >> accelerate your shift to cloud computing. > >> http://p.sf.net/sfu/novell-sfdev2dev > >> _______________________________________________ > >> php-java-bridge-users mailing list > >> php...@li... > >> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > >> > > > > > ------------------------------------------------------------------------------ > > Start uncovering the many advantages of virtual appliances > > and start using them to simplify application deployment and > > accelerate your shift to cloud computing. > > http://p.sf.net/sfu/novell-sfdev2dev > > _______________________________________________ > > php-java-bridge-users mailing list > > php...@li... > > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > > > > > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > -- <<< Every man has to go through hell in order to reach his paradise! >>> |
From: <php...@li...> - 2010-10-02 12:15:00
|
Hi, this should be fixed in version 6.2.1, which should be released this month. Thank you very much for reporting this issue. Regards, Jost Bökemeier |
From: <php...@li...> - 2010-10-01 16:10:24
|
I just found that using an absolute path in the Context Descriptor instead of the relative one solves the problem: <Context docBase="C:\Program Files\Apache Software Foundation\Tomcat 6.0\JavaBridge" /> Shouldn't it work with the relative path too? Thanks ________________________________ Da: "php...@li..." <php...@li...> A: php...@li... Inviato: Ven 1 ottobre 2010, 17:58:10 Oggetto: [Php-java-bridge-users] No input file specified Hi, I'm getting a "No input file specified." error when using a custom Context Descriptor on Tomcat 6. This has been tested on: - Windows 7 - Tomcat 6.0.20 and 6.0.29 - JavaBridgeTemplate621rc4.war and JavaBridge.war from php-java-bridge_6.2.1rc4_documentation.zip How to reproduce: - Uncompress the war in $CATALINA_BASE/JavaBridge (same level of conf/ and webapps/) - Create the file $CATALINA_BASE/conf/[enginename]/[hostname]/JavaBridge.xml with this content: <?xml version="1.0" encoding="UTF-8"?> <Context docBase="../JavaBridge" /> - Start Tomcat There will be no errors in the logs but http://localhost:8080/JavaBridge will show the error "No input file specified" using Firefox. NB: - the attribute "path" in Context doesn't change the behavior - Context configuration is at http://tomcat.apache.org/tomcat-6.0-doc/config/context.html - Uncompressing the files in webapps/ works correctly - Tomcat manager shows the app as correctly running - Static files are correctly loaded - This may be related to http://sourceforge.net/mailarchive/forum.php?thread_name=AANLkTi%3DS91TSFB4ba0szXn%2B-KJLSdHGGiFpZ-MGdVeQs%40mail.gmail.com&forum_name=php-java-bridge-users Thank you Francesco ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
From: <php...@li...> - 2010-10-01 15:58:19
|
Hi, I'm getting a "No input file specified." error when using a custom Context Descriptor on Tomcat 6. This has been tested on: - Windows 7 - Tomcat 6.0.20 and 6.0.29 - JavaBridgeTemplate621rc4.war and JavaBridge.war from php-java-bridge_6.2.1rc4_documentation.zip How to reproduce: - Uncompress the war in $CATALINA_BASE/JavaBridge (same level of conf/ and webapps/) - Create the file $CATALINA_BASE/conf/[enginename]/[hostname]/JavaBridge.xml with this content: <?xml version="1.0" encoding="UTF-8"?> <Context docBase="../JavaBridge" /> - Start Tomcat There will be no errors in the logs but http://localhost:8080/JavaBridge will show the error "No input file specified" using Firefox. NB: - the attribute "path" in Context doesn't change the behavior - Context configuration is at http://tomcat.apache.org/tomcat-6.0-doc/config/context.html - Uncompressing the files in webapps/ works correctly - Tomcat manager shows the app as correctly running - Static files are correctly loaded - This may be related to http://sourceforge.net/mailarchive/forum.php?thread_name=AANLkTi%3DS91TSFB4ba0szXn%2B-KJLSdHGGiFpZ-MGdVeQs%40mail.gmail.com&forum_name=php-java-bridge-users Thank you Francesco |
From: <php...@li...> - 2010-09-29 19:28:30
|
Hi, if your class is there, you can access it from php. Where is your code? On 9/28/10, php...@li... <php...@li...> wrote: > Here's my test JSP page (i don't use jsp, so my jsp code isn't great, but > its good enough to test) > > i rewrote the TestClass in a package jspTest as well. > The following works perfectly in tomcat....but i can't call the class from > PHP, which is what i need. > > <%@ page import= "jspTest.TestClass" %> > <jsp:useBean id= "MyTest" class= "jspTest.TestClass" scope= "session" /> > > <html> > <head><title>Number Guess</title></head> > <body bgcolor="white"> > <font size=4> > > <% MyTest.setTestString("From JSP"); %> > > Value set to <%= MyTest.getTestString() %> > > </font> > </body> > </html> > > Another thing is, my apache server for PHP does allow me to turn on the > allow_url_include option....i've changed in php.ini (both allow_url_include > & fopen) no effect. > would this be an issue? > > with this php/java bridge (java_include is a depreciated method.....so > require_once("java/Java.inc") must be there and the you instantiate the java > class immediately, right?) > -------------------------------------------------- > From: <php...@li...> > Sent: Tuesday, September 28, 2010 9:08 PM > To: <php...@li...> > Subject: Re: [Php-java-bridge-users] Using my own java classes with > php/javabridge > >> Sounds as if the class .test does not exist. Use package name and see >> FAQ fo details. >> >> >> >> On 9/28/10, php...@li... >> <php...@li...> wrote: >>> This is what the error log says....I took the code out of try...catch >>> block >>> so it could log the error. >>> >>> php[1992] >>> PHP Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: >>> CreateInstance failed: new testClass. Cause: >>> java.lang.ClassNotFoundException: testClass VM: >>> 1.6.0_21@http://java.sun.com/" at: >>> #-30 >>> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1666) >>> #-29 >>> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1511) >>> #-28 java.lang.Class.forName0(Native Method) >>> #-27 java.lang.Class.forName(Unknown Source) >>> #-26 php.java.bridge.Util.classForName(Util.java:1481) >>> #-25 php.java.bridge.JavaBridge.CreateObject(JavaBridge.java:429) >>> #-24 php.java.bridge.Request.handleRequest(Request.java:458) >>> #-23 php.java.bridge.Request.handleOneRequest(Request.java:510) >>> #-22 >>> php.java.servlet.PhpJavaServlet.handleLocalConnection(PhpJavaServlet.java:202) >>> #-21 php.java.servlet.PhpJavaServlet.handlePut(PhpJavaServlet.java:250) >>> #-20 php.java.servlet.PhpJavaServlet.doPut(PhpJavaServlet.java:261) >>> #-19 javax.servlet.http.HttpServlet.service(HttpServlet.java:644) >>> #-18 javax.servlet.http.HttpServlet.service(Ht in C:\Program Files >>> (x86)\Apache Software >>> Foundation\Apache2.2\htdocs\MyTestPHPJava\java\Java.inc on line 195 >>> >>> Event Xml: >>> <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> >>> <System> >>> <Provider Name="PHP-5.3.3" /> >>> <EventID Qualifiers="16384">2</EventID> >>> <Level>4</Level> >>> <Task>6</Task> >>> <Keywords>0x80000000000000</Keywords> >>> <TimeCreated SystemTime="2010-09-28T15:51:10.000000000Z" /> >>> <EventRecordID>26885</EventRecordID> >>> <Channel>Application</Channel> >>> <Computer></Computer> >>> <Security /> >>> </System> >>> <EventData> >>> <Data>php[1992]</Data> >>> <Data>PHP Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: >>> CreateInstance failed: new testClass. Cause: >>> java.lang.ClassNotFoundException: testClass VM: >>> 1.6.0_21@http://java.sun.com/" at: >>> #-30 >>> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1666) >>> #-29 >>> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1511) >>> #-28 java.lang.Class.forName0(Native Method) >>> #-27 java.lang.Class.forName(Unknown Source) >>> #-26 php.java.bridge.Util.classForName(Util.java:1481) >>> #-25 php.java.bridge.JavaBridge.CreateObject(JavaBridge.java:429) >>> #-24 php.java.bridge.Request.handleRequest(Request.java:458) >>> #-23 php.java.bridge.Request.handleOneRequest(Request.java:510) >>> #-22 >>> php.java.servlet.PhpJavaServlet.handleLocalConnection(PhpJavaServlet.java:202) >>> #-21 php.java.servlet.PhpJavaServlet.handlePut(PhpJavaServlet.java:250) >>> #-20 php.java.servlet.PhpJavaServlet.doPut(PhpJavaServlet.java:261) >>> #-19 javax.servlet.http.HttpServlet.service(HttpServlet.java:644) >>> #-18 javax.servlet.http.HttpServlet.service(Ht in C:\Program Files >>> (x86)\Apache Software >>> Foundation\Apache2.2\htdocs\MyTestPHPJava\java\Java.inc on line >>> 195</Data> >>> </EventData> >>> </Event> >>> >>> -------------------------------------------------- >>> From: <php...@li...> >>> Sent: Monday, September 27, 2010 8:25 PM >>> To: <php...@li...> >>> Subject: Re: [Php-java-bridge-users] Using my own java classes with php >>> /javabridge >>> >>>> blank page means "syntax err" check php err log >>>> >>>> On 9/26/10, php...@li... >>>> <php...@li...> wrote: >>>>> Hi, >>>>> >>>>> i'm having issues getting my own java class working with php/java >>>>> bridge. >>>>> the bridge works perfect with the sample scripts and a script to get >>>>> the >>>>> date and display it, but as soon as i try using my own class, thats >>>>> when >>>>> the >>>>> plot thickens.... >>>>> >>>>> heres my simple class: >>>>> >>>>> public class testClass { >>>>> private String _testString; >>>>> >>>>> public testClass() { >>>>> } >>>>> >>>>> public void SetStringVal (String val) { >>>>> this._testString = val; >>>>> } >>>>> >>>>> public String GetStringVal() { >>>>> return this._testString; >>>>> } >>>>> >>>>> } >>>>> >>>>> i compiled it, made it into a jar file, then added it to the >>>>> web-inf/lib >>>>> folder in the JavaBridge template and deployed it with Tomcat (even >>>>> restarted tomcat) >>>>> >>>>> (i'm using Apache 2.2 for PHP scripts and tomcat for the >>>>> bridge....works >>>>> beautifully....) >>>>> >>>>> my PHP code: >>>>> >>>>> <?php >>>>> require_once("java/Java.inc"); >>>>> >>>>> $mClass = new java("testClass"); >>>>> >>>>> $mClass->SetStringVal("From Java"); >>>>> >>>>> echo $mClass->GetStringVal() ." to PHP"; >>>>> ?> >>>>> >>>>> I assume that i followed the steps correctly, but no luck....i just get >>>>> >>>>> a >>>>> blank page.... >>>>> >>>>> any help would be appreciated... >>>>> ------------------------------------------------------------------------------ >>>>> Start uncovering the many advantages of virtual appliances >>>>> and start using them to simplify application deployment and >>>>> accelerate your shift to cloud computing. >>>>> http://p.sf.net/sfu/novell-sfdev2dev >>>>> _______________________________________________ >>>>> php-java-bridge-users mailing list >>>>> php...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users >>>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Start uncovering the many advantages of virtual appliances >>>> and start using them to simplify application deployment and >>>> accelerate your shift to cloud computing. >>>> http://p.sf.net/sfu/novell-sfdev2dev >>>> _______________________________________________ >>>> php-java-bridge-users mailing list >>>> php...@li... >>>> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users >>>> >>> >>> ------------------------------------------------------------------------------ >>> Start uncovering the many advantages of virtual appliances >>> and start using them to simplify application deployment and >>> accelerate your shift to cloud computing. >>> http://p.sf.net/sfu/novell-sfdev2dev >>> _______________________________________________ >>> php-java-bridge-users mailing list >>> php...@li... >>> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users >>> >> >> ------------------------------------------------------------------------------ >> Start uncovering the many advantages of virtual appliances >> and start using them to simplify application deployment and >> accelerate your shift to cloud computing. >> http://p.sf.net/sfu/novell-sfdev2dev >> _______________________________________________ >> php-java-bridge-users mailing list >> php...@li... >> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users >> > > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |
From: <php...@li...> - 2010-09-28 20:46:04
|
Here's my test JSP page (i don't use jsp, so my jsp code isn't great, but its good enough to test) i rewrote the TestClass in a package jspTest as well. The following works perfectly in tomcat....but i can't call the class from PHP, which is what i need. <%@ page import= "jspTest.TestClass" %> <jsp:useBean id= "MyTest" class= "jspTest.TestClass" scope= "session" /> <html> <head><title>Number Guess</title></head> <body bgcolor="white"> <font size=4> <% MyTest.setTestString("From JSP"); %> Value set to <%= MyTest.getTestString() %> </font> </body> </html> Another thing is, my apache server for PHP does allow me to turn on the allow_url_include option....i've changed in php.ini (both allow_url_include & fopen) no effect. would this be an issue? with this php/java bridge (java_include is a depreciated method.....so require_once("java/Java.inc") must be there and the you instantiate the java class immediately, right?) -------------------------------------------------- From: <php...@li...> Sent: Tuesday, September 28, 2010 9:08 PM To: <php...@li...> Subject: Re: [Php-java-bridge-users] Using my own java classes with php/javabridge > Sounds as if the class .test does not exist. Use package name and see > FAQ fo details. > > > > On 9/28/10, php...@li... > <php...@li...> wrote: >> This is what the error log says....I took the code out of try...catch >> block >> so it could log the error. >> >> php[1992] >> PHP Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: >> CreateInstance failed: new testClass. Cause: >> java.lang.ClassNotFoundException: testClass VM: >> 1.6.0_21@http://java.sun.com/" at: >> #-30 >> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1666) >> #-29 >> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1511) >> #-28 java.lang.Class.forName0(Native Method) >> #-27 java.lang.Class.forName(Unknown Source) >> #-26 php.java.bridge.Util.classForName(Util.java:1481) >> #-25 php.java.bridge.JavaBridge.CreateObject(JavaBridge.java:429) >> #-24 php.java.bridge.Request.handleRequest(Request.java:458) >> #-23 php.java.bridge.Request.handleOneRequest(Request.java:510) >> #-22 >> php.java.servlet.PhpJavaServlet.handleLocalConnection(PhpJavaServlet.java:202) >> #-21 php.java.servlet.PhpJavaServlet.handlePut(PhpJavaServlet.java:250) >> #-20 php.java.servlet.PhpJavaServlet.doPut(PhpJavaServlet.java:261) >> #-19 javax.servlet.http.HttpServlet.service(HttpServlet.java:644) >> #-18 javax.servlet.http.HttpServlet.service(Ht in C:\Program Files >> (x86)\Apache Software >> Foundation\Apache2.2\htdocs\MyTestPHPJava\java\Java.inc on line 195 >> >> Event Xml: >> <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> >> <System> >> <Provider Name="PHP-5.3.3" /> >> <EventID Qualifiers="16384">2</EventID> >> <Level>4</Level> >> <Task>6</Task> >> <Keywords>0x80000000000000</Keywords> >> <TimeCreated SystemTime="2010-09-28T15:51:10.000000000Z" /> >> <EventRecordID>26885</EventRecordID> >> <Channel>Application</Channel> >> <Computer></Computer> >> <Security /> >> </System> >> <EventData> >> <Data>php[1992]</Data> >> <Data>PHP Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: >> CreateInstance failed: new testClass. Cause: >> java.lang.ClassNotFoundException: testClass VM: >> 1.6.0_21@http://java.sun.com/" at: >> #-30 >> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1666) >> #-29 >> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1511) >> #-28 java.lang.Class.forName0(Native Method) >> #-27 java.lang.Class.forName(Unknown Source) >> #-26 php.java.bridge.Util.classForName(Util.java:1481) >> #-25 php.java.bridge.JavaBridge.CreateObject(JavaBridge.java:429) >> #-24 php.java.bridge.Request.handleRequest(Request.java:458) >> #-23 php.java.bridge.Request.handleOneRequest(Request.java:510) >> #-22 >> php.java.servlet.PhpJavaServlet.handleLocalConnection(PhpJavaServlet.java:202) >> #-21 php.java.servlet.PhpJavaServlet.handlePut(PhpJavaServlet.java:250) >> #-20 php.java.servlet.PhpJavaServlet.doPut(PhpJavaServlet.java:261) >> #-19 javax.servlet.http.HttpServlet.service(HttpServlet.java:644) >> #-18 javax.servlet.http.HttpServlet.service(Ht in C:\Program Files >> (x86)\Apache Software >> Foundation\Apache2.2\htdocs\MyTestPHPJava\java\Java.inc on line >> 195</Data> >> </EventData> >> </Event> >> >> -------------------------------------------------- >> From: <php...@li...> >> Sent: Monday, September 27, 2010 8:25 PM >> To: <php...@li...> >> Subject: Re: [Php-java-bridge-users] Using my own java classes with php >> /javabridge >> >>> blank page means "syntax err" check php err log >>> >>> On 9/26/10, php...@li... >>> <php...@li...> wrote: >>>> Hi, >>>> >>>> i'm having issues getting my own java class working with php/java >>>> bridge. >>>> the bridge works perfect with the sample scripts and a script to get >>>> the >>>> date and display it, but as soon as i try using my own class, thats >>>> when >>>> the >>>> plot thickens.... >>>> >>>> heres my simple class: >>>> >>>> public class testClass { >>>> private String _testString; >>>> >>>> public testClass() { >>>> } >>>> >>>> public void SetStringVal (String val) { >>>> this._testString = val; >>>> } >>>> >>>> public String GetStringVal() { >>>> return this._testString; >>>> } >>>> >>>> } >>>> >>>> i compiled it, made it into a jar file, then added it to the >>>> web-inf/lib >>>> folder in the JavaBridge template and deployed it with Tomcat (even >>>> restarted tomcat) >>>> >>>> (i'm using Apache 2.2 for PHP scripts and tomcat for the >>>> bridge....works >>>> beautifully....) >>>> >>>> my PHP code: >>>> >>>> <?php >>>> require_once("java/Java.inc"); >>>> >>>> $mClass = new java("testClass"); >>>> >>>> $mClass->SetStringVal("From Java"); >>>> >>>> echo $mClass->GetStringVal() ." to PHP"; >>>> ?> >>>> >>>> I assume that i followed the steps correctly, but no luck....i just get >>>> a >>>> blank page.... >>>> >>>> any help would be appreciated... >>>> ------------------------------------------------------------------------------ >>>> Start uncovering the many advantages of virtual appliances >>>> and start using them to simplify application deployment and >>>> accelerate your shift to cloud computing. >>>> http://p.sf.net/sfu/novell-sfdev2dev >>>> _______________________________________________ >>>> php-java-bridge-users mailing list >>>> php...@li... >>>> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users >>>> >>> >>> ------------------------------------------------------------------------------ >>> Start uncovering the many advantages of virtual appliances >>> and start using them to simplify application deployment and >>> accelerate your shift to cloud computing. >>> http://p.sf.net/sfu/novell-sfdev2dev >>> _______________________________________________ >>> php-java-bridge-users mailing list >>> php...@li... >>> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users >>> >> >> ------------------------------------------------------------------------------ >> Start uncovering the many advantages of virtual appliances >> and start using them to simplify application deployment and >> accelerate your shift to cloud computing. >> http://p.sf.net/sfu/novell-sfdev2dev >> _______________________________________________ >> php-java-bridge-users mailing list >> php...@li... >> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users >> > > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |
From: <php...@li...> - 2010-09-28 19:08:46
|
Sounds as if the class .test does not exist. Use package name and see FAQ fo details. On 9/28/10, php...@li... <php...@li...> wrote: > This is what the error log says....I took the code out of try...catch block > so it could log the error. > > php[1992] > PHP Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: > CreateInstance failed: new testClass. Cause: > java.lang.ClassNotFoundException: testClass VM: > 1.6.0_21@http://java.sun.com/" at: > #-30 > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1666) > #-29 > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1511) > #-28 java.lang.Class.forName0(Native Method) > #-27 java.lang.Class.forName(Unknown Source) > #-26 php.java.bridge.Util.classForName(Util.java:1481) > #-25 php.java.bridge.JavaBridge.CreateObject(JavaBridge.java:429) > #-24 php.java.bridge.Request.handleRequest(Request.java:458) > #-23 php.java.bridge.Request.handleOneRequest(Request.java:510) > #-22 > php.java.servlet.PhpJavaServlet.handleLocalConnection(PhpJavaServlet.java:202) > #-21 php.java.servlet.PhpJavaServlet.handlePut(PhpJavaServlet.java:250) > #-20 php.java.servlet.PhpJavaServlet.doPut(PhpJavaServlet.java:261) > #-19 javax.servlet.http.HttpServlet.service(HttpServlet.java:644) > #-18 javax.servlet.http.HttpServlet.service(Ht in C:\Program Files > (x86)\Apache Software > Foundation\Apache2.2\htdocs\MyTestPHPJava\java\Java.inc on line 195 > > Event Xml: > <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> > <System> > <Provider Name="PHP-5.3.3" /> > <EventID Qualifiers="16384">2</EventID> > <Level>4</Level> > <Task>6</Task> > <Keywords>0x80000000000000</Keywords> > <TimeCreated SystemTime="2010-09-28T15:51:10.000000000Z" /> > <EventRecordID>26885</EventRecordID> > <Channel>Application</Channel> > <Computer></Computer> > <Security /> > </System> > <EventData> > <Data>php[1992]</Data> > <Data>PHP Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: > CreateInstance failed: new testClass. Cause: > java.lang.ClassNotFoundException: testClass VM: > 1.6.0_21@http://java.sun.com/" at: > #-30 > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1666) > #-29 > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1511) > #-28 java.lang.Class.forName0(Native Method) > #-27 java.lang.Class.forName(Unknown Source) > #-26 php.java.bridge.Util.classForName(Util.java:1481) > #-25 php.java.bridge.JavaBridge.CreateObject(JavaBridge.java:429) > #-24 php.java.bridge.Request.handleRequest(Request.java:458) > #-23 php.java.bridge.Request.handleOneRequest(Request.java:510) > #-22 > php.java.servlet.PhpJavaServlet.handleLocalConnection(PhpJavaServlet.java:202) > #-21 php.java.servlet.PhpJavaServlet.handlePut(PhpJavaServlet.java:250) > #-20 php.java.servlet.PhpJavaServlet.doPut(PhpJavaServlet.java:261) > #-19 javax.servlet.http.HttpServlet.service(HttpServlet.java:644) > #-18 javax.servlet.http.HttpServlet.service(Ht in C:\Program Files > (x86)\Apache Software > Foundation\Apache2.2\htdocs\MyTestPHPJava\java\Java.inc on line 195</Data> > </EventData> > </Event> > > -------------------------------------------------- > From: <php...@li...> > Sent: Monday, September 27, 2010 8:25 PM > To: <php...@li...> > Subject: Re: [Php-java-bridge-users] Using my own java classes with php > /javabridge > >> blank page means "syntax err" check php err log >> >> On 9/26/10, php...@li... >> <php...@li...> wrote: >>> Hi, >>> >>> i'm having issues getting my own java class working with php/java bridge. >>> the bridge works perfect with the sample scripts and a script to get the >>> date and display it, but as soon as i try using my own class, thats when >>> the >>> plot thickens.... >>> >>> heres my simple class: >>> >>> public class testClass { >>> private String _testString; >>> >>> public testClass() { >>> } >>> >>> public void SetStringVal (String val) { >>> this._testString = val; >>> } >>> >>> public String GetStringVal() { >>> return this._testString; >>> } >>> >>> } >>> >>> i compiled it, made it into a jar file, then added it to the web-inf/lib >>> folder in the JavaBridge template and deployed it with Tomcat (even >>> restarted tomcat) >>> >>> (i'm using Apache 2.2 for PHP scripts and tomcat for the bridge....works >>> beautifully....) >>> >>> my PHP code: >>> >>> <?php >>> require_once("java/Java.inc"); >>> >>> $mClass = new java("testClass"); >>> >>> $mClass->SetStringVal("From Java"); >>> >>> echo $mClass->GetStringVal() ." to PHP"; >>> ?> >>> >>> I assume that i followed the steps correctly, but no luck....i just get a >>> blank page.... >>> >>> any help would be appreciated... >>> ------------------------------------------------------------------------------ >>> Start uncovering the many advantages of virtual appliances >>> and start using them to simplify application deployment and >>> accelerate your shift to cloud computing. >>> http://p.sf.net/sfu/novell-sfdev2dev >>> _______________________________________________ >>> php-java-bridge-users mailing list >>> php...@li... >>> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users >>> >> >> ------------------------------------------------------------------------------ >> Start uncovering the many advantages of virtual appliances >> and start using them to simplify application deployment and >> accelerate your shift to cloud computing. >> http://p.sf.net/sfu/novell-sfdev2dev >> _______________________________________________ >> php-java-bridge-users mailing list >> php...@li... >> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users >> > > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |
From: <php...@li...> - 2010-09-28 16:05:17
|
This is what the error log says....I took the code out of try...catch block so it could log the error. php[1992] PHP Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: CreateInstance failed: new testClass. Cause: java.lang.ClassNotFoundException: testClass VM: 1.6.0_21@http://java.sun.com/" at: #-30 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1666) #-29 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1511) #-28 java.lang.Class.forName0(Native Method) #-27 java.lang.Class.forName(Unknown Source) #-26 php.java.bridge.Util.classForName(Util.java:1481) #-25 php.java.bridge.JavaBridge.CreateObject(JavaBridge.java:429) #-24 php.java.bridge.Request.handleRequest(Request.java:458) #-23 php.java.bridge.Request.handleOneRequest(Request.java:510) #-22 php.java.servlet.PhpJavaServlet.handleLocalConnection(PhpJavaServlet.java:202) #-21 php.java.servlet.PhpJavaServlet.handlePut(PhpJavaServlet.java:250) #-20 php.java.servlet.PhpJavaServlet.doPut(PhpJavaServlet.java:261) #-19 javax.servlet.http.HttpServlet.service(HttpServlet.java:644) #-18 javax.servlet.http.HttpServlet.service(Ht in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\MyTestPHPJava\java\Java.inc on line 195 Event Xml: <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> <System> <Provider Name="PHP-5.3.3" /> <EventID Qualifiers="16384">2</EventID> <Level>4</Level> <Task>6</Task> <Keywords>0x80000000000000</Keywords> <TimeCreated SystemTime="2010-09-28T15:51:10.000000000Z" /> <EventRecordID>26885</EventRecordID> <Channel>Application</Channel> <Computer></Computer> <Security /> </System> <EventData> <Data>php[1992]</Data> <Data>PHP Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: CreateInstance failed: new testClass. Cause: java.lang.ClassNotFoundException: testClass VM: 1.6.0_21@http://java.sun.com/" at: #-30 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1666) #-29 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1511) #-28 java.lang.Class.forName0(Native Method) #-27 java.lang.Class.forName(Unknown Source) #-26 php.java.bridge.Util.classForName(Util.java:1481) #-25 php.java.bridge.JavaBridge.CreateObject(JavaBridge.java:429) #-24 php.java.bridge.Request.handleRequest(Request.java:458) #-23 php.java.bridge.Request.handleOneRequest(Request.java:510) #-22 php.java.servlet.PhpJavaServlet.handleLocalConnection(PhpJavaServlet.java:202) #-21 php.java.servlet.PhpJavaServlet.handlePut(PhpJavaServlet.java:250) #-20 php.java.servlet.PhpJavaServlet.doPut(PhpJavaServlet.java:261) #-19 javax.servlet.http.HttpServlet.service(HttpServlet.java:644) #-18 javax.servlet.http.HttpServlet.service(Ht in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\MyTestPHPJava\java\Java.inc on line 195</Data> </EventData> </Event> -------------------------------------------------- From: <php...@li...> Sent: Monday, September 27, 2010 8:25 PM To: <php...@li...> Subject: Re: [Php-java-bridge-users] Using my own java classes with php /javabridge > blank page means "syntax err" check php err log > > On 9/26/10, php...@li... > <php...@li...> wrote: >> Hi, >> >> i'm having issues getting my own java class working with php/java bridge. >> the bridge works perfect with the sample scripts and a script to get the >> date and display it, but as soon as i try using my own class, thats when >> the >> plot thickens.... >> >> heres my simple class: >> >> public class testClass { >> private String _testString; >> >> public testClass() { >> } >> >> public void SetStringVal (String val) { >> this._testString = val; >> } >> >> public String GetStringVal() { >> return this._testString; >> } >> >> } >> >> i compiled it, made it into a jar file, then added it to the web-inf/lib >> folder in the JavaBridge template and deployed it with Tomcat (even >> restarted tomcat) >> >> (i'm using Apache 2.2 for PHP scripts and tomcat for the bridge....works >> beautifully....) >> >> my PHP code: >> >> <?php >> require_once("java/Java.inc"); >> >> $mClass = new java("testClass"); >> >> $mClass->SetStringVal("From Java"); >> >> echo $mClass->GetStringVal() ." to PHP"; >> ?> >> >> I assume that i followed the steps correctly, but no luck....i just get a >> blank page.... >> >> any help would be appreciated... >> ------------------------------------------------------------------------------ >> Start uncovering the many advantages of virtual appliances >> and start using them to simplify application deployment and >> accelerate your shift to cloud computing. >> http://p.sf.net/sfu/novell-sfdev2dev >> _______________________________________________ >> php-java-bridge-users mailing list >> php...@li... >> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users >> > > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |
From: <php...@li...> - 2010-09-27 19:35:19
|
Hi, can you call the class from JSP? On 9/26/10, php...@li... <php...@li...> wrote: > Hi, > > i'm having issues getting my own java class working with php/java bridge. > the bridge works perfect with the sample scripts and a script to get the > date and display it, but as soon as i try using my own class, thats when the > plot thickens.... > > heres my simple class: > > public class testClass { > private String _testString; > > public testClass() { > } > > public void SetStringVal (String val) { > this._testString = val; > } > > public String GetStringVal() { > return this._testString; > } > > } > > i compiled it, made it into a jar file, then added it to the web-inf/lib > folder in the JavaBridge template and deployed it with Tomcat (even > restarted tomcat) > > (i'm using Apache 2.2 for PHP scripts and tomcat for the bridge....works > beautifully....) > > my PHP code: > > <?php > require_once("java/Java.inc"); > > $mClass = new java("testClass"); > > $mClass->SetStringVal("From Java"); > > echo $mClass->GetStringVal() ." to PHP"; > ?> > > I assume that i followed the steps correctly, but no luck....i just get a > blank page.... > > any help would be appreciated... > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |
From: <php...@li...> - 2010-09-27 18:25:49
|
blank page means "syntax err" check php err log On 9/26/10, php...@li... <php...@li...> wrote: > Hi, > > i'm having issues getting my own java class working with php/java bridge. > the bridge works perfect with the sample scripts and a script to get the > date and display it, but as soon as i try using my own class, thats when the > plot thickens.... > > heres my simple class: > > public class testClass { > private String _testString; > > public testClass() { > } > > public void SetStringVal (String val) { > this._testString = val; > } > > public String GetStringVal() { > return this._testString; > } > > } > > i compiled it, made it into a jar file, then added it to the web-inf/lib > folder in the JavaBridge template and deployed it with Tomcat (even > restarted tomcat) > > (i'm using Apache 2.2 for PHP scripts and tomcat for the bridge....works > beautifully....) > > my PHP code: > > <?php > require_once("java/Java.inc"); > > $mClass = new java("testClass"); > > $mClass->SetStringVal("From Java"); > > echo $mClass->GetStringVal() ." to PHP"; > ?> > > I assume that i followed the steps correctly, but no luck....i just get a > blank page.... > > any help would be appreciated... > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |
From: <php...@li...> - 2010-09-26 19:48:15
|
Hi, i'm having issues getting my own java class working with php/java bridge. the bridge works perfect with the sample scripts and a script to get the date and display it, but as soon as i try using my own class, thats when the plot thickens.... heres my simple class: public class testClass { private String _testString; public testClass() { } public void SetStringVal (String val) { this._testString = val; } public String GetStringVal() { return this._testString; } } i compiled it, made it into a jar file, then added it to the web-inf/lib folder in the JavaBridge template and deployed it with Tomcat (even restarted tomcat) (i'm using Apache 2.2 for PHP scripts and tomcat for the bridge....works beautifully....) my PHP code: <?php require_once("java/Java.inc"); $mClass = new java("testClass"); $mClass->SetStringVal("From Java"); echo $mClass->GetStringVal() ." to PHP"; ?> I assume that i followed the steps correctly, but no luck....i just get a blank page.... any help would be appreciated... |
From: <php...@li...> - 2010-09-25 10:34:01
|
Hi, this problem has been fixed in version 6.2.1 Regards, Jost Bökemeier On 9/11/10, Jost Boekemeier <jos...@go...> wrote: > Hi, > > I will look at this problem. Please note that the PHP/Java Bridge > currently doesn't use HTTPS to communicate with a JEE back end. > > I will change the behaviour for 6.2.1. > > Regards, > Jost Bökemeier > |
From: <php...@li...> - 2010-09-25 10:10:40
|
Hi, [please excuse the delay] > instance.getEngine().getContext().setWriter(writer); // wrong! reset by following line > instance.getEngine().setContext((ScriptContext)new PhpHttpScriptContext(instance.getEngine().getContext(),this,this.getServletContext(),request,response)); > I have been doing more investigations into why the php-java bridge is > not working as I would expect The PHP/Java Bridge code is correct. The decorator you've set connects the writer, reader, errorWriter to the servlet. So your code has no effect. Please see the example code I've given. BTW: For PHP/Java Bridge 6.2.1 I will rename the decorator to "PhpHttpScriptContext". Please either use your own decorator (copy PhpHttpCompiledScriptContext.java to your project) or please use the new name. The test script I've used is below: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <%@ page import="java.io.*" %> <%@ page import="org.apache.commons.lang.*" %> <%@page import="javax.script.*" %> <%@page import="php.java.script.servlet.*" %> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Example</title> <% // My PHP script is defined here.... String phpScript = ""; phpScript += "function pass_to_php_backend($ar) { \n"; phpScript += " print('something'); \n"; phpScript += " //do something useful here...\n"; phpScript += "} \n"; phpScript += "function outputJavaScript() { \n"; phpScript += "$IMConfig = array(); \n"; phpScript += "$IMConfig['allowed_image_extensions'] = array('jpg','gif','png'); \n"; phpScript += "return pass_to_php_backend($IMConfig); \n"; phpScript += "} \n"; phpScript += "outputJavaScript(); \n"; %> <%! private static final CompiledScript script; static { try { script =((Compilable)(new ScriptEngineManager().getEngineByName("php"))).compile( "<?php echo eval(java_context()->get('script')); ?>"); } catch (ScriptException e) { throw new RuntimeException("bleh!"); } } // private static final String evalPHP(String arg) { private String evalPHP(String arg, HttpServletRequest request, HttpServletResponse response) { CompiledScript instance =(CompiledScript)((java.security.cert.CertStoreParameters)script).clone(); instance.getEngine().put("script", arg); OutputStream out = new ByteArrayOutputStream(); Writer writer = new OutputStreamWriter(out); instance.getEngine().setContext((ScriptContext)new PhpHttpScriptContext(instance.getEngine().getContext(),this,this.getServletContext(),request,response)); instance.getEngine().getContext().setWriter(writer); try { instance.eval(); } catch (ScriptException e) { throw new RuntimeException("bleh!"); } try { writer.close(); } catch (IOException e) { throw new RuntimeException("bleh!"); } String result = out.toString(); return result; } %> <script type="text/javascript"> a = '<%= evalPHP(phpScript, request, response) %>;' if (a == "") alert("No Output"); else alert("Output = " + a); <%= evalPHP(phpScript, request, response) %> </script> </head> <body> hello </body> </html> Regards, Jost Bökemeier |
From: <php...@li...> - 2010-09-25 08:20:50
|
Hi Theen-Theen, [please excuse the delay] I am sorry, but I could not reproduce this problem with jboss-4.0.3SP1 > - on MacOSX > - php-cgi compiled using Macport. > - latest php-java-bridge > - JBOSS 4.0.3 > - I do not have the doc_root variable set in my php.ini Please upgrade jboss 4.0.3 or please send a bug report to the vendor. Regards, Jost Bökemeier |
From: <php...@li...> - 2010-09-25 08:18:18
|
Hi, welcome to the PHP/Java Bridge mailing list. You can find information about the PHP/Java Bridge at http://php-java-bridge.sf.net Regards, Jost Bökemeier |