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...> - 2009-06-12 20:05:26
|
I've followed the posted instructions and I have Tomcat running. When I deploy the JavaBridge.war servlet and go to localhost:8080/JavaBridge I get "Servlet PhpCGIServlet is not available". What am I doing wrong? Thanks |
|
From: <php...@li...> - 2009-06-08 11:20:07
|
Hi, I would start with the generated .java file. Jsp compiles to a servlet. If it works in jsp, it also works in a servlet. You can find the generated .java file in the tomcat work folder (assuming your jboss installation uses tomcat, not jetty). Regards, Jost Boekemeier P.S.: Please ignore the empty replies. They are generated by a software bug. :) 8. Jun 2009 1:03 nachm. schrieb am < php...@li...>: Hi Jost Boekemeier Thanks for the reply. I am able to run the same code in JSP. I am using jboss server for this. Do I need to register any listener ? Thanks - Ravi - -----Original Message----- From: php...@li...[mailto: php-java-bridg... |
|
From: <php...@li...> - 2009-06-08 11:15:09
|
8. Jun 2009 1:03 nachm. schrieb am < php...@li...>: Hi Jost Boekemeier Thanks for the reply. I am able to run the same code in JSP. I am using jboss server for this. Do I need to register any listener ? Thanks - Ravi - -----Original Message----- From: php...@li...[mailto: php-java-bridg... |
|
From: <php...@li...> - 2009-06-08 11:03:00
|
Hi Jost Boekemeier
Thanks for the reply. I am able to run the same code in JSP. I am using jboss server for this. Do I need to register any listener ?
Thanks
- Ravi -
-----Original Message-----
From: php...@li... [mailto:php...@li...]
Sent: Monday, June 08, 2009 4:25 PM
To: php...@li...
Subject: Re: [Php-java-bridge-users] Could not evaluate script: java.lang.IllegalStateException: No EngineFactory found. Have you registered a listener?
You need to register a context listener. Please see the install.j2ee
document or the JavaBridge.war example application for details.
Regards,
Jost Boekemeier
8. Jun 2009 12:25 nachm. schrieb am <
php...@li...>:
Hi
I am trying to invoke a php function from the servlet. I am getting the
following error. Pls find the following code.
public void doPost(
final HttpServletRequest httpRequest,
final HttpServletResponse httpResponse)
throws ServletException, IOException {
try {
URI remotePhpApp = new URI("
http://localhost:9080/JavaBridge/java/JavaProxy.php");
ScriptEngine e =
EngineFactory.getInvocablePhpScriptEngine (this,
this.getServletContext(), httpRequest,
httpResponse, remotePhpApp);
Object result = ((Invocable)e).invokeFunction("phpversion", new
Object[]{});
System.out.println(result);
e.eval ((Reader)null);
} catch (Exception ex) {
System.out.println("Could not evaluate script: "+ex);
} finally { // make sure to close() the file
// in JDK 1.5 and above use ((Closeable)e).close() instead
}
}
I am getting following error.
Could not evaluate script: java.lang.IllegalStateException: No EngineFactory
found. Have you registered a listener?
The same code works fine with jsp.
Thanks
- Ravi -
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
php-java-bridge-users mailing list
php...@li...
https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
php-java-bridge-users mailing list
php...@li...
https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
|
|
From: <php...@li...> - 2009-06-08 10:55:10
|
You need to register a context listener. Please see the install.j2ee
document or the JavaBridge.war example application for details.
Regards,
Jost Boekemeier
8. Jun 2009 12:25 nachm. schrieb am <
php...@li...>:
Hi
I am trying to invoke a php function from the servlet. I am getting the
following error. Pls find the following code.
public void doPost(
final HttpServletRequest httpRequest,
final HttpServletResponse httpResponse)
throws ServletException, IOException {
try {
URI remotePhpApp = new URI("
http://localhost:9080/JavaBridge/java/JavaProxy.php");
ScriptEngine e =
EngineFactory.getInvocablePhpScriptEngine (this,
this.getServletContext(), httpRequest,
httpResponse, remotePhpApp);
Object result = ((Invocable)e).invokeFunction("phpversion", new
Object[]{});
System.out.println(result);
e.eval ((Reader)null);
} catch (Exception ex) {
System.out.println("Could not evaluate script: "+ex);
} finally { // make sure to close() the file
// in JDK 1.5 and above use ((Closeable)e).close() instead
}
}
I am getting following error.
Could not evaluate script: java.lang.IllegalStateException: No EngineFactory
found. Have you registered a listener?
The same code works fine with jsp.
Thanks
- Ravi -
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
php-java-bridge-users mailing list
php...@li...
https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
|
|
From: <php...@li...> - 2009-06-08 10:53:02
|
8. Jun 2009 12:25 nachm. schrieb am <
php...@li...>:
Hi
I am trying to invoke a php function from the servlet. I am getting the
following error. Pls find the following code.
public void doPost(
final HttpServletRequest httpRequest,
final HttpServletResponse httpResponse)
throws ServletException, IOException {
try {
URI remotePhpApp = new URI("
http://localhost:9080/JavaBridge/java/JavaProxy.php");
ScriptEngine e =
EngineFactory.getInvocablePhpScriptEngine (this,
this.getServletContext(), httpRequest,
httpResponse, remotePhpApp);
Object result = ((Invocable)e).invokeFunction("phpversion", new
Object[]{});
System.out.println(result);
e.eval ((Reader)null);
} catch (Exception ex) {
System.out.println("Could not evaluate script: "+ex);
} finally { // make sure to close() the file
// in JDK 1.5 and above use ((Closeable)e).close() instead
}
}
I am getting following error.
Could not evaluate script: java.lang.IllegalStateException: No EngineFactory
found. Have you registered a listener?
The same code works fine with jsp.
Thanks
- Ravi -
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
php-java-bridge-users mailing list
php...@li...
https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
|
|
From: <php...@li...> - 2009-06-08 10:25:37
|
Hi
I am trying to invoke a php function from the servlet. I am getting the following error. Pls find the following code.
public void doPost(
final HttpServletRequest httpRequest,
final HttpServletResponse httpResponse)
throws ServletException, IOException {
try {
URI remotePhpApp = new URI("http://localhost:9080/JavaBridge/java/JavaProxy.php");
ScriptEngine e =
EngineFactory.getInvocablePhpScriptEngine (this,
this.getServletContext(), httpRequest, httpResponse, remotePhpApp);
Object result = ((Invocable)e).invokeFunction("phpversion", new Object[]{});
System.out.println(result);
e.eval ((Reader)null);
} catch (Exception ex) {
System.out.println("Could not evaluate script: "+ex);
} finally { // make sure to close() the file
// in JDK 1.5 and above use ((Closeable)e).close() instead
}
}
I am getting following error.
Could not evaluate script: java.lang.IllegalStateException: No EngineFactory found. Have you registered a listener?
The same code works fine with jsp.
Thanks
- Ravi -
|
|
From: <php...@li...> - 2009-06-05 18:52:52
|
Hi,
Tomcat listens on port 8080.
> I want php-java-bridge to listen on tcp port 9267
You can either change your tomcat configuration to use port 9267, or start a
standalone listener. Please see java -jar JavaBridge.jar --help or the
README for details how to start it.
BTW why is the port# important? You can use any port from within your php
scripts. Example:
<?php
require("http://HOST:8080/JavaBridge/java/Java.inc");
// communicate with HOST:8080 ...
echo java("java.lang.System")->getProperties();
?>
will invoke getProperties on HOST:8080.
Please see our documentation for details.
Regards,
Jost Boekemeier
5. Jun 2009 4:48 nachm. schrieb am <
php...@li...>:
Hi,
I use php-java-bridge 4.08a, works perfectly.
I have to clone the system, but on i386 machine.
I made the deb package, but after apache restart I see this running:
java -Djava.library.path=/usr/lib/php5/20060613+lfs
-Djava.class.path=/usr/lib/php5/20060613+lfs/JavaBridge.jar
-Djava.awt.headless=true -Dphp.java.bridge.base=/usr/lib/php5/20060613+lfs
php.java.bridge.Standalone LOCAL:@java-bridge-7dba 1
also, listens on a local unix socket.
I want php-java-bridge to listen on tcp port 9267, as on the original hw
(amd64).
I read the documentation, but nowadays the php-java-bridge used from tomcat,
and I don't find any suggestion to say to the bridge to listen on a tcp
port.
Have you any suggestion?
Thanks:
--
Üdv,
Ricsi
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
php-java-bridge-users mailing list
php...@li...
https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
|
|
From: <php...@li...> - 2009-06-05 14:47:58
|
Hi, I use php-java-bridge 4.08a, works perfectly. I have to clone the system, but on i386 machine. I made the deb package, but after apache restart I see this running: java -Djava.library.path=/usr/lib/php5/20060613+lfs -Djava.class.path=/usr/lib/php5/20060613+lfs/JavaBridge.jar -Djava.awt.headless=true -Dphp.java.bridge.base=/usr/lib/php5/20060613+lfs php.java.bridge.Standalone LOCAL:@java-bridge-7dba 1 also, listens on a local unix socket. I want php-java-bridge to listen on tcp port 9267, as on the original hw (amd64). I read the documentation, but nowadays the php-java-bridge used from tomcat, and I don't find any suggestion to say to the bridge to listen on a tcp port. Have you any suggestion? Thanks: -- Üdv, Ricsi |
|
From: <php...@li...> - 2009-06-02 18:15:33
|
We've solved this problem: we had 'magic_quotes_runtime' set to 'On' in our php.ini file. I suspect this caused the bridge parser to choke. In any event, this parameter is deprecated (and absent in PHP 6). We turned it off and everything worked fine.
-Michael
Require java.inc directly from your back end in order to avoid
version-specific problems.
This Java message means that php crashed immediately during the first
connect. And your PHP message means that Java crashed when processing a
protocol request. There was a protocol related change from 5.4.4 to
5.4.4.2, see our NEWS file for details.
Please use require_once("http://.../java/Java.inc") to avoid these problems.
Or make sure to use the Java.inc distributed with your java back end.
Regards,
Jost Boekemeier
2. Jun 2009 5:21 vorm. schrieb am <
php-java-bridge-users@li...>:
I'm getting an error when running a simple bridge demo on CentOS with
Apache. The problem is that the demo PHP code runs fine when piped into PHP
(version 5.2.9) on the command line, but gives the following error when
accessed via the web server:
protocol error: <O v=\"1\" m=\"java.lang.System\" p=\"O\" n=\"F\"/>,
> required at col 8. Check the back end log for OutOfMemoryErrors.
I also see this warning in VMBridge.log:
"VMBridge WARNING: contextfactory: Orphaned context: ContextFactory:
Context# 1@, credentials: null, SimpleContextFactory: class php.java.bridge.
http.SimpleContextFactory, current loader:
sun.misc.Launcher$AppClassLoader@77cde100 removed."
No OOM error is logged, and a check of free memory shows over 1GB available.
The memory required by the demo app is trivial. We aren't running a J2EE
container, instead running the Java app standalone per the FAQ. The Java
version is 1.6. Here is the relevant line of Java code in our Main class:
static final php.java.bridge.JavaBridgeRunner runner =
php.java.bridge.JavaBridgeRunner.getInstance("8087");
I can connect to the runner successfully on port 8087, and have configured
the bridge to connect on that port.
The demo PHP code is:
<?php require_once("java/Java.inc"); echo
java("java.lang.System")->getProperties(); ?>
As noted above, this code runs fine from the command line. The error only
occurs when it's run through the web server.
Is there any other kind of problem besides an OOM error that could result in
a protocol error such as this?
Thanks,
-Michael
|
|
From: <php...@li...> - 2009-06-02 04:56:26
|
Require java.inc directly from your back end in order to avoid
version-specific problems.
This Java message means that php crashed immediately during the first
connect. And your PHP message means that Java crashed when processing a
protocol request. There was a protocol related change from 5.4.4 to
5.4.4.2, see our NEWS file for details.
Please use require_once("http://.../java/Java.inc") to avoid these problems.
Or make sure to use the Java.inc distributed with your java back end.
Regards,
Jost Boekemeier
2. Jun 2009 5:21 vorm. schrieb am <
php...@li...>:
I'm getting an error when running a simple bridge demo on CentOS with
Apache. The problem is that the demo PHP code runs fine when piped into PHP
(version 5.2.9) on the command line, but gives the following error when
accessed via the web server:
protocol error: <O v=\"1\" m=\"java.lang.System\" p=\"O\" n=\"F\"/>,
> required at col 8. Check the back end log for OutOfMemoryErrors.
I also see this warning in VMBridge.log:
"VMBridge WARNING: contextfactory: Orphaned context: ContextFactory:
Context# 1@, credentials: null, SimpleContextFactory: class php.java.bridge.
http.SimpleContextFactory, current loader:
sun.misc.Launcher$AppClassLoader@77cde100 removed."
No OOM error is logged, and a check of free memory shows over 1GB available.
The memory required by the demo app is trivial. We aren't running a J2EE
container, instead running the Java app standalone per the FAQ. The Java
version is 1.6. Here is the relevant line of Java code in our Main class:
static final php.java.bridge.JavaBridgeRunner runner =
php.java.bridge.JavaBridgeRunner.getInstance("8087");
I can connect to the runner successfully on port 8087, and have configured
the bridge to connect on that port.
The demo PHP code is:
<?php require_once("java/Java.inc"); echo
java("java.lang.System")->getProperties(); ?>
As noted above, this code runs fine from the command line. The error only
occurs when it's run through the web server.
Is there any other kind of problem besides an OOM error that could result in
a protocol error such as this?
Thanks,
-Michael
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
php-java-bridge-users mailing list
php...@li...
https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
|
|
From: <php...@li...> - 2009-06-02 03:21:00
|
I'm getting an error when running a simple bridge demo on CentOS with Apache. The problem is that the demo PHP code runs fine when piped into PHP (version 5.2.9) on the command line, but gives the following error when accessed via the web server:
protocol error: <O v=\"1\" m=\"java.lang.System\" p=\"O\" n=\"F\"/>, > required at col 8. Check the back end log for OutOfMemoryErrors.
I also see this warning in VMBridge.log:
"VMBridge WARNING: contextfactory: Orphaned context: ContextFactory: Context# 1@, credentials: null, SimpleContextFactory: class php.java.bridge. http.SimpleContextFactory, current loader: sun.misc.Launcher$AppClassLoader@77cde100 removed."
No OOM error is logged, and a check of free memory shows over 1GB available. The memory required by the demo app is trivial. We aren't running a J2EE container, instead running the Java app standalone per the FAQ. The Java version is 1.6. Here is the relevant line of Java code in our Main class:
static final php.java.bridge.JavaBridgeRunner runner = php.java.bridge.JavaBridgeRunner.getInstance("8087");
I can connect to the runner successfully on port 8087, and have configured the bridge to connect on that port.
The demo PHP code is:
<?php require_once("java/Java.inc"); echo java("java.lang.System")->getProperties(); ?>
As noted above, this code runs fine from the command line. The error only occurs when it's run through the web server.
Is there any other kind of problem besides an OOM error that could result in a protocol error such as this?
Thanks,
-Michael
|
|
From: <php...@li...> - 2009-06-01 14:06:29
|
Thank you Jost.
I believe the only java_values call that I have is necessary then. I need
to get the result of the transformation back as a string so I can output it
(and possibly evaluate it for php code) Unless there's some better way to
get a potentially large chunk of text back from java.
/John
On Mon, Jun 1, 2009 at 2:12 AM, <php...@li...
> wrote:
> Hi,
>
> If I understand your code correctly, your function "saxon" is called with
> two arguments, $xml and $xsl being proxies for two (potentially large)
> Strings.
>
> As long as you don't evaluate these proxies (explicitly using
> java_values($xml) or implicitly using a cast to ((string)$xml)), there
> shouldn't be any performance problems.
>
> The java_values() call forces the bridge to evaluate a proxy and to return
> the result as a potentially large PHP value (string or array or ....). I
> would call java_values() only if necessary. E.g. at the end of the script,
> or right before manipulating it with native e.g. php str_* functions.
>
> The $system->setProperty() assumes ownership of the back end. Instead of
> setting the property over and over again I would set it once with a java
> -D... parameter. Or rely on the JEE environment to do the correct
> initialisation of your library.
>
> Regards,
> Jost Boekemeier
>
> 31. Mai 2009 4:55 nachm. schrieb am <
> php...@li...>:
>
> Hi,
>
> I'm working on porting an application to PHP that relies on some Java
> functionality. I've decided to use the PHP/Java Bridge.
>
> Here is what I've got in PHP. Summary: it takes in two strings, xml
> and xsl, and should return the result of applying the xsl transform on
> the xml.
>
> So far, so good! I originally was having trouble getting the result
> back out into a PHP string variable, but there was just a simple typo
> in the code, So my post is turning into a slightly different
> question.
>
> Could someone familiar with the PHP/Java bridge look over my code and
> let me know if it looks like I've got the "right idea" I'm concerned
> about performance, and the fact that the variables $xml and $xsl could
> potentially be very large (megabytes of text)
>
> Thanks in advance for any insight you can give me. This is new ground
> for me, and I want to make sure I'm not making any major mistakes.
>
> ------
>
> function saxon($xml,$xsl){
>
> require_once("
> http://localhost:8080/JavaBridgeTemplate5442/java/Java.inc
> ");
>
> $System = java("java.lang.System");
> $System->setProperty("javax.xml.transform.TransformerFactory",
> "net.sf.saxon.TransformerFactoryImpl");
>
> $TransformerFactory = java("javax.xml.transform.TransformerFactory");
> $tFactory = $TransformerFactory->newInstance();
>
> $xmlString = new Java("java.lang.String", $xml);
> $xslString = new Java("java.lang.String", $xsl);
> $xmlStringReader = new Java("java.io.StringReader", $xmlString);
> $xslStringReader = new Java("java.io.StringReader", $xslString);
>
> $xmlStreamSource = new
> Java("javax.xml.transform.stream.StreamSource", $xmlStringReader);
> $xslStreamSource = new
> Java("javax.xml.transform.stream.StreamSource", $xslStringReader);
>
> $transformer = $tFactory->newTransformer($xslStreamSource);
>
> $outputStringWriter = new Java("java.io.StringWriter");
> $outputStreamResult = new
> Java("javax.xml.transform.stream.StreamResult",$outputStringWriter);
>
> $transformer->transform($xmlStreamSource,$outputStreamResult);
>
>
> $outputString = new Java("java.lang.String");
> $outputString = $outputStringWriter->toString();
>
> return (java_values($outputString));
>
> }
>
> --
> John
>
>
> ------------------------------------------------------------------------------
> Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
> is a gathering of tech-side developers & brand creativity professionals.
> Meet
> the minds behind Google Creative Lab, Visual Complexity, Processing, &
> iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
> Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com
> _______________________________________________
> php-java-bridge-users mailing list
> php...@li...
> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
>
> ------------------------------------------------------------------------------
> Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
> is a gathering of tech-side developers & brand creativity professionals.
> Meet
> the minds behind Google Creative Lab, Visual Complexity, Processing, &
> iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
> Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com
> _______________________________________________
> php-java-bridge-users mailing list
> php...@li...
> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
>
--
John McGowan
Lynch2
792 West Bartlett Road
Bartlett, Illinois 60103
www.lynch2.com
w:847-608-6900 Ext 4110
|
|
From: <php...@li...> - 2009-06-01 07:10:23
|
Hi,
If I understand your code correctly, your function "saxon" is called with
two arguments, $xml and $xsl being proxies for two (potentially large)
Strings.
As long as you don't evaluate these proxies (explicitly using
java_values($xml) or implicitly using a cast to ((string)$xml)), there
shouldn't be any performance problems.
The java_values() call forces the bridge to evaluate a proxy and to return
the result as a potentially large PHP value (string or array or ....). I
would call java_values() only if necessary. E.g. at the end of the script,
or right before manipulating it with native e.g. php str_* functions.
The $system->setProperty() assumes ownership of the back end. Instead of
setting the property over and over again I would set it once with a java
-D... parameter. Or rely on the JEE environment to do the correct
initialisation of your library.
Regards,
Jost Boekemeier
31. Mai 2009 4:55 nachm. schrieb am <
php...@li...>:
Hi,
I'm working on porting an application to PHP that relies on some Java
functionality. I've decided to use the PHP/Java Bridge.
Here is what I've got in PHP. Summary: it takes in two strings, xml
and xsl, and should return the result of applying the xsl transform on
the xml.
So far, so good! I originally was having trouble getting the result
back out into a PHP string variable, but there was just a simple typo
in the code, So my post is turning into a slightly different
question.
Could someone familiar with the PHP/Java bridge look over my code and
let me know if it looks like I've got the "right idea" I'm concerned
about performance, and the fact that the variables $xml and $xsl could
potentially be very large (megabytes of text)
Thanks in advance for any insight you can give me. This is new ground
for me, and I want to make sure I'm not making any major mistakes.
------
function saxon($xml,$xsl){
require_once("http://localhost:8080/JavaBridgeTemplate5442/java/Java.inc
");
$System = java("java.lang.System");
$System->setProperty("javax.xml.transform.TransformerFactory",
"net.sf.saxon.TransformerFactoryImpl");
$TransformerFactory = java("javax.xml.transform.TransformerFactory");
$tFactory = $TransformerFactory->newInstance();
$xmlString = new Java("java.lang.String", $xml);
$xslString = new Java("java.lang.String", $xsl);
$xmlStringReader = new Java("java.io.StringReader", $xmlString);
$xslStringReader = new Java("java.io.StringReader", $xslString);
$xmlStreamSource = new
Java("javax.xml.transform.stream.StreamSource", $xmlStringReader);
$xslStreamSource = new
Java("javax.xml.transform.stream.StreamSource", $xslStringReader);
$transformer = $tFactory->newTransformer($xslStreamSource);
$outputStringWriter = new Java("java.io.StringWriter");
$outputStreamResult = new
Java("javax.xml.transform.stream.StreamResult",$outputStringWriter);
$transformer->transform($xmlStreamSource,$outputStreamResult);
$outputString = new Java("java.lang.String");
$outputString = $outputStringWriter->toString();
return (java_values($outputString));
}
--
John
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals.
Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com
_______________________________________________
php-java-bridge-users mailing list
php...@li...
https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
|
|
From: <php...@li...> - 2009-05-31 14:54:27
|
Hi,
I'm working on porting an application to PHP that relies on some Java
functionality. I've decided to use the PHP/Java Bridge.
Here is what I've got in PHP. Summary: it takes in two strings, xml
and xsl, and should return the result of applying the xsl transform on
the xml.
So far, so good! I originally was having trouble getting the result
back out into a PHP string variable, but there was just a simple typo
in the code, So my post is turning into a slightly different
question.
Could someone familiar with the PHP/Java bridge look over my code and
let me know if it looks like I've got the "right idea" I'm concerned
about performance, and the fact that the variables $xml and $xsl could
potentially be very large (megabytes of text)
Thanks in advance for any insight you can give me. This is new ground
for me, and I want to make sure I'm not making any major mistakes.
------
function saxon($xml,$xsl){
require_once("http://localhost:8080/JavaBridgeTemplate5442/java/Java.inc");
$System = java("java.lang.System");
$System->setProperty("javax.xml.transform.TransformerFactory",
"net.sf.saxon.TransformerFactoryImpl");
$TransformerFactory = java("javax.xml.transform.TransformerFactory");
$tFactory = $TransformerFactory->newInstance();
$xmlString = new Java("java.lang.String", $xml);
$xslString = new Java("java.lang.String", $xsl);
$xmlStringReader = new Java("java.io.StringReader", $xmlString);
$xslStringReader = new Java("java.io.StringReader", $xslString);
$xmlStreamSource = new
Java("javax.xml.transform.stream.StreamSource", $xmlStringReader);
$xslStreamSource = new
Java("javax.xml.transform.stream.StreamSource", $xslStringReader);
$transformer = $tFactory->newTransformer($xslStreamSource);
$outputStringWriter = new Java("java.io.StringWriter");
$outputStreamResult = new
Java("javax.xml.transform.stream.StreamResult",$outputStringWriter);
$transformer->transform($xmlStreamSource,$outputStreamResult);
$outputString = new Java("java.lang.String");
$outputString = $outputStringWriter->toString();
return (java_values($outputString));
}
--
John
|
|
From: <php...@li...> - 2009-05-31 04:36:45
|
I apologize, but I haven't gotten any new messages in 2 weeks and wanted to make sure this address was still on the mailing list. Thanks, |
|
From: <php...@li...> - 2009-05-18 06:15:05
|
I will be out of the office starting 05/15/2009 and will not return until 06/04/2009. I will respond to your message when I return. |
|
From: <php...@li...> - 2009-05-17 12:34:22
|
Hi,
The google app engine is a servlet engine with a very restrictive policy.
Only certain classes listed in a white list are granted full permissions.
Everything else cannot access files, start new threads or use reflection
setAccessible.
I think we should tune the PhpJavaServlet so that it can run in such a
restricted environment (the PhpCgiServlet still needs AllPermission,
however).
I will start with Andre's code and add a path which doesn't start java
threads to communicate with php. Then test against the debian and app engine
policy.
(Note that users still need a PHP-enabled HTTP server to run PHP, as PHP
needs direct file system access to run efficiently.)
Regards,
Jost Boekemeier
30. Apr 2009 7:31 nachm. schrieb am <
php...@li...>:
Hello,
I tested in Debian Lenny with an apache2(with mod_jk)+tomcat5.5,
configuring
/etc/php5/apache2/php.ini for
allow_url_include = On
(dangerous, only for development environment)
and using a test.php code from the FAQ.html code at apache2 doc root:
<?php
require_once("http://localhost:8180/JavaBridge/java/Java.inc");
echo java("java.lang.System")->getProperties();
?>
Use your own tomcat configured port number.
It worked as expected using the 5.4.4.2-1 j2ee deb package built from cvs,
placing the new file
60JavaBridge.policy
by hand where and as previously explained.
The 5.4.4.2-1 j2ee debian package is unfinished and only available at cvs
repository
and will not be released for binary download.
Build it from cvs following the README.Debian instructions.
The 60JavaBridge.policy file is available only at the repository HEAD by
now.
Please, test them and send suggestions and improvements to the list.
Regards.
Andre Felipe Machado
-- http://www.techforce.com.br A Debian user never dies. Issues a last
command: #shutdown -h now ...
On Thu, 30 Apr 2009 05:00:26 -0300,
php...@li... wrote: > > On Thu, 30 Apr 2009
11:27:39 +0200, > > php...
>> dv,
>
>> Ricsi
------------------------------------------------------------------------------
Register Now & Save...
php...@li...
https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
|
|
From: <php...@li...> - 2009-05-13 14:13:18
|
Yes, I discovered that. I was simply wondering if the directory's location was a configuration setting because I was wanting to put it under my directory of PHP files to keep things tidy. No big deal. Thanks. |
|
From: <php...@li...> - 2009-05-13 07:50:01
|
Hi, if you remove the java directory or its content from the .war file, it will be created from the PhpCgiServlet during deployment. Regards, Jost Boekemeier 13. Mai 2009 9:36 vorm. schrieb am < php...@li...>: I may have answered my own question because this works: myApp --- java* ------ Java.inc ------ JavaProxy.php --- WEB-INF ------ cgi --------- (21 files) ------ lib --------- JavaBridge.jar --------- php-script.jar --------- php-servlet.jar * Can I put this "java" directory or its contents somewhere else? If so, how? Thanks, David. ------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
|
From: <php...@li...> - 2009-05-13 07:35:43
|
I may have answered my own question because this works: myApp --- java* ------ Java.inc ------ JavaProxy.php --- WEB-INF ------ cgi --------- (21 files) ------ lib --------- JavaBridge.jar --------- php-script.jar --------- php-servlet.jar * Can I put this "java" directory or its contents somewhere else? If so, how? Thanks, David. |
|
From: <php...@li...> - 2009-05-13 02:54:42
|
Great product. I need to integrate Java Bridge into an existing Java web application (Tomcat, Struts, etc.) because I need PHP for Facebook apps. What are the minimum required files needed for this integration? "The minimum to accomplish what?" you might ask. Good question. I simply need to create PHP scripts and import/include PHP libraries (supplied by Facebook) within those PHP files. Thanks. David Woosley |
|
From: <php...@li...> - 2009-05-06 14:31:04
|
Hi, Please do not report NoClassDefFoundErrors to the mailing list. Please see our FAQ for details. Mai 6, 2009 4:02 nachm. schrieb am < php...@li...>: Hello, I have the following problem: java.lang.RuntimeException: PHP Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: CreateInstance failed: new web.FacettenBrowser. Cause: java.lang.ClassNotFoundException: Unresolved external reference: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory. -- Unable to call constructorI added slf4j to the path (build path)in eclipse. I exported the project as a fat_jar (only one classloader)but anyway I get this error message. Is it a problem with classpath, maybe is smth. wrong in my Manifest (class path) ? How I can fix it? What is wrong with slf4j??? Thanks in advance! ------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
|
From: <php...@li...> - 2009-05-06 14:04:49
|
Hello, I have the following problem:
java.lang.RuntimeException: PHP Fatal error:
Uncaught [[o:Exception]:"java.lang.Exception:
CreateInstance failed: new web.FacettenBrowser.
Cause: java.lang.ClassNotFoundException: Unresolved
external reference: java.lang.NoClassDefFoundError:
org/slf4j/LoggerFactory. -- Unable to call constructorI added slf4j to the path (build path)in eclipse. I exported the project as a fat_jar (only one classloader)but anyway I get this error message. Is it a problem with classpath, maybe is smth. wrong in my Manifest (class path) ? How I can fix it? What is wrong with slf4j???
Thanks in advance!
|
|
From: <php...@li...> - 2009-05-06 14:02:32
|
Hello, I have the following problem:
java.lang.RuntimeException: PHP Fatal error:
Uncaught [[o:Exception]:"java.lang.Exception:
CreateInstance failed: new web.FacettenBrowser.
Cause: java.lang.ClassNotFoundException: Unresolved
external reference: java.lang.NoClassDefFoundError:
org/slf4j/LoggerFactory. -- Unable to call constructorI
added slf4j to the path (build path)in eclipse. I exported the project
as a fat_jar (only one classloader)but anyway I get this error message.
Is it a problem with classpath, maybe is smth. wrong in my Manifest
(class path) ? How I can fix it? What is wrong with slf4j???
Thanks in
advance!
|