From: Mikael G. <mi...@oe...> - 2005-10-20 14:23:23
|
Hi! Having problem when using rmi with php-java-bridge-2.0.8. Trying the following php code: <?php /* * Load Java Bridge */ if (!extension_loaded('java')) { if (!(PHP_SHLIB_SUFFIX=="so" && dl('java.so'))&&!(PHP_SHLIB_SUFFIX=="dll" && dl('php_java.dll'))) { echo "java extension not installed."; exit(2); } } $here=getcwd(); java_require("$here/jpos-1.4.6.jar"); java_require("$here/myClasses.jar"); // Get an ISOMsg handle and do something with it $ISOMsg = new java("org.jpos.iso.ISOMsg"); $ISOMsg->setMTI ("0260"); $lookup = new java_class("java.rmi.Naming"); $cekrm = new java("se.certitrade.myServerRemote"); $cekrm = $lookup->lookup("//www.somedomain.net/myServer"); ?> The rmi call passes an ISOMsg object that is part of the jpos-1.4.6.jar package. The myServerRemote java looks like: package se.certitrade; import java.rmi.Remote; public interface myServerRemote extends Remote { ISOMsg sendTransaction(ISOMsg msg) throws RemoteException; } When I try to run the php file I get: java.lang.ClassNotFoundException: Unresolved external reference: java.lang.NoClassDefFoundError: org/jpos/iso/ISOMsg. -- Unable to call the method because it or one of its parameters refer to the mentioned external class which is not available in the current "java_require(<path>)" url path. Remember that all interconnected classes must be loaded with a single java_require() call and that a class must not appear in more than one java_require() call. Please check the Java Bridge log file for details. at php.java.bridge.JavaBridge.Invoke(JavaBridge.java:1150) at php.java.bridge.Request.handleRequest(Request.java:204) at php.java.bridge.Request.handleRequests(Request.java:221) at php.java.bridge.JavaBridge.run(JavaBridge.java:233) at php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:20) Caused by: java.lang.NoClassDefFoundError: org/jpos/iso/ISOMsg . . This happens when the lookup method in the php-file is run. ISOMsg is (obviously) already instanciated and available. How do I get around this? Best regards /Mikael |