From: SQUILLACE M. <msq...@so...> - 2005-09-19 17:19:01
|
Hi, =20 I am investigating php-java-bridge v.2.0.7 in order to assess its capability to integrate PHP with "Enterprise" (read expensive) products that only offer Java bindings, and elected to start by trying to connect PHP 5.0.3 to WebSphere MQ on a Linux RHEL3 platform. =20 I am NOT a Java programmer, and am facing several hurdles - gaining experience as I overcome them; but there are many things I still don't understand so maybe my questions are silly. =20 When installing the client Java bindings, WebSphere puts them in /opt/mqm/java/lib and I decided to "ln -s" all the jar files to /usr/share/java ; now the bridge finds them easily without needing a java_require() [I can't say I like this solution ... one would need to hunt down the libraries of any product installed and make symbolic links for all of them]. =20 Following the manual I wrote a first PHP program that should put a message in a queue and immediately retrieve it. =20 When I execute the script tough, after connecting to the Queue Manager it needs to invoke the method=20 accessQueue(java.lang.String,int) and whatever I try I keep getting an exception along the lines: =20 Fatal error: Uncaught [class java.lang.Exception: java.lang.Exception: Invoke failed: [class com.ibm.mq.MQQueueManager]->accessQueue(class java.lang.String, class java.lang.Long). Cause: java.lang.IllegalArgumentException: java.lang.ClassCastException@74c3aa] =20 Apparently the bridge keeps converting the second argument (an integer) to java.lang.Long while the method mandates an int. =20 Is there a way to overcome this problem? =20 Thank you Massimo |