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
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
1
|
2
(4) |
3
(1) |
4
|
|
5
|
6
|
7
(9) |
8
(26) |
9
|
10
|
11
(3) |
|
12
|
13
|
14
(3) |
15
|
16
(1) |
17
(6) |
18
(2) |
|
19
(2) |
20
(8) |
21
(11) |
22
(3) |
23
(1) |
24
(8) |
25
(2) |
|
26
(1) |
27
(5) |
28
(6) |
29
(17) |
30
(16) |
|
|
|
From: <php...@li...> - 2009-04-24 09:55:19
|
I will try using the servlet, but i can not find JavaBridgeTemplate.war, only JavaBridge.war (which gives me an java.io.IOException: java.io.IOException: Cannot allocate memory error deploying) If I use the Java daemon, how must I configure the bridge (and where, php.ini?) to communicate with it? Is still needed to include Java.inc? Thanks! El vie, 24-04-2009 a las 10:47 +0200, php...@li... escribió: > Hi, > > 1. If you don't want to use the .war file, then start a Java daemon from PHP > to communicate with the J2EE back end. For example start java with: java > -Dphp.java.bridge.daemon=true -jar JavaBridge.jar form PHP. > > But as long as you run your J2EE back end as a daemon, you don't need to > start an additional daemon from PHP. > > 2. If your j2ee server cannot deploy a standard J2EE module, please report > this bug to the server developers. We know that the JavaBridgeTemplate.war > runs on jboss 5 w/o problems. We have tested bridge version 5.4.4.2 (current > download is rc, will be final tomorrow). > > Regards, > Jost Boekemeier > > Apr 24, 2009 10:32 vorm. schrieb am < > php...@li...>: > > Thank you a lot for the reply, > > 1. I've not using servlet with php-java-bridge 4.0.1, I made the > connection directly, so there is no JavaBridge.war in the jboss deploy > directory when I get that error (jboss 5.0.1 + php-java-bridge 4.0.1) > When I upgrade to jboss 5.0.1, I compile it also with --disable-servlet > but then I get the second error (java not found) > I also must to say that when I've tried to deploy the JavaBridge.war > file into jboss, I could not access to http://localhost:8080/JavaBridge > as the tutorial says, but I have several others .war files deployed ok :( > > 2. Where is the Java.inc file? that is the one I can find in > server/META-INF/java/Java.inc when I uncompress the php-java-bridge, > isn't it? Should I remove the [java] block at php.ini and at java.ini? > > 3. I'm using ejb3, so there is no need of env mapping declaration. > > Regards, and sorry my English! > Pedro Navajas > > El vie, 24-04-2009 a las 08:59 +0200, > php...@li... escribió: > > > Hi, > > 1. NoClassDefFound errors appear when the same class is loaded > more than > once. Probably... > > > ------------------------------------------------------------------------------ > > Crystal Reports - New Free Runtime and 30 Day Trial > > Check out the new simplified licensign option that enables unlimited > > royalty-free distribution of the report engine for externally facing > > server and web deployment. > > http://p.sf.net/sfu/businessobjects > > > _______________________________________________ > php-java-bridge-users > mailing list > php-java-br... > ------------------------------------------------------------------------------ > Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensign option that enables unlimited > royalty-free distribution of the report engine for externally facing > server and web deployment. > http://p.sf.net/sfu/businessobjects > > _______________________________________________ php-java-bridge-users > mailing list php-java-bridge-u... > ------------------------------------------------------------------------------ > Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensign option that enables unlimited > royalty-free distribution of the report engine for externally facing > server and web deployment. > http://p.sf.net/sfu/businessobjects > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
|
From: <php...@li...> - 2009-04-24 09:52:56
|
Hello Jost,
I've got a problem: I need to access a class which is in the jar-file with many other classes (with many subfolders- zip)
This way to solve this problem was not successful:
$myObj = new java("..../..../....");
Thank you in advance for your help!
|
|
From: <php...@li...> - 2009-04-24 08:48:14
|
Hi, 1. If you don't want to use the .war file, then start a Java daemon from PHP to communicate with the J2EE back end. For example start java with: java -Dphp.java.bridge.daemon=true -jar JavaBridge.jar form PHP. But as long as you run your J2EE back end as a daemon, you don't need to start an additional daemon from PHP. 2. If your j2ee server cannot deploy a standard J2EE module, please report this bug to the server developers. We know that the JavaBridgeTemplate.war runs on jboss 5 w/o problems. We have tested bridge version 5.4.4.2 (current download is rc, will be final tomorrow). Regards, Jost Boekemeier Apr 24, 2009 10:32 vorm. schrieb am < php...@li...>: Thank you a lot for the reply, 1. I've not using servlet with php-java-bridge 4.0.1, I made the connection directly, so there is no JavaBridge.war in the jboss deploy directory when I get that error (jboss 5.0.1 + php-java-bridge 4.0.1) When I upgrade to jboss 5.0.1, I compile it also with --disable-servlet but then I get the second error (java not found) I also must to say that when I've tried to deploy the JavaBridge.war file into jboss, I could not access to http://localhost:8080/JavaBridge as the tutorial says, but I have several others .war files deployed ok :( 2. Where is the Java.inc file? that is the one I can find in server/META-INF/java/Java.inc when I uncompress the php-java-bridge, isn't it? Should I remove the [java] block at php.ini and at java.ini? 3. I'm using ejb3, so there is no need of env mapping declaration. Regards, and sorry my English! Pedro Navajas El vie, 24-04-2009 a las 08:59 +0200, php...@li... escribió: > Hi, > > 1. NoClassDefFound errors appear when the same class is loaded more than > once. Probably... > ------------------------------------------------------------------------------ > Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensign option that enables unlimited > royalty-free distribution of the report engine for externally facing > server and web deployment. > http://p.sf.net/sfu/businessobjects > _______________________________________________ > php-java-bridge-users mailing list > php-java-br... ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensign option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ php-java-bridge-users mailing list php-java-bridge-u... |
|
From: <php...@li...> - 2009-04-24 08:31:52
|
Thank you a lot for the reply,
1. I've not using servlet with php-java-bridge 4.0.1, I made the
connection directly, so there is no JavaBridge.war in the jboss deploy
directory when I get that error (jboss 5.0.1 + php-java-bridge 4.0.1)
When I upgrade to jboss 5.0.1, I compile it also with --disable-servlet
but then I get the second error (java not found)
I also must to say that when I've tried to deploy the JavaBridge.war
file into jboss, I could not access to http://localhost:8080/JavaBridge
as the tutorial says, but I have several others .war files deployed ok :(
2. Where is the Java.inc file? that is the one I can find in
server/META-INF/java/Java.inc when I uncompress the php-java-bridge,
isn't it? Should I remove the [java] block at php.ini and at java.ini?
3. I'm using ejb3, so there is no need of env mapping declaration.
Regards, and sorry my English!
Pedro Navajas
El vie, 24-04-2009 a las 08:59 +0200,
php...@li... escribió:
> Hi,
>
> 1. NoClassDefFound errors appear when the same class is loaded more than
> once. Probably jboss 5 already contains some libraries which are also
> included in the JavaBridge.war. Please use the JavaBridgeTemplate.war
> instead, which contains only the essential libraries JavaBridge.jar,
> php-script.jar and php-servlet.jar.
>
> 2. Please do not use the java.so or php_java.dll anymore. The pure PHP
> implementation contained in Java.inc is faster and works well with 64 bit
> Java VMs.
> Please add a
>
> require_once("java/Java.inc")
>
> or
> require_once("http://localhost:8080/JavaBridge/java/Java.inc")
>
> to the PHP scripts which require Java functionality.
>
> 3. Your PHP code should work, provided that the remote interface is
> accessible (ejb2 needed some env mapping declared in a proprietary web xml
> file, this may have changed in ejb3, just guessing)
>
>
> Regards,
> Jost Boekemeier
>
> Apr 23, 2009 7:18 nachm. schrieb am <
> php...@li...>:
>
> I was using apache + jboss 4.2.2 + php-java-bridge for a long time, but
> recently I upgraded to jboss 5.0.1 and suddenly the php-java-bridge stop
> working (it couldn't connect with the deployed jboss ejbs, and prints
> some weird errors about not founded classes), but it initialized
> correctly.
>
> I thought that upgrading to php-java-bridge 5.0.1 should be the best
> choice, but now the bridge dont even initialize correctly and apache
> shows:
> Fatal error: class 'Java' not found
>
> Any hints??, I am using Gentoo GNU/Linux, apache web server and jboss
> aplication server
>
> I configured the bridge using the
> file /etc/php/apache/ext-active/java.ini:
> ---------------------------------------------java.ini
> extension = java.so
> extension_dir = /usr/lib64/php5/lib/php/extensions/no-debug-zts-20060613
> [java]
> java.java_home = /etc/java-config-2/current-system-vm
> java.java = /etc/java-config-2/current-system-vm/bin/java
> java.log_file = /var/log/php-java-bridge.log
> java.log_level = 4
> -----------------------------------------------------
>
> And the bridge is used as the following:
> --------------------------------------bridge-example:
> $envt = array("java.naming.factory.initial" =>
> "org.jnp.interfaces.NamingContextFactory",
> "java.naming.factory.url.pkgs" =>
> "org.jboss.naming:org.jnp.interfaces",
> "java.naming.provider.url" => 192.168.1.111);
>
> // The initial context
> $ctx = new Java("javax.naming.InitialContext", $envt);
>
> // Lookup for some object
> $someObject = $ctx->lookup("SomeObjectBean/remote");
> -----------------------------------------------------
>
> Thanks in advance!
>
>
> ------------------------------------------------------------------------------
> Stay on top of everything new and different, both inside and
> around Java (TM) technology - register by April 22, and save
> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
> 300 plus technical and hands-on sessions. Register today.
> Use priority code J9JMT32. http://p.sf.net/sfu/p
> _______________________________________________
> php-java-bridge-users mailing list
> php...@li...
> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
> ------------------------------------------------------------------------------
> Crystal Reports - New Free Runtime and 30 Day Trial
> Check out the new simplified licensign option that enables unlimited
> royalty-free distribution of the report engine for externally facing
> server and web deployment.
> http://p.sf.net/sfu/businessobjects
> _______________________________________________
> php-java-bridge-users mailing list
> php...@li...
> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
|
|
From: <php...@li...> - 2009-04-24 06:59:42
|
Hi,
1. NoClassDefFound errors appear when the same class is loaded more than
once. Probably jboss 5 already contains some libraries which are also
included in the JavaBridge.war. Please use the JavaBridgeTemplate.war
instead, which contains only the essential libraries JavaBridge.jar,
php-script.jar and php-servlet.jar.
2. Please do not use the java.so or php_java.dll anymore. The pure PHP
implementation contained in Java.inc is faster and works well with 64 bit
Java VMs.
Please add a
require_once("java/Java.inc")
or
require_once("http://localhost:8080/JavaBridge/java/Java.inc")
to the PHP scripts which require Java functionality.
3. Your PHP code should work, provided that the remote interface is
accessible (ejb2 needed some env mapping declared in a proprietary web xml
file, this may have changed in ejb3, just guessing)
Regards,
Jost Boekemeier
Apr 23, 2009 7:18 nachm. schrieb am <
php...@li...>:
I was using apache + jboss 4.2.2 + php-java-bridge for a long time, but
recently I upgraded to jboss 5.0.1 and suddenly the php-java-bridge stop
working (it couldn't connect with the deployed jboss ejbs, and prints
some weird errors about not founded classes), but it initialized
correctly.
I thought that upgrading to php-java-bridge 5.0.1 should be the best
choice, but now the bridge dont even initialize correctly and apache
shows:
Fatal error: class 'Java' not found
Any hints??, I am using Gentoo GNU/Linux, apache web server and jboss
aplication server
I configured the bridge using the
file /etc/php/apache/ext-active/java.ini:
---------------------------------------------java.ini
extension = java.so
extension_dir = /usr/lib64/php5/lib/php/extensions/no-debug-zts-20060613
[java]
java.java_home = /etc/java-config-2/current-system-vm
java.java = /etc/java-config-2/current-system-vm/bin/java
java.log_file = /var/log/php-java-bridge.log
java.log_level = 4
-----------------------------------------------------
And the bridge is used as the following:
--------------------------------------bridge-example:
$envt = array("java.naming.factory.initial" =>
"org.jnp.interfaces.NamingContextFactory",
"java.naming.factory.url.pkgs" =>
"org.jboss.naming:org.jnp.interfaces",
"java.naming.provider.url" => 192.168.1.111);
// The initial context
$ctx = new Java("javax.naming.InitialContext", $envt);
// Lookup for some object
$someObject = $ctx->lookup("SomeObjectBean/remote");
-----------------------------------------------------
Thanks in advance!
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
php-java-bridge-users mailing list
php...@li...
https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
|
|
From: <php...@li...> - 2009-04-23 17:17:39
|
I was using apache + jboss 4.2.2 + php-java-bridge for a long time, but
recently I upgraded to jboss 5.0.1 and suddenly the php-java-bridge stop
working (it couldn't connect with the deployed jboss ejbs, and prints
some weird errors about not founded classes), but it initialized
correctly.
I thought that upgrading to php-java-bridge 5.0.1 should be the best
choice, but now the bridge dont even initialize correctly and apache
shows:
Fatal error: class 'Java' not found
Any hints??, I am using Gentoo GNU/Linux, apache web server and jboss
aplication server
I configured the bridge using the
file /etc/php/apache/ext-active/java.ini:
---------------------------------------------java.ini
extension = java.so
extension_dir = /usr/lib64/php5/lib/php/extensions/no-debug-zts-20060613
[java]
java.java_home = /etc/java-config-2/current-system-vm
java.java = /etc/java-config-2/current-system-vm/bin/java
java.log_file = /var/log/php-java-bridge.log
java.log_level = 4
-----------------------------------------------------
And the bridge is used as the following:
--------------------------------------bridge-example:
$envt = array("java.naming.factory.initial" =>
"org.jnp.interfaces.NamingContextFactory",
"java.naming.factory.url.pkgs" =>
"org.jboss.naming:org.jnp.interfaces",
"java.naming.provider.url" => 192.168.1.111);
// The initial context
$ctx = new Java("javax.naming.InitialContext", $envt);
// Lookup for some object
$someObject = $ctx->lookup("SomeObjectBean/remote");
-----------------------------------------------------
Thanks in advance!
|
|
From: <php...@li...> - 2009-04-22 07:37:40
|
Jost,
thank you very much for your help!!!!! It is a good example.
|
|
From: <php...@li...> - 2009-04-22 07:31:14
|
The tests.php5 folder from the documentation download contains lots of them.
The following can be typed on the windows or linux command shell:
echo 'public class c{public Integer[]f(Integer[]p){return p;}}'>c.java
javac c.java
jar cf c.jar c.class
jrunscript -classpath JavaBridge.jar -l php-interactive
java_require ("c.jar")
$c=new java("c")
$arOb=$c->f(array(1,2,3))
echo $arOb[2]
=>3
$lOb=java("java.util.Arrays")->asList($arOb)
echo (string) $lOb
=>[1, 2, 3]
$lOb->add(5)
=> Exception, backed by array
$ar=java_values($lOb)
print_r($ar)
Hope it helps.
Regards,
Jost Boekemeier
Apr 22, 2009 8:13 vorm. schrieb am <
php...@li...>:
Hello Jost,
would you please give an example of an array list in php-java-bridge.
Many thanks in advance!!!!
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
php-java-bridge-users mailing list
php...@li...
https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
|
|
From: <php...@li...> - 2009-04-22 06:12:40
|
Hello Jost,
would you please give an example of an array list in php-java-bridge.
Many thanks in advance!!!!
|
|
From: <php...@li...> - 2009-04-21 13:14:33
|
You can include the output of a portlet into php via requestDispatcher->include(...). Since PHP/Java Bridge version 5.4.4.2 (rc is available for download, final at the end of this month), you can use any php script to render the view for a portlet. Similar to this example jsp: http://nlc.nlc.go.cn/resin-doc/portlet/tutorial/basic-jsp/index.xtp Regards, Jost Boekemeier Apr 21, 2009 2:10 nachm. schrieb am < php...@li...>: Hi, I'm looking at a solution to embed a Java portlet (JSR-168) in a PHP webapp. For now, I found nobody on the Web who talk about this. Somebody on this mailing-list has an idea if it's possible ? Thank you very much for your response. ------------------------------------------------------------------------------ Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
|
From: <php...@li...> - 2009-04-21 12:09:35
|
Hi, I'm looking at a solution to embed a Java portlet (JSR-168) in a PHP webapp. For now, I found nobody on the Web who talk about this. Somebody on this mailing-list has an idea if it's possible ? Thank you very much for your response. |
|
From: <php...@li...> - 2009-04-21 11:48:23
|
Jost,
I've done it:
public class TestCase {
public ArrayList add(String a,String b){
but now "ClassNotFoundException"......
Well, am I right if I think, that it will work if I use "java_values($object-> add ($hund,$ball) );"
<?php
require_once("java/Java.inc");
$System = java("java.lang.System");
$object = new Java( "TestCase");
$result = java_values($object-> add ($hund,$ball) );
print_r($result);
?>
Or do I need anything else????
Thanks in advance!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
From: <php...@li...> - 2009-04-21 10:54:51
|
maybe you should fix your java code first... its a bad idea to name your class "List" when you're importing at the same time the List Interface from java.util. You will probably get some visibility problems with that. next your method does not accept any parameters (at least not in the java code). how do you think php can then give it two parameters? Fix your java code first, write a testcase and then port that testcase to php using the bridge. 2009/4/21 <php...@li...> > Jost, > I tryed to add "v.addAll" to my javacode but it did not work . try/catch > did not help too much. I can invoke the method in php on the same way as it > were only an array,can't I?(with java_values and so on) > > > > > > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |
|
From: <php...@li...> - 2009-04-21 10:18:36
|
I think you've lost it. PHP Java objects can be inspected with echo java_inspect($jval), which reveals the java object's features with their parameters. But since you already know this from one of the last error message you've sent, I don't know how I can help. Regards, Jost Boekemeier Apr 21, 2009 11:58 vorm. schrieb am < php...@li...>: Jost, I tryed to add "v.addAll" to my javacode but it did not work . try/catch did not help too much. I can invoke the method in php on the same way as it were only an array,can't I?(with java_values and so on) ------------------------------------------------------------------------------ Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
|
From: <php...@li...> - 2009-04-21 09:58:21
|
Jost,
I tryed to add "v.addAll" to my javacode but it did not work . try/catch did not help too much. I can invoke the method in php on the same way as it were only an array,can't I?(with java_values and so on)
|
|
From: <php...@li...> - 2009-04-21 09:40:30
|
Hello Jost,
thank you very much for your advice.
I've tried to put my class (ExampleFO2PDF.class) to
/opt/coolstack/tomcat6/webapps/JavaBridge/WEB-INF/classes
(since I'm running Tomcat port 8080), but still without success.
I've still got error : java.lang.ClassNotFoundException:embedding.ExampleFO2PDF
It seems, I have problem with the Java classes, I'm not expert in Java,
hence I will learn, how to create/modify classes/classpath in Java, then I will try again
this example.
thank you for your help.
Al
--- On Mon, 4/20/09, php...@li... <php...@li...> wrote:
From: php...@li... <php...@li...>
Subject: Re: [Php-java-bridge-users] ExampleFO2PDF.java & PHP-Java-Bridge
To: php...@li...
Date: Monday, April 20, 2009, 3:16 AM
Hi,
If it is true that
java emb.FPDF
works, then it is also true that:
java -jar JavaBridge.jar SERVLET:8090 3 jb.log &
echo '<?php require("http://localhost:8090/JavaBridge/java/Java.inc");java("emb.FPDF")->main(array());?>'
| php -dallow_url_include=On
works.
Everything else is guesswork.
Please copy your classes to JavaBridge.war's WEB-INF/classes and your
libraries to its WEB-INF/lib and re-deploy the modified JavaBridge.war.
After that use the above PHP code to test (change the port nr to 8080 or
whichever port your j2ee server listens on).
There's a user-contributed video on our web site which shows how to work
with tomcat: http://php-java-bridge.sourceforge.net/pjb/installation.php
Regards,
Jost Boekemeier
Apr 20, 2009 11:17 vorm. schrieb am <
php...@li...>:
Hello,
Thank you for your advice with the class FopFactory (I will try this later).
What do you think about the following PHP script I've created ?
www:root>vi ExampleFO2PDF.php
------------
<?php
require_once('java/Java.inc');
$basedir = new Java("java.io.File", ".");
$outdir = new Java("java.io.File", "out");
$outdir->mkdirs();
$fofile = new Java("java.io.File", $basedir, "InputFO2PDF.fo");
$pdffile = new Java("java.io.File", $outdir, "ResultFO2PDF.pdf");
echo "Input: ".$fofile->toString()."\n";
echo "Output: ".$pdffile->toString()."\n";
$myObject = new Java("embedding.ExampleFO2PDF");
$myObject->convertFO2PDF($fofile, $pdffile);
?>
---------
When I run from command line: java embedding.ExampleFO2PDF
it's OK:
FOP
ExampleFO2PDF
Preparing...
Input: XSL-FO (./xml/fo/helloworld.fo)
Output: PDF (./out/ResultFO2PDF.pdf)
Transforming...
PageSequence <no id> generated 1 pages.
PageSequence <no id> generated 1 pages.
Generated 2 pages in total.
Success!
But when I send a request:
http://myhost.com/embedding/ExampleFO2PDF.php
I've got error in PHP error log: phperror.log
---------
[17-Apr-2009 10:10:11] PHP Fatal error: Uncaught
[[o:Exception]:"java.lang.Exception: CreateInstance failed: new
embedding.ExampleFO2PDF. Cause: java.lang.ClassNotFoundException:
embedding.ExampleFO2PDF VM: 1.6.0_10@http://java.sun.com/" at:
----------
The class embedding.ExampleFO2PDF does exist, and is in the right place (in
the directory
$CLASSPATH).
--- On Fri, 4/17/09, php...@li... <
php...@li...> wrote:
From: php...@li... <
php...@li...>
Subject: Re: [Php-java-bridge-users] ExampleFO2PDF.java & PHP-Java-Bridge
To: php...@li...
Date: Friday, April 17, 2009, 8:36 AM
I don't think that tools exist which can translate a java example to PHP
code. But since both langu...
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
php-java-bridge-users mailing list
php...@li...
https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
|
|
From: <php...@li...> - 2009-04-21 08:42:23
|
1. If you surround yor php code with a try/catch, you can tell at which
position the exception is thrown
2. You have called addList with two args, which caused this exception
Apr 21, 2009 10:34 vorm. schrieb am <
php...@li...>:
If my javacode looks like this:
import java.util.ArrayList;
public class List {
public ArrayList addList(){
ArrayList v = new ArrayList();
v.add("a");
v.add("b");
return v;
}
}
Should I have in phpcode 2 times "java_values($object->addList)"???????????
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
php-java-bridge-users mailing list
php...@li...
https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
|
|
From: <php...@li...> - 2009-04-21 08:28:44
|
If my javacode looks like this:
import java.util.ArrayList;
public class List {
public ArrayList addList(){
ArrayList v = new ArrayList();
v.add("a");
v.add("b");
return v;
}
}
Should I have in phpcode 2 times "java_values($object->addList)"???????????
|
|
From: <php...@li...> - 2009-04-21 08:16:40
|
Probably because addList($str,$str) doesn't exist in your java code. Please see the error message for details. Regards, Jost Boekemeier Apr 21, 2009 9:55 vorm. schrieb am < php...@li...>: Hello, why do I get such an error message: root cause java.lang.RuntimeException: PHP Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: Invoke failed: [[o:List]]->addList([o:PhpParserString], [o:PhpParserString]). Cause: java.lang.NoSuchMethodException: addList([o:PhpParserString], [o:PhpParserString]). Candidates: [public java.util.ArrayList List.addList()] VM: 1.6.0_10@http://java.sun.com/" at: #-6 php.java.bridge.JavaBridge.checkM(JavaBridge.java:1119) #-5 php.java.bridge.JavaBridge.Invoke(JavaBridge.java:1057) #-4 php.java.bridge.Request.handleRequest(Request.java:414) #-3 php.java.bridge.Request.handleRequests(Request.java:490) #-2 php.java.bridge.http.ContextRunner.run(ContextRunner.java:146) #-1 php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:60) #0 http://localhost:8081/Ordner/java/Java.inc(248): java_ThrowExceptionProxyFactory->getProxy(3, 'List', 'addList([o:PhpP...', true) #1 http://localhost:8081/Ordner/java/Java.inc(388): java_Arg->getResult(true) #2 http://localhost:8081/Ordner/java/Java.inc(394): java_Client->getWrappedResult(true) #3 http://localhost:8081/Ordner/java/Java.i in http://localhost:8081/Ordner/java/Java.inc on line 215 php.java.servlet.fastcgi.FastCGIServlet$CGIRunner.parseBody(FastCGIServlet.java:484) php.java.servlet.fastcgi.FastCGIServlet$CGIRunner.doExecute(FastCGIServlet.java:379) php.java.servlet.fastcgi.FastCGIServlet$CGIRunner.execute(FastCGIServlet.java:387) php.java.servlet.CGIServlet.handle(CGIServlet.java:399) php.java.servlet.PhpCGIServlet.handle(PhpCGIServlet.java:382) php.java.servlet.CGIServlet.doGet(CGIServlet.java:469) javax.servlet.http.HttpServlet.service(HttpServlet.java:617) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) I use the method "addList" in my Java code.... ------------------------------------------------------------------------------ Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
|
From: <php...@li...> - 2009-04-21 07:54:45
|
Hello, why do I get such an error message: root cause java.lang.RuntimeException: PHP Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: Invoke failed: [[o:List]]->addList([o:PhpParserString], [o:PhpParserString]). Cause: java.lang.NoSuchMethodException: addList([o:PhpParserString], [o:PhpParserString]). Candidates: [public java.util.ArrayList List.addList()] VM: 1.6.0_10@http://java.sun.com/" at: #-6 php.java.bridge.JavaBridge.checkM(JavaBridge.java:1119) #-5 php.java.bridge.JavaBridge.Invoke(JavaBridge.java:1057) #-4 php.java.bridge.Request.handleRequest(Request.java:414) #-3 php.java.bridge.Request.handleRequests(Request.java:490) #-2 php.java.bridge.http.ContextRunner.run(ContextRunner.java:146) #-1 php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:60) #0 http://localhost:8081/Ordner/java/Java.inc(248): java_ThrowExceptionProxyFactory->getProxy(3, 'List', 'addList([o:PhpP...', true) #1 http://localhost:8081/Ordner/java/Java.inc(388): java_Arg->getResult(true) #2 http://localhost:8081/Ordner/java/Java.inc(394): java_Client->getWrappedResult(true) #3 http://localhost:8081/Ordner/java/Java.i in http://localhost:8081/Ordner/java/Java.inc on line 215 php.java.servlet.fastcgi.FastCGIServlet$CGIRunner.parseBody(FastCGIServlet.java:484) php.java.servlet.fastcgi.FastCGIServlet$CGIRunner.doExecute(FastCGIServlet.java:379) php.java.servlet.fastcgi.FastCGIServlet$CGIRunner.execute(FastCGIServlet.java:387) php.java.servlet.CGIServlet.handle(CGIServlet.java:399) php.java.servlet.PhpCGIServlet.handle(PhpCGIServlet.java:382) php.java.servlet.CGIServlet.doGet(CGIServlet.java:469) javax.servlet.http.HttpServlet.service(HttpServlet.java:617) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) I use the method "addList" in my Java code.... |
|
From: <php...@li...> - 2009-04-20 20:49:40
|
This has been fixed in php-java-bridge_5.4.4.2rc1.tar.gz. If there are still issues, please let us know. Apr 20, 2009 12:31 nachm. schrieb am < php...@li...>: Can you tell me which Makefile.am is to be edited? I got two files: php-java-bridge-5.4.4/bin/Makefile.am php-java-bridge-5.4.4/server/Makefile.am btw, is there a method by which rpmbuild can be run for the extracted folder and not need to recreate a tar.gz if I altered any files? I actually edited both files and still I get the same error message when I did rpmbuild of the recreated tar,gz. Warm Regards, Thangaraj On Mon, Apr 20, 2009 at 1:54 PM, < php...@li...> wrote: > Thank you very much for the bug report. > > T... -- www.ishafoundation.org www.projectgreenhands.org www.bootcd.us www.ecobuddy.in ---------------------... |
|
From: <php...@li...> - 2009-04-20 13:27:27
|
Hello, why do I get such an error message: root cause java.lang.RuntimeException: PHP Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: Invoke failed: [[o:List]]->addList([o:PhpParserString], [o:PhpParserString]). Cause: java.lang.NoSuchMethodException: addList([o:PhpParserString], [o:PhpParserString]). Candidates: [public java.util.ArrayList List.addList()] VM: 1.6.0_10@http://java.sun.com/" at: #-6 php.java.bridge.JavaBridge.checkM(JavaBridge.java:1119) #-5 php.java.bridge.JavaBridge.Invoke(JavaBridge.java:1057) #-4 php.java.bridge.Request.handleRequest(Request.java:414) #-3 php.java.bridge.Request.handleRequests(Request.java:490) #-2 php.java.bridge.http.ContextRunner.run(ContextRunner.java:146) #-1 php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:60) #0 http://localhost:8081/Ordner/java/Java.inc(248): java_ThrowExceptionProxyFactory->getProxy(3, 'List', 'addList([o:PhpP...', true) #1 http://localhost:8081/Ordner/java/Java.inc(388): java_Arg->getResult(true) #2 http://localhost:8081/Ordner/java/Java.inc(394): java_Client->getWrappedResult(true) #3 http://localhost:8081/Ordner/java/Java.i in http://localhost:8081/Ordner/java/Java.inc on line 215 php.java.servlet.fastcgi.FastCGIServlet$CGIRunner.parseBody(FastCGIServlet.java:484) php.java.servlet.fastcgi.FastCGIServlet$CGIRunner.doExecute(FastCGIServlet.java:379) php.java.servlet.fastcgi.FastCGIServlet$CGIRunner.execute(FastCGIServlet.java:387) php.java.servlet.CGIServlet.handle(CGIServlet.java:399) php.java.servlet.PhpCGIServlet.handle(PhpCGIServlet.java:382) php.java.servlet.CGIServlet.doGet(CGIServlet.java:469) javax.servlet.http.HttpServlet.service(HttpServlet.java:617) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) I use the method "addList" in my Java code.... |
|
From: <php...@li...> - 2009-04-20 10:31:19
|
Can you tell me which Makefile.am is to be edited? I got two files: php-java-bridge-5.4.4/bin/Makefile.am php-java-bridge-5.4.4/server/Makefile.am btw, is there a method by which rpmbuild can be run for the extracted folder and not need to recreate a tar.gz if I altered any files? I actually edited both files and still I get the same error message when I did rpmbuild of the recreated tar,gz. Warm Regards, Thangaraj On Mon, Apr 20, 2009 at 1:54 PM, < php...@li...> wrote: > Thank you very much for the bug report. > > This will be fixed in PHP/Java Bridge version 5.4.4.2. > > As a workaround please edit Makefile.am within php-java-bridge*.tar.gz and > remove the text "-ftarget=1.4". > Or please use the binary download instead. > > Regards, > Jost Boekemeier > > Apr 19, 2009 7:14 nachm. schrieb am "Jost Bekemeier" < > jos...@go...>: > > [-ftarget flag missing] > Doesn't gcc 4.1.2 shipped with RHEL5.3 support this flag? > > I will check this and add a fix, if necessary. > > Regards, > Jost Boekemeier > > Apr 19, 2009 5:41 nachm. schrieb am < > php...@li...>: > > Jost, > We're finally going the tomcat route. But when building the rpm (rpmbuild > -tb php-java-bridge*.tar.gz), I always get an error message: > -- > jc1: error: unrecognized command line option "-ftarget=1.4" > -- > regardless of the java bridge version I am using. I've tried > php-java-bridge_5.2.2.4.tar.gz > php-java-bridge_5.4.3.3.tar.gz > php-java-bridge_5.3.4.1.tar.gz and > php-java-bridge_5.4.4.tar.gz > > > Am I missing something? > > In the course of installing tomcat I've had to install the following: > > Installed: tomcat5.x86_64 0:5.5.23-0jpp.7.el5_2.1 > Dependency Installed: ant.x86_64 0:1.6.5-2jpp.2 axis.x86_64 0:1.2.1-2jpp.6 > bcel.x86_64 0:5.1-8jpp.1 classpathx-jaf.x86_64 0:1.0-9jpp.1 > classpathx-mail.x86_64 0:1.1.1-4jpp.2 eclipse-ecj.x86_64 > 1:3.2.1-19.el5.centos geronimo-specs.x86_64 0:1.0-0.M2.2jpp.12.el5.centos > geronimo-specs-compat.x86_64 0:1.0-0.M2.2jpp.12.el5.centos giflib.x86_64 > 0:4.1.3-7.1.el5.1 jakarta-commons-beanutils.x86_64 0:1.7.0-5jpp.1 > jakarta-commons-collections.x86_64 0:3.2-2jpp.3 > jakarta-commons-daemon.x86_64 1:1.0.1-6jpp.1 jakarta-commons-dbcp.x86_64 > 0:1.2.1-7jpp.1 jakarta-commons-digester.x86_64 0:1.7-5jpp.1 > jakarta-commons-discovery.x86_64 1:0.3-4jpp.1 jakarta-commons-el.x86_64 > 0:1.0-7jpp.1 jakarta-commons-fileupload.x86_64 1:1.0-6jpp.1 > jakarta-commons-httpclient.x86_64 1:3.0-7jpp.1 > jakarta-commons-launcher.x86_64 0:0.9-6jpp.1 jakarta-commons-logging.x86_64 > 0:1.0.4-6jpp.1 jakarta-commons-modeler.x86_64 0:1.1-8jpp.3.el5 > jakarta-commons-pool.x86_64 0:1.3-5jpp.1 java-1.6.0-openjdk.x86_64 > 1:1.6.0.0-0.30.b09.el5 java-1.6.0-openjdk-devel.x86_64 > 1:1.6.0.0-0.30.b09.el5 ldapjdk.x86_64 0:4.18-2jpp.3.el5 log4j.x86_64 > 0:1.2.13-3jpp.2 mx4j.x86_64 1:3.0.1-6jpp.4 regexp.x86_64 0:1.4-2jpp.2 > tomcat5-common-lib.x86_64 0:5.5.23-0jpp.7.el5_2.1 tomcat5-jasper.x86_64 > 0:5.5.23-0jpp.7.el5_2.1 tomcat5-jsp-2.0-api.x86_64 0:5.5.23-0jpp.7.el5_2.1 > tomcat5-server-lib.x86_64 0:5.5.23-0jpp.7.el5_2.1 > tomcat5-servlet-2.4-api.x86_64 0:5.5.23-0jpp.7.el5_2.1 ws > Installed: gcc-java.x86_64 0:4.1.2-44.el5 mono-core.x86_64 > 0:1.2.4-2.el5.centos selinux-policy-devel.noarch 0:2.4.6-203.el5 > Dependency Installed: libgcj-devel.x86_64 0:4.1.2-44.el5 libgdiplus.x86_64 > 0:1.2.5-1.el5.centos > Updated: cpp.x86_64 0:4.1.2-44.el5 gcc.x86_64 0:4.1.2-44.el5 libgcc.i386 > 0:4.1.2-44.el5 libgcc.x86_64 0:4.1.2-44.el5 libgcj.x86_64 0:4.1.2-44.el5 > libgfortran.x86_64 0:4.1.2-44.el5 libgomp.x86_64 0:4.3.2-7.el5 > libstdc++.x86_64 0:4.1.2-44.el5 libstdc++.i386 0:4.1.2-44.el5 > libstdc++-devel.x86_64 0:4.1.2-44.el5 selinux-policy.noarch 0:2.4.6-203.el5 > Dependency Updated: gcc-c++.x86_64 0:4.1.2-44.el5 gcc-gfortran.x86_64 > 0:4.1.2-44.el5 selinux-policy-targeted.noarch 0:2.4.6-203.el5 > Complete! > > Installed: xml-commons-apis.x86_64 0:1.3.02-0.b2.7jpp.10 > Complete! > > Here's the error line: > --- > cat META-INF/java/JavaBridge.inc META-INF/java/Options.inc > META-INF/java/Client.inc META-INF/java/GlobalRef.inc > META-INF/java/NativeParser.inc META-INF/java/Parser.inc > META-INF/java/Protocol.inc META-INF/java/SimpleParser.inc > META-INF/java/JavaProxy.inc | sed -f extract.sed | sed '/^\/\*/,/\*\/$/d' > >JavaRaw.inc > cat JavaRaw.inc | sed -f append.sed | sed > > 's/JAVA/MONO/g;s/java/mono/g;s/Java/Mono/g;s/updateJarLibraryPath/updateLibraryPath/;s/^.*do > not delete this line.*$/$name="cli.".$name;/;' >META-INF/java/Mono.inc > gcj -w -ftarget=1.4 -classpath .:script-api.jar -C php/java/bridge/*.java > php/java/bridge/http/*.java > jc1: error: unrecognized command line option "-ftarget=1.4" > make[1]: *** [MonoBridge.exe] Error 1 > make[1]: Leaving directory > `/usr/src/redhat/BUILD/php-java-bridge-5.3.4.1/server' > make: *** [/usr/src/redhat/BUILD/php-java-bridge-5.3.4.1/modules/stamp] > Error 2 > error: Bad exit status from /var/tmp/rpm-tmp.83378 (%build) > > > RPM build errors: > Bad exit status from /var/tmp/rpm-tmp.83378 (%build) > --- > > Help! > > Warm Regards, > Thangaraj > > On Sat, Mar 28, 2009 at 2:18 PM, < > php...@li...> wrote: > Hi, > > ... > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > > > php-java-bridge-users mailing list > > php...@li... > > > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > > -- > > www.ishafoundation.org www.projectgreenhands.org www.bootcd.us > www.ecobuddy.in > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > > php-java-bridge-users mailing list > php...@li... > > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > -- www.ishafoundation.org www.projectgreenhands.org www.bootcd.us www.ecobuddy.in |
|
From: <php...@li...> - 2009-04-20 10:20:27
|
I guess you mean the API doc: http://php-java-bridge.sourceforge.net/pjb/docs/php-api/index.html Regards, Jost Boekemeier Apr 20, 2009 11:31 vorm. schrieb am < php...@li...>: Thank you very much for the file with the list of tutorials, but I couldn't open it. Would you please send it to me as pdf? Thank you in advance! ------------------------------------------------------------------------------ Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
|
From: <php...@li...> - 2009-04-20 10:16:16
|
Hi,
If it is true that
java emb.FPDF
works, then it is also true that:
java -jar JavaBridge.jar SERVLET:8090 3 jb.log &
echo '<?php require("http://localhost:8090/JavaBridge/java/Java.inc");java("emb.FPDF")->main(array());?>'
| php -dallow_url_include=On
works.
Everything else is guesswork.
Please copy your classes to JavaBridge.war's WEB-INF/classes and your
libraries to its WEB-INF/lib and re-deploy the modified JavaBridge.war.
After that use the above PHP code to test (change the port nr to 8080 or
whichever port your j2ee server listens on).
There's a user-contributed video on our web site which shows how to work
with tomcat: http://php-java-bridge.sourceforge.net/pjb/installation.php
Regards,
Jost Boekemeier
Apr 20, 2009 11:17 vorm. schrieb am <
php...@li...>:
Hello,
Thank you for your advice with the class FopFactory (I will try this later).
What do you think about the following PHP script I've created ?
www:root>vi ExampleFO2PDF.php
------------
<?php
require_once('java/Java.inc');
$basedir = new Java("java.io.File", ".");
$outdir = new Java("java.io.File", "out");
$outdir->mkdirs();
$fofile = new Java("java.io.File", $basedir, "InputFO2PDF.fo");
$pdffile = new Java("java.io.File", $outdir, "ResultFO2PDF.pdf");
echo "Input: ".$fofile->toString()."\n";
echo "Output: ".$pdffile->toString()."\n";
$myObject = new Java("embedding.ExampleFO2PDF");
$myObject->convertFO2PDF($fofile, $pdffile);
?>
---------
When I run from command line: java embedding.ExampleFO2PDF
it's OK:
FOP
ExampleFO2PDF
Preparing...
Input: XSL-FO (./xml/fo/helloworld.fo)
Output: PDF (./out/ResultFO2PDF.pdf)
Transforming...
PageSequence <no id> generated 1 pages.
PageSequence <no id> generated 1 pages.
Generated 2 pages in total.
Success!
But when I send a request:
http://myhost.com/embedding/ExampleFO2PDF.php
I've got error in PHP error log: phperror.log
---------
[17-Apr-2009 10:10:11] PHP Fatal error: Uncaught
[[o:Exception]:"java.lang.Exception: CreateInstance failed: new
embedding.ExampleFO2PDF. Cause: java.lang.ClassNotFoundException:
embedding.ExampleFO2PDF VM: 1.6.0_10@http://java.sun.com/" at:
----------
The class embedding.ExampleFO2PDF does exist, and is in the right place (in
the directory
$CLASSPATH).
--- On Fri, 4/17/09, php...@li... <
php...@li...> wrote:
From: php...@li... <
php...@li...>
Subject: Re: [Php-java-bridge-users] ExampleFO2PDF.java & PHP-Java-Bridge
To: php...@li...
Date: Friday, April 17, 2009, 8:36 AM
I don't think that tools exist which can translate a java example to PHP
code. But since both langu...
|