From: <php...@li...> - 2006-10-28 18:37:50
|
Hi, please excuse the delay. > Looking back at the docs for the Bridge, it says > that if you get a > "NoClassDefFound" error it means there is another > class that the > current class is trying to reference or call that is > missing (so the > Client->runTransaction is missing something). Yes. There are proposals to add a SML style "module system" to Java and/or to add a global repository for Java classes (similar to the global assembly cache used by .NET). Until this is implemented I suggest to use the JavaBridge.war as a back end and to store all necessary java libraries to the WEB-INF/lib/ folder within the JavaBridge.war file. > Does this mean that the four java_require statements The classes loaded by one java_require statement cannot see the classes loaded by the other java_require statements, see http://php-java-bridge.sourceforge.net/documentation/PHP-API/html/java_8c.html#doc23. Merging the 4 statements into one may solve the problem. > If it means that there is some other JAR I need a > java_require for, > how do I go about finding what JAR I should > include??? Good question. From the README (http://php-java-bridge.sourceforge.net/README): Sun java platform issues ------------------------ The sun java platform does not support java "modules". This causes certain problems when running java programs. When you compile a class foo which references a class bar and ship the class foo without providing bar, the sun java platform will not complain unless the user accidentally calls a method which references the non-existing class. If this happens, a "NoClassDefFound" error is thrown. This error may not(!) indicate which class is missing and it certainly does not indicate which external library is missing. The tests.php4 folder contains two tests, noClassDefFound.php and noClassDefFound2.php which demonstrate this. To avoid this problem please document *exactly* (including the version number) which external libraries (.jar files) your software needs. If you have written software where certain methods require an optional library, please document this in the method header. If receive this error when using a Java library, this may mean the following: * an old or different JDK than expected by the library is used, for example GNU Java instead of SUN or IBM Java. * java_require("foo.jar"); java_require("bar.jar"); was used instead of java_require("foo.jar;bar.jar"); to load two interconnected libraries. * the library is simply broken or it expects certain parameters in its environment (applet parameter or system property or property file). * the library may only work within a J2EE environment from a certain vendor, for example the WebSphere Application server or the Sun Java Application server. Regards, Jost Boekemeier ___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de |