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
|
3
|
4
|
5
|
|
6
|
7
(2) |
8
(1) |
9
(3) |
10
(4) |
11
(1) |
12
|
|
13
|
14
|
15
|
16
|
17
|
18
|
19
|
|
20
|
21
|
22
(1) |
23
|
24
|
25
|
26
|
|
27
(1) |
28
(2) |
29
(4) |
30
|
31
|
|
|
|
From: <php...@li...> - 2006-08-29 19:59:54
|
Hoy en la tarde, php...@li... dijo: > Ayer en la tarde, php...@li... dijo: >> Hi, >> >> do you use the dynamic loader to load the classes? >> >> We've had two tickets with similar problems (class >> cast exception because the proxies were assignment >> incompatible to each other). Both of them were closed >> because the users provided no feedback. -- One user >> reported that the suggested workaround (to move the >> libraries to the global classpath) worked, after that >> he was unable to reproduce the original problem. [...] > I'll try with the workaround and report back. No crahes after one hour of requests (w/ 1-minute delays). Seems pretty rock solid to me :) I'll go that route for now. Thanks! -- Guti Real Programmers don't comment their code. If it was hard to write, it should be hard to understand and even harder to modify. |
|
From: <php...@li...> - 2006-08-29 18:12:26
|
Hi Jonathan, > with Java. After some time passes, with zero > activity on the server, > javaw's CPU usage holds steady at a consistent 50%+. do you run javaw as a sub process of apache? If so, can you please change the php.ini entry java.java=javaw to java.java=java and then open the services dialog and allow the apache service to open a console window. The procedure is described here: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_18120 When you restart the apache service, a console window appears. When the CPU usage jumps to 50% please type Ctrl+Break simultaneously. It will create the thread dump in a file called {server-name}-out.log or {server-name}-err.log file, depending on the version of JDK/JRE you are using. The thread dump will show the thread name which causes the trouble. My guess is that the thread is some Java manager thread which tries to respond to some unexpected events. -- Apache sometime has the habit to send out a signal to all of its children. If that's the case starting Java outside of the Apache domain should solve the problem. Anyway, when you have the thread dump please open a ticket (please use http://sourceforge.net/tracker/?func=add&group_id=117793&atid=679233) and attach the dump to this ticket. Thank you very much for reporting this problem! Regards, Jost Boekemeier ___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de |
|
From: <php...@li...> - 2006-08-29 18:04:29
|
Ayer en la tarde, php...@li... dijo:
> Hi,
>
> do you use the dynamic loader to load the classes?
>
> We've had two tickets with similar problems (class
> cast exception because the proxies were assignment
> incompatible to each other). Both of them were closed
> because the users provided no feedback. -- One user
> reported that the suggested workaround (to move the
> libraries to the global classpath) worked, after that
> he was unable to reproduce the original problem.
>
> However, I am quite sure there's still a bug in our
> dynamic loader when dynamic proxies are used.
Yes, as a matter of fact I load jar files on demand; this is the
relevant part of the code (removed for brevity on previous post):
,----
| $cwd = dirname(__FILE__);
|
| $jars = array(
| "$cwd/SpringDemo/",
| "$cwd/jars/spring-aop.jar",
| "$cwd/jars/spring-beans.jar",
| "$cwd/jars/spring-context.jar",
| "$cwd/jars/spring-core.jar",
| "$cwd/jars/spring-dao.jar",
| "$cwd/jars/spring.jar",
| "$cwd/jars/spring-jdbc.jar",
| "$cwd/jars/spring-remoting.jar",
| "$cwd/jars/spring-web.jar",
| "/home/staff/crgutier/jars/lib/j2ee/servlet-api.jar",
| "$cwd/jars/lib/jakarta-commons/commons-logging.jar",
| "$cwd/jars/lib/jakarta-commons/commons-httpclient.jar",
| "$cwd/jars/lib/log4j/log4j-1.2.9.jar",
| );
|
|
| java_require(join(";", $jars));
`----
I'll try with the workaround and report back.
> Can you please run the server with:
>
> -Dphp.java.bridge.default_log_file=/tmp/javabridge.log
> -Dphp.java.bridge.default_log_level=6
>
> open a ticket (please use
> http://sourceforge.net/tracker/?func=add&group_id=117793&atid=679233)
> and attach the full log at the end of the ticket?
>
> The log file will be large, but it should contain
> information why our dynamic loader has dropped the
> proxy even though spring still keeps a reference to
> it.
Just did. Thanks for your help.
--
Guti
cat /dev/coffee | /dev/cup | /dev/mouth | /dev/nose > /dev/keyboard
|
|
From: <php...@li...> - 2006-08-29 14:45:21
|
I've noticed some strange performance issues on my development machine while using the JavaBridge... specs: Windows XP Professional Apache 2.0.55 PHP 5.1.2 PHP-Java Bridge 3.0.7a Java JDK 1.5.0_01 When I start Apache up fresh, the javaw process that's spawned stays at ~0% CPU usage, spiking momentarily whenever my PHP code does something with Java. After some time passes, with zero activity on the server, javaw's CPU usage holds steady at a consistent 50%+. I haven't the foggiest idea where to begin looking for answers, so any help is appreciated. (I'm happy to provide additional detail if needed!) Best, Jonathan =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Jonathan Abbett Children's Hospital Informatics Program 1 Autumn Street, Fifth Floor Boston, MA 02215 617-355-8334 jon...@ch... http://www.chip.org |
|
From: <php...@li...> - 2006-08-28 18:35:38
|
Hi, do you use the dynamic loader to load the classes? We've had two tickets with similar problems (class cast exception because the proxies were assignment incompatible to each other). Both of them were closed because the users provided no feedback. -- One user reported that the suggested workaround (to move the libraries to the global classpath) worked, after that he was unable to reproduce the original problem. However, I am quite sure there's still a bug in our dynamic loader when dynamic proxies are used. Can you please run the server with: -Dphp.java.bridge.default_log_file=/tmp/javabridge.log -Dphp.java.bridge.default_log_level=6 open a ticket (please use http://sourceforge.net/tracker/?func=add&group_id=117793&atid=679233) and attach the full log at the end of the ticket? The log file will be large, but it should contain information why our dynamic loader has dropped the proxy even though spring still keeps a reference to it. Thank you very much for the bug report! Regards, Jost Boekemeier ___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de |
|
From: <php...@li...> - 2006-08-28 03:10:45
|
Hello all,
First of all, thanks a lot for this amazing piece of work to everyone
involved. PHP on the frontend and Java in the backend is making a lot of
sense (a lot more than PHP-or-Java all the way 'round) over here :)
Now, my problem is the following: I have setup a Spring-based RMI
service, which works as expected the first times you try it from
PHP. After several times hitting the `refresh' button on the browser,
the proxy of the remote service "falls back" to the proxy factory
object.
My PHP code (without jar files and debug methods boilerplate):
,----
| $multService = null;
| try {
| $classpathResource = new Java("org.springframework.core.io.ClassPathResource",
| "beans.xml");
| $beanFactory = new Java("org.springframework.beans.factory.xml.XmlBeanFactory",
| $classpathResource);
|
| $multService = $beanFactory->getBean("multService");
|
| $xval = (int) rand(0,100);
| $yval = (int) rand(0,100);
|
| $x = new Java("java.lang.Integer", $xval);
| $y = new Java("java.lang.Integer", $yval);
|
| $ret = $multService->operate($x, $y);
|
| if ($ret == $xval * $yval)
| print "OK<br/>";
| else
| print "ERR<br/>";
|
| my_java_debug($multService);
| }
| catch(JavaException $ex)
| {
| my_java_print_stacktrace($ex);
| my_java_debug($multService);
| }
`----
When everything is ok, the output is:
,----
| OK
| <==== begin class debug ====>
| [class $Proxy1:
| Constructors:
| public $Proxy1(java.lang.reflect.InvocationHandler)
|
| Fields:
|
| Methods:
| public final java.lang.Integer $Proxy1.operate(java.lang.Integer,java.lang.Integer)
| public final void $Proxy1.addAdvice(int,org.aopalliance.aop.Advice) throws org.springframework.aop.framework.AopConfigException
| public final void $Proxy1.addAdvice(org.aopalliance.aop.Advice) throws org.springframework.aop.framework.AopConfigException
| public final void $Proxy1.setTargetSource(org.springframework.aop.TargetSource)
| public final org.springframework.aop.TargetSource $Proxy1.getTargetSource()
| public final java.lang.Class[] $Proxy1.getProxiedInterfaces()
| public final boolean $Proxy1.isInterfaceProxied(java.lang.Class)
| public final boolean $Proxy1.removeAdvice(org.aopalliance.aop.Advice) throws org.springframework.aop.framework.AopConfigException
| public final boolean $Proxy1.removeAdvisor(org.springframework.aop.Advisor) throws org.springframework.aop.framework.AopConfigException
| public final void $Proxy1.removeAdvisor(int) throws org.springframework.aop.framework.AopConfigException
| public final void $Proxy1.addAdvisor(org.springframework.aop.Advisor) throws org.springframework.aop.framework.AopConfigException
| public final void $Proxy1.addAdvisor(int,org.springframework.aop.Advisor) throws org.springframework.aop.framework.AopConfigException
| public final org.springframework.aop.Advisor[] $Proxy1.getAdvisors()
| public final boolean $Proxy1.replaceAdvisor(org.springframework.aop.Advisor,org.springframework.aop.Advisor) throws org.springframework.aop.framework.AopConfigException
| public final java.lang.String $Proxy1.toProxyConfigString()
| public final boolean $Proxy1.isFrozen()
| public final void $Proxy1.setExposeProxy(boolean)
| public final boolean $Proxy1.isExposeProxy()
| public final boolean $Proxy1.isProxyTargetClass()
| public final int $Proxy1.hashCode()
| public final int $Proxy1.indexOf(org.springframework.aop.Advisor)
| public final boolean $Proxy1.equals(java.lang.Object)
| public final java.lang.String $Proxy1.toString()
| public static boolean java.lang.reflect.Proxy.isProxyClass(java.lang.Class)
| public static transient java.lang.Class java.lang.reflect.Proxy.getProxyClass(java.lang.ClassLoader,java.lang.Class[]) throws java.lang.IllegalArgumentException
| public static java.lang.reflect.InvocationHandler java.lang.reflect.Proxy.getInvocationHandler(java.lang.Object) throws java.lang.IllegalArgumentException
| public static java.lang.Object java.lang.reflect.Proxy.newProxyInstance(java.lang.ClassLoader,java.lang.Class[],java.lang.reflect.InvocationHandler) throws java.lang.IllegalArgumentException
| public final native java.lang.Class java.lang.Object.getClass()
| public final native void java.lang.Object.wait(long) throws java.lang.InterruptedException
| public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException
| public final void java.lang.Object.wait() throws java.lang.InterruptedException
| public final native void java.lang.Object.notify()
| public final native void java.lang.Object.notifyAll()
|
| Classes:
| ]
| <==== end class debug ====>
`----
And after a while it all goes *boink*:
,----
| <==== begin stack trace ====>
| java.lang.Exception: Invoke failed: [o(RmiProxyFactoryBean)]->operate(o(Integer), o(Integer)). Cause: java.lang.NoSuchMethodException: operate(o(Integer), o(Integer)). Candidates: [] Responsible VM: 1.5.0_06@http://java.sun.com/
| at php.java.bridge.JavaBridge.Invoke(JavaBridge.java:1055)
| at php.java.bridge.Request.handleRequest(Request.java:499)
| at php.java.bridge.Request.handleRequests(Request.java:544)
| at php.java.bridge.JavaBridge.run(JavaBridge.java:178)
| at php.java.bridge.BaseThreadPool$Delegate.run(BaseThreadPool.java:37)
| Caused by: java.lang.NoSuchMethodException: operate(o(Integer), o(Integer)). Candidates: []
| ... 5 more
|
| <==== end stack trace ====>
| <==== begin class debug ====>
| [class org.springframework.remoting.rmi.RmiProxyFactoryBean:
| Constructors:
| public org.springframework.remoting.rmi.RmiProxyFactoryBean()
|
| Fields:
|
| Methods:
| public boolean org.springframework.remoting.rmi.RmiProxyFactoryBean.isSingleton()
| public void org.springframework.remoting.rmi.RmiProxyFactoryBean.afterPropertiesSet() throws java.lang.Exception
| public java.lang.Class org.springframework.remoting.rmi.RmiProxyFactoryBean.getObjectType()
| public java.lang.Object org.springframework.remoting.rmi.RmiProxyFactoryBean.getObject()
| public void org.springframework.remoting.rmi.RmiClientInterceptor.setLookupStubOnStartup(boolean)
| public void org.springframework.remoting.rmi.RmiClientInterceptor.setCacheStub(boolean)
| public void org.springframework.remoting.rmi.RmiClientInterceptor.setRefreshStubOnConnectFailure(boolean)
| public java.lang.Object org.springframework.remoting.rmi.RmiClientInterceptor.invoke(org.aopalliance.intercept.MethodInvocation) throws java.lang.Throwable
| public void org.springframework.remoting.rmi.RmiClientInterceptor.prepare() throws java.lang.Exception
| public void org.springframework.remoting.support.RemoteInvocationBasedAccessor.setRemoteInvocationFactory(org.springframework.remoting.support.RemoteInvocationFactory)
| public org.springframework.remoting.support.RemoteInvocationFactory org.springframework.remoting.support.RemoteInvocationBasedAccessor.getRemoteInvocationFactory()
| public java.lang.String org.springframework.remoting.support.UrlBasedRemoteAccessor.getServiceUrl()
| public void org.springframework.remoting.support.UrlBasedRemoteAccessor.setServiceUrl(java.lang.String)
| public java.lang.Class org.springframework.remoting.support.RemoteAccessor.getServiceInterface()
| public void org.springframework.remoting.support.RemoteAccessor.setServiceInterface(java.lang.Class)
| public native int java.lang.Object.hashCode()
| public final native java.lang.Class java.lang.Object.getClass()
| public final native void java.lang.Object.wait(long) throws java.lang.InterruptedException
| public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException
| public final void java.lang.Object.wait() throws java.lang.InterruptedException
| public boolean java.lang.Object.equals(java.lang.Object)
| public final native void java.lang.Object.notify()
| public final native void java.lang.Object.notifyAll()
| public java.lang.String java.lang.Object.toString()
|
| Classes:
| ]
| <==== end class debug ====>
`----
(Note that the dumped classes are not the same in both outputs)
Some things I observed:
* When it's still good, proxy instances are numbered $Proxy0, $Proxy1,
... etc., but the number doesn't change if there is a small time lapse
between requests (a few seconds). I guess that's a normal behaviour,
anyway.
* Given that the InvocationHandler object starts being replaced by a
RmiProxyFactoryBean object, I tried to consecutively call
$multService->getBean("multService") until I got the object I was
waiting for (just in case some weird bug in Spring could be returning
"this" from inside the Factory). It worked for a few tries, and then I
got a null object and couldn't go forward.
* I tried with various RMI-recovering options for Spring's remote
factory (cacheStub, refreshStubOnConnectFailure and
lookupStubOnStartup), but to no avail.
* A restart of the web server solves (if we can call that a "solution")
the problem.
* I couldn't find a pattern that would predict when RMI would fail. I
thought that perhaps a run of System.gc() could trigger it, but a line
like this didn't:
$sys = new Java("java.lang.System"); $sys->gc();
These are the gory details:
* Web server is Apache 2.0 w/PHP 5.1.4 from Debian Sarge backports.
* JVM is 1.5.0_06 from Sun.
* PHP-Java Bridge is 3.1.7 (for FC4).
Thanks in advance for any insights.
--
Guti
Chuck Norris dont need to catch an Exception because Java is afraid of
the "flying tornado kick" at the moment it throws
|
|
From: <php...@li...> - 2006-08-27 14:23:24
|
Hi,
> So my question is - how do I decide what are the
> latest and greatest
> versions of php/apache that will work?
well, the PHP/Java Bridge is only the XML protocol, as
such it should run with any PHP version >= 4.3.2. I.e
with any PHP version which has a working version of
fsockopen.
We publish PECL and PEAR extensions for convenience,
but these extensions aren't necessary to call out to
Java libraries.
The following example demonstrates how easy it is to
call out to Java libraries with nothing but fsockopen,
fread and fwrite:
<?
class Protocol {
var $c;
function __construct() {
$this->c=fsockopen("127.0.0.1",9267);
fwrite($this->c, chr(0100)); // mode 0 0, see
PROTOCOL.TXT
}
function createBegin($s) {
fwrite($this->c,sprintf("<C v=\"%s\" p=\"I\">",
$s));
}
function createEnd() { fwrite($this->c, "</C>"); }
function invokeBegin($o, $m) {
fwrite($this->c, sprintf("<I v=\"%d\" m=\"%s\"
p=\"I\">", $o, $m));
}
function invokeEnd() { fwrite($this->c, "</I>"); }
function writeString($s) {
fwrite($this->c, sprintf("<S v=\"%s\"/>", $s));
}
function writeInt($s) {
$p="O"; if($s<0) { $p="A"; $s*=-1; }
fwrite($this->c, sprintf("<L v=\"%d\" p=\"%s\"/>",
$s, $p));
}
function writeObject($s) {
fwrite($this->c, sprintf("<O v=\"%d\"/>",
$s->java));
}
function writeVal($s) {
if(is_string($s)) {
$this->writeString($s);
} else if(is_int($s)) {
$this->writeInt($s);
} else {
$this->writeObject($s);
}
}
function getResult() {
$res = fread($this->c, 8192);
$ar = sscanf($res, "%s v=\"%s");
return substr($ar[1], 0, strpos($ar[1], "\""));
}
}
function getProtocol() {
static $protocol; if(!isset($protocol))
$protocol=new Protocol();
return $protocol;
}
class J/*ava*/ {
var $java;
function __construct() {
if(!func_num_args()) return;
$protocol=getProtocol();
$ar = func_get_args();
$protocol->createBegin(array_shift($ar));
foreach($ar as $arg) { $protocol->writeVal($arg);
}
$protocol->createEnd();
$ar = sscanf($protocol->getResult(), "%d");
$this->java=$ar[0];
}
function __call($method, $args) {
$protocol=getProtocol();
$protocol->invokeBegin($this->java, $method);
foreach($args as $arg) {
$protocol->writeVal($arg); }
$protocol->invokeEnd();
$proxy = new J();
$ar = sscanf($protocol->getResult(), "%d");
$proxy->java=$ar[0];
return $proxy;
}
function toString() {
$protocol=getProtocol();
$protocol->invokeBegin("", "castToString");
$protocol->writeVal($this);
$protocol->invokeEnd();
return $protocol->getResult();
}
}
// Test
$i1 = new J("java.math.BigInteger", "1", 2);
$i2 = new J("java.math.BigInteger", "11", 2);
$i3 = $i1->add($i2);
echo $i3->toString() . "\n";
?>
To run the above example start the JavaBridge.jar, for
example by double-clicking on it or with:
java -jar JavaBridge.jar INET:0 4 JavaBridge.log
Regards,
Jost Boekemeier
___________________________________________________________
Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
|
|
From: <php...@li...> - 2006-08-22 16:39:36
|
Hi, I'm installing the php-java bridge on a windows2003 server with apache. I got it running on a dev machine already, and after some initial compatibility problems down to my version of php/apache it seems to be working fine. I have a few simple lines in php.ini and JDK 1.4 and I'm up and running with a java process starting at the same time as apache. extension=php_java.dll ... java.log_level=3 java.classpath="c:/php/ext/JavaBridge.jar;c:/htdocs/mysite/myjar.jar" I got it running on php 5.0.4 and apache 2.0.55 I'd like to use the "latest and greatest" PHP/Apache if at all possible. So my question is - how do I decide what are the latest and greatest versions of php/apache that will work? thanks, andyh |
|
From: <php...@li...> - 2006-08-11 13:11:39
|
Hi Jost,
Well thanks a lot for your explanation, and sorry for my
misunderstanding of the documentation (in fact if $ex->getCause() was
returning the error message, it was because it automatically invoked
the toString() java method of the Exception object - I just didn't
realize I had to test the $ex->getCause()'s type and not the type of
$ex itself).
Many thanks!
Etienne
> Hi Etienne,
>
> > invoked function's returned exception's type is
> > lost.
>
> $ex->getCause() returns the wrapped exception:
>
> function getMyException() {
> static $MyException = new JavaClass("MyException");
> return $MyException;
> }
>
> try {
> ...
> } catch (JavaException $ex) {
>
> if(java_instanceof($ex->getCause(),getMyException()))
> {
> ...
> }
> }
>
>
> I'll fix the documentation.
>
>
> Regards,
> Jost Boekemeier
|
|
From: <php...@li...> - 2006-08-10 15:54:39
|
Hi Etienne,
> invoked function's returned exception's type is
> lost.
$ex->getCause() returns the wrapped exception:
function getMyException() {
static $MyException = new JavaClass("MyException");
return $MyException;
}
try {
...
} catch (JavaException $ex) {
if(java_instanceof($ex->getCause(),getMyException()))
{
...
}
}
I'll fix the documentation.
Regards,
Jost Boekemeier
___________________________________________________________
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
|
|
From: <php...@li...> - 2006-08-10 15:46:17
|
Hi Paul, > implementation with ehcache. thanks for the pointer. Especially its multicast features sound interesting. > Now I need to upgrade the bridge to 3.1.7 and > install it in a J2EE > server (still running the bridge with a stand-alone > JVM) I hope this isn't a big problem. But it was difficult to maintain two separate implementations, the standalone component and the J2EE component. Regards, Jost Boekemeier ___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de |
|
From: <php...@li...> - 2006-08-10 15:41:34
|
Hi Paul, > Will the requirements on PHP versions change? the PHP code will work with all PHP versions > 4.3.1 and the Java based PHP implementation which is currently beeing developed. However, PHP4 may need a native extension module for full backward compatibility. Regards, Jost Boekemeier ___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de |
|
From: <php...@li...> - 2006-08-10 10:01:48
|
Hello guys,
I have an EJB container, which is JBoss, and I access the EJB's via
this wonderful PHP / Java Bridge OS Project.
In my Java code I use exceptions all the time to detect errors, but
most importantly error types, and hence I have customized exceptions
(as everyone has) to detect what error happened. They also contain
text messages but I do not want to rely on this, since they can change
anytime.
Well the problem is that in ususal Java code I would check for errors this way :
----------------------------------------------------
try {
loginUser(login, password);
}
catch (BadLoginException ble) { // ... }
catch (BadPasswordException bpe) { // ... }
----------------------------------------------------
And so I would determine what failed and choose what to do on this basis.
Apparently the only possible thing via the bridge is to use the
JavaException type :
----------------------------------------------------
try {
$myremoteBean->loginUser($login, $password);
}
catch (JavaException $je) { // ... }
----------------------------------------------------
So how can I determine which error appeared, without checking the
error message (which is - I think - a bad practice) ?
I tried with the "java_instanceof" function but it seems that the
returned exception is just a "JavaException" object, and that the
invoked function's returned exception's type is lost.
Thanks for your help!!
Etienne Janot
|
|
From: <php...@li...> - 2006-08-09 19:23:15
|
Hi Jost After some tests I went for a java cache implementation with ehcache. In this way I did not have to write Java, but more importantly it is easier to to cache dynamically generated java objects (like query filters which are different for each user) -- even persistent if I use the disk cache when the JVM stops. Now I need to upgrade the bridge to 3.1.7 and install it in a J2EE server (still running the bridge with a stand-alone JVM) Best regards Paul -- http://walhalla.wordpress.com |
|
From: <php...@li...> - 2006-08-09 18:52:10
|
Hi Jost On 8/9/06, php...@li... <php...@li...> wrote: > Hi Michael, > > this problem sounds similar to the autoconf problem > that was reported earlier. -- In the next version > (4.0) the java.so and php_java.dll will be removed and > we'll use a pure PHP implementation instead. This > means that you don't have to compile and install a > non-standard PHP extension anymore to call out to Java > or .NET classes. Will the requirements on PHP versions change? I mean, will PHP4 still be supported with a pure PHP implementation in 4.0? Best regards Paul -- http://walhalla.wordpress.com |
|
From: <php...@li...> - 2006-08-09 17:41:51
|
Hi Michael, this problem sounds similar to the autoconf problem that was reported earlier. -- In the next version (4.0) the java.so and php_java.dll will be removed and we'll use a pure PHP implementation instead. This means that you don't have to compile and install a non-standard PHP extension anymore to call out to Java or .NET classes. As a workaround please recompile the java.so with CFLAGS="-DCFG_JAVA_SOCKET_INET". > could not create > socket: Local:@java-bridge-2c9. Can you please open a ticket (please use http://sourceforge.net/tracker/?func=add&group_id=117793&atid=679233) and attach the result of the command: strace -s 1024 -ff php test.php 2>error.log at the end of the ticket? Please also attach the config.log there. > BTW, does J2SDK works with PHP > JavaBridge? I see the manual mention J2EE. Technically yes. But I usually recommend to install the JavaBridge.war into a servlet engine or J2EE server. The 3.1.6 download already contains a simple servlet engine implementation which can be started with: java -classpath JavaBridge.jar php.java.bridge.JavaBridgeRunner It currently can't handle session requests. But when it's ready, we'll use a real servlet engine or the JavaBridgeRunner as a fall back and the standalone socket listener will vanish. Regards, Jost Boekemeier ___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de |
|
From: <php...@li...> - 2006-08-08 22:37:07
|
Hi, I installed PHP JAVABridge3.1.6 in a Redhat Enterprise Linux 4 with Apache Http Server 2.2, PHP 5.1.4 and J2SDK1.4.2. When I start test.php from the command line, it shows: Please permanently activate the extension. Loading java extension java.so now ... java.lang.RuntimeException: java.lang.Exception: could not create socket: Local:@java-bridge-2c9. ... Error: The PHP/Java Bridge back-end is not running. But I have started the backend JavaBridge.jar and the output is: JavaBridge version: 3.1.6.1 JavaBridge logFile: JavaBridge default logLevel: 3 JavaBridge socket: INET:9267 JavaBridge thread pool size: 20. It seems the client can't connect to the JavaBridge socket or connect to a wrong socket. Anyone can give me some idea. I am new to this. So any help would be greatly appreciated. BTW, does J2SDK works with PHP JavaBridge? I see the manual mention J2EE. Thanks a lot. Michael Zhou |
|
From: <php...@li...> - 2006-08-07 18:09:05
|
Hi, > Warning: dl(): Not supported in multithreaded Web > servers - use if c:\winnt\php.ini contains a extension=php_java.dll [java] the above message means that PHP has rejected the php_java.dll and that the dl() function tried to load it again but failed. You should find the reason why the php_java.dll has been rejected in the PHP log file. Most likely ABI version# don't match. Which PHP version do you use? Regards, Jost Boekemeier ___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de |
|
From: <php...@li...> - 2006-08-07 15:29:19
|
Hello All -=20 I am trying to use the php-java-bridge to access java APIs in php file. I have configured Apache (which is running on Windows) as mentioned on http://php-java-bridge.sourceforge.net/INSTALL.WINDOWS . I am getting the error below. I really appreciate if someone can please suggest what might cause this error. #!/bin/env php Please permanently activate the extension. Loading java extension php_java.dll now...=20 Warning: dl(): Not supported in multithreaded Web servers - use extension statements in your php.ini in C:\ApacheWeb\test.php on line 42 Please permanently activate the extension. Loading java extension java-x86-windows.dll now...=20 Warning: dl(): Not supported in multithreaded Web servers - use extension statements in your php.ini in C:\ApacheWeb\test.php on line 42 Please permanently activate the extension. Loading java extension php_java.dll now... Error: Either the java extension is not installed or it was compiled against an older or newer php version. See the HTTP (IIS or Apache) server log for details. Thanks, Manish Sprint/Nextel * IT - Tech Research & Innovation M: 913-269-2595 |