From: cins <roc...@gm...> - 2005-05-13 11:22:55
|
From: Guillaume D. <gui...@po...> - 2005-10-17 15:42:48
|
--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.733 / Virus Database: 487 - Release Date: 02/08/2004 |
From: <php...@li...> - 2008-08-21 16:38:43
|
Hello. This may be a little off topic, but I am hoping someone on the list has run into this same problem and can enlighten me. I apologize in advance as I am fairly new to Java. On an Ubuntu 7.1 LAMP server. I have created a Java object for accessing an MS Sql Server server from Java. When I run it from the command line, it runs fine. When I run it from PHP through the JavaBridge, it cannot find the SQLServerDriver Unresolved external reference: java.lang.NoClassDefFoundError: com/microsoft/jdbc/sqlserver/SQLServerDriver. -- Unable to call constructor, see the README section "Java platform issues" for details. The resolution I am finding on the Internet indicates that this is because the package is not in the CLASSPATH. The driver is in mssqlserver.jar 731 Thu Nov 21 16:35:04 CST 2002 com/microsoft/jdbc/sqlserver/SQLServerDriver.class which is in my CLASSPATH as cshaffer. But when it is run from PHP through the Bridge, it is apparently not in the CLASSPATH. So who is running it in that case and how do I effect the CLASSPATH? Or can I use an import to force it? Is there a trick to this? Charles Shaffer Senior Analyst NTN-Bower Corporation |
From: <php...@li...> - 2008-08-22 10:43:39
|
Hi, a *global* CLASSPATH variable (i.e. which is set directly by the kernel or the init process) doesn't exist. So you can't use it. (the whole classpath concept is insane anyway). Please store your libraries in the jre/lib/ext repository instead. Depending on your version this is /usr/lib/jvm/java-6-sun/jre/lib/ext or java-6-sun-1.6.0.03/jre/lib/ext or wherever. Regards, Jost Boekemeier __________________________________________________ Do You Yahoo!? Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails. http://mail.yahoo.com |
From: <php...@li...> - 2009-04-07 12:42:17
|
Hi, I am new to pjb. I can't get my application started. I don't know exactly what my problem is. my Java-code (eclipse): public class HalloWelt { String hw = "Hallo Welt"; public String getHalloWelt() { return hw; } } my php code:<?php require_once("META-INF/java/Java.inc"); java_require("./HalloWelt.jar"); $myObj = new Java('Hallo Welt'); // display Hello World echo (String) $myObj->getHalloWelt(); ?> I have "helloworld.php",META-INF (Java) and WEB-INF (cgi, lib,web.xml and HalloWelt.jar) in the folder "HelloWorldWebApp" . I try to get this application started http://localhost:8081/HelloWorldWebApp/helloworld.php but it does not work. Have I done anything wrong? Please give me some advice! Many thanks in advance! Regards Katharina |
From: <php...@li...> - 2009-04-07 12:46:41
|
Hi, do I need to change anything in php.ini: ;; -*- mode: Scheme; tab-width:4 -*- ;; A simple php.ini ;; extension_dir is this "cgi" directory extension_dir=. ;; include php libraries from these directories include_path=.:/usr/share/pear Thank you in advance! Regards, Katharina |
From: <php...@li...> - 2009-04-07 12:58:08
|
Hi, Just double-click on JavaBridge.jar (or type java -jar JavaBridge.jar) and select SERVLET:8080. Then drag/drop Java.inc to your eclipse project and use the following php code to test: <?php require("Java.inc"); echo java("java.lang.System")->getProperties(); ?> Please do not modify your php.ini unless necessary. In case the back end is running on another computer/port within your intranet, fetch Java.inc from this computer/port using require("http://.../Java.inc"). Only then you need to set the allow_url_include in your php.ini. Regards, Jost Boekemeier -- Apr 7, 2009 2:47 nachm. schrieb am < php...@li...>: Hi, do I need to change anything in php.ini: ;; -*- mode: Scheme; tab-width:4 -*- ;; A simple php.ini ;; extension_dir is this "cgi" directory extension_dir=. ;; include php libraries from these directories include_path=.:/usr/share/pear Thank you in advance! Regards, Katharina ------------------------------------------------------------------------------ This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
From: <php...@li...> - 2009-04-07 13:47:59
|
Thank you very much for your answer. Now I am trying to do what you have written, but I get such an errow message: HTTP Status 500 - type Exception reportmessage description The server encountered an internal error () that prevented it from fulfilling this request.exception javax.servlet.ServletException: java.lang.RuntimeException: PHP Warning: require(Java.inc) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in C:\Development\apache-tomcat-6.0.18\webapps\HelloWorldWebApp\helloworld.php on line 1 PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required 'Java.inc' (include_path='.;C:\php5\pear') in C:\Development\apache-tomcat-6.0.18\webapps\HelloWorldWebApp\helloworld.php on line 1 php.java.servlet.PhpCGIServlet.handle(PhpCGIServlet.java:397) php.java.servlet.CGIServlet.doGet(CGIServlet.java:469) javax.servlet.http.HttpServlet.service(HttpServlet.java:617) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) root cause java.lang.RuntimeException: PHP Warning: require(Java.inc) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in C:\Development\apache-tomcat-6.0.18\webapps\HelloWorldWebApp\helloworld.php on line 1 PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required 'Java.inc' (include_path='.;C:\php5\pear') in C:\Development\apache-tomcat-6.0.18\webapps\HelloWorldWebApp\helloworld.php on line 1 php.java.servlet.fastcgi.FastCGIServlet$CGIRunner.parseBody(FastCGIServlet.java:478) php.java.servlet.fastcgi.FastCGIServlet$CGIRunner.doExecute(FastCGIServlet.java:373) php.java.servlet.fastcgi.FastCGIServlet$CGIRunner.execute(FastCGIServlet.java:381) php.java.servlet.CGIServlet.handle(CGIServlet.java:399) php.java.servlet.PhpCGIServlet.handle(PhpCGIServlet.java:363) php.java.servlet.CGIServlet.doGet(CGIServlet.java:469) javax.servlet.http.HttpServlet.service(HttpServlet.java:617) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) note The full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs. Apache Tomcat/6.0.18 The problem is that I can't find servlet 8080 or 8081 (what I need) on the list. |
From: <php...@li...> - 2009-04-07 14:03:06
|
Well, I did not find SERVLET 8081 (I need it) , and than I tryed to change my php code in the following way: <?php require("http://localhost:8081/HelloWorldWebApp/META-INF/java/Java.inc"); echo java("java.lang.System")->getProperties(); ?> Is it false? Please help me. I want to get this application started. Regards Katharina |
From: <php...@li...> - 2009-04-07 14:17:24
|
I guess this was a misunderstanding. If you want to create your own we app, please start with the JavaBridgeTemplate.war. It contains a test.php script which should work immediately. Next you can copy your libraries to WEB-INF/lib an use them from your extended test.php script. The third step is to move your test.php script to apache or to the console and invoke it from there. In any case, error messages go to the tomcat error log. Which error message do you see in the log? Regards, Jost Boekemeier -- Apr 7, 2009 4:03 nachm. schrieb am < php...@li...>: Well, I did not find SERVLET 8081 (I need it) , and than I tryed to change my php code in the following way: <?php require("http://localhost:8081/HelloWorldWebApp/META-INF/java/Java.inc "); echo java("java.lang.System")->getProperties(); ?> Is it false? Please help me. I want to get this application started. Regards Katharina ------------------------------------------------------------------------------ This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
From: <php...@li...> - 2009-04-07 14:08:43
|
Maybe I did something wrong in eclipse: java.inc is in the folder WebContent!? |
From: <php...@li...> - 2009-04-07 14:19:10
|
my bad. Java.inc can be stored in any directory, as long as it is accessible to the running php script. Regards, Jost Boekemeier -- Apr 7, 2009 4:10 nachm. schrieb am < php...@li...>: Maybe I did something wrong in eclipse: java.inc is in the folder WebContent!? ------------------------------------------------------------------------------ This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
From: <php...@li...> - 2009-04-08 07:03:20
|
Hello, I am sorry for too many Questiens. I was going to start with all the steps which you described yesterday and .... I don't believe it, but "index.php" is not running now. It was ok yesterday...I am confused. What can be the cause of it??? Many thanks in advance! Regards Katharina |
From: <php...@li...> - 2009-04-08 07:24:48
|
Which operating system and which back end do you use? Which response do you get from http://127.0.0.1:8081/JavaBridgeTemplate544/test.php Which error messages do you see in the back end log? Regards, Jost Boekemeier -- Apr 8, 2009 9:03 vorm. schrieb am < php...@li...>: Hello, I am sorry for too many Questiens. I was going to start with all the steps which you described yesterday and .... I don't believe it, but "index.php" is not running now. It was ok yesterday...I am confused. What can be the cause of it??? Many thanks in advance! Regards Katharina ------------------------------------------------------------------------------ This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
From: <php...@li...> - 2009-04-08 07:35:54
|
I use Windows XP and Tomcat. HTTP Status 404 - /JavaBridgeTemplate544/test.phptype Status reportmessage /JavaBridgeTemplate544/test.phpdescription The requested resource (/JavaBridgeTemplate544/test.php) is not available.Apache Tomcat/6.0.18 |
From: <php...@li...> - 2009-04-08 08:10:01
|
test.php: escription The server encountered an internal error () that prevented it from fulfilling this request.exception javax.servlet.ServletException: java.lang.RuntimeException: PHP Warning: require_once(java/Java.inc) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in C:\Development\apache-tomcat-6.0.18\webapps\HelloWorldWebApp\test.php on line 1 PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'java/Java.inc' (include_path='.;C:\php5\pear') in C:\Development\apache-tomcat-6.0.18\webapps\HelloWorldWebApp\test.php on line 1 php.java.servlet.PhpCGIServlet.handle(PhpCGIServlet.java:397) php.java.servlet.CGIServlet.doGet(CGIServlet.java:469) javax.servlet.http.HttpServlet.service(HttpServlet.java:617) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) root cause java.lang.RuntimeException: PHP Warning: require_once(java/Java.inc) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in C:\Development\apache-tomcat-6.0.18\webapps\HelloWorldWebApp\test.php on line 1 PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'java/Java.inc' (include_path='.;C:\php5\pear') in C:\Development\apache-tomcat-6.0.18\webapps\HelloWorldWebApp\test.php on line 1 php.java.servlet.fastcgi.FastCGIServlet$CGIRunner.parseBody(FastCGIServlet.java:478) php.java.servlet.fastcgi.FastCGIServlet$CGIRunner.doExecute(FastCGIServlet.java:373) php.java.servlet.fastcgi.FastCGIServlet$CGIRunner.execute(FastCGIServlet.java:381) php.java.servlet.CGIServlet.handle(CGIServlet.java:399) php.java.servlet.PhpCGIServlet.handle(PhpCGIServlet.java:363) php.java.servlet.CGIServlet.doGet(CGIServlet.java:469) javax.servlet.http.HttpServlet.service(HttpServlet.java:617) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) note The full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs.Apache Tomcat/6.0.18 |
From: <php...@li...> - 2009-04-08 08:27:52
|
Okay, now we are at something. It seems that Java.inc could not be found. Isn't it possible to copy the java\Java.inc to your web application and require() it from there? Another possibility is to copy all the code from Java.inc directly into your hello world script. Something like <?php our Java.inc code ...?> <?php Your hello world php code ?> BTW: Java.inc is distributed under the MIT license, so you can do with the code whatever you want. We will add such a notice to Java.inc in one of the next releases. Regards, Jost Boekemeier -- Apr 8, 2009 10:10 vorm. schrieb am < php...@li...>: test.php: escription The server encountered an internal error () that prevented it from fulfilling this request.exception javax.servlet.ServletException: java.lang.RuntimeException: PHP Warning: require_once(java/Java.inc) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in C:\Development\apache-tomcat-6.0.18\webapps\HelloWorldWebApp\test.php on line 1 PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'java/Java.inc' (include_path='.;C:\php5\pear') in C:\Development\apache-tomcat-6.0.18\webapps\HelloWorldWebApp\test.php on line 1 php.java.servlet.PhpCGIServlet.handle(PhpCGIServlet.java:397) php.java.servlet.CGIServlet.doGet(CGIServlet.java:469) javax.servlet.http.HttpServlet.service(HttpServlet.java:617) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) root cause java.lang.RuntimeException: PHP Warning: require_once(java/Java.inc) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in C:\Development\apache-tomcat-6.0.18\webapps\HelloWorldWebApp\test.php on line 1 PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'java/Java.inc' (include_path='.;C:\php5\pear') in C:\Development\apache-tomcat-6.0.18\webapps\HelloWorldWebApp\test.php on line 1 php.java.servlet.fastcgi.FastCGIServlet$CGIRunner.parseBody(FastCGIServlet.java:478) php.java.servlet.fastcgi.FastCGIServlet$CGIRunner.doExecute(FastCGIServlet.java:373) php.java.servlet.fastcgi.FastCGIServlet$CGIRunner.execute(FastCGIServlet.java:381) php.java.servlet.CGIServlet.handle(CGIServlet.java:399) php.java.servlet.PhpCGIServlet.handle(PhpCGIServlet.java:363) php.java.servlet.CGIServlet.doGet(CGIServlet.java:469) javax.servlet.http.HttpServlet.service(HttpServlet.java:617) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) note The full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs.Apache Tomcat/6.0.18 ------------------------------------------------------------------------------ This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
From: <php...@li...> - 2009-04-08 08:26:42
|
Is the code false? |
From: <php...@li...> - 2009-04-08 08:55:26
|
I have done it (java.inc) http://localhost:8081/HelloWorldWebApp/helloworld.php ( if I have test.php on the place of "helloworld.php) it works perfect, but my version has already been loading for 3 minutes- no error messages, nothing. |
From: <php...@li...> - 2009-04-08 09:18:58
|
I don't understand it.It is still loading...................................................................... Why is it so??? Is my code correct? Maybe now my HalloWelt.jar can't be found?..................................................................................... <?php require_once("Java.inc"); java_require("HalloWelt.jar"); $myObj = new Java('HalloWelt'); // display Hello World echo (String) $myObj->getHalloWelt(); ?> Thank you in advance!!!!! |
From: <php...@li...> - 2009-04-08 10:02:06
|
Why do you call java_require()? Just put your libs to web-inf/lib. You can use die() in you code to check where it loops. Apr 8, 2009 11:19 vorm. schrieb am < php...@li...>: I don't understand it.It is still loading...................................................................... Why is it so??? Is my code correct? Maybe now my HalloWelt.jar can't be found?..................................................................................... <?php require_once("Java.inc"); java_require("HalloWelt.jar"); $myObj = new Java('HalloWelt'); // display Hello World echo (String) $myObj->getHalloWelt(); ?> Thank you in advance!!!!! ------------------------------------------------------------------------------ This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
From: <php...@li...> - 2009-04-08 09:22:15
|
From: <php...@li...> - 2009-04-08 10:02:53
|
I am very sorry, but I am only student apprentice and that what you have written is a little bit difficult for me. Could you explain it in other words please. I have no idea how to do it...... Thank you in advance!!!!! |
From: <php...@li...> - 2009-04-08 10:16:00
|
What you are doing now (including java.inc directly into your php script) will be default in version 5.4.4.2. Please try to consolidate your questions in one mail. Regards, Jost Boekemeier -- Apr 8, 2009 12:03 nachm. schrieb am < php...@li...>: I am very sorry, but I am only student apprentice and that what you have written is a little bit difficult for me. Could you explain it in other words please. I have no idea how to do it...... Thank you in advance!!!!! ------------------------------------------------------------------------------ This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
From: <php...@li...> - 2009-04-08 10:06:56
|
My last message was about: I think we should add a short path to the bridge so that users dont have to require Java.inc when PHP scripts are running within a servlet engine. This means that we add code to the FastCGI and CGI servlet, which acquires a SocketContextServer early and then feeds the code from Java.inc to the open Fast-CGI input stream. Similar to what our JSR 223 scripts do. This doesn't necessarily make php scripts which don't require Java functionality slower, as this short path consomes only one continuation instead of two. Which in turn means that the servlet thread pool cannot overrun, so the pool check can go away (the check was ugly and worked only on some known engines anyway). |