|
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-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-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 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 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 11:00:07
|
Hi, is it an OutOfMemoryError or a perm gen space?You may want to report this problem to the jboss mailing list. The JavaBridgeTemplate.war ist available here: http://sourceforge.net/project/downloading.php?group_id=117793&filename=JavaBridgeTemplate5442rc1.war&a=19353110. The java/Java.inc appears after deployment at: http://localhost:8080/JavaBridgeTemplate5442rc1/java/Java.inc Regards, Jost Boekemeier Apr 24, 2009 11:57 vorm. schrieb am < php...@li...>: 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 .wa... > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-jav... Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensign optio... php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-br... |