|
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
|